From b28b8424ffb40d3b3f52f6977e8efb8a40bc75ab Mon Sep 17 00:00:00 2001 From: Nicolas ANGOT Date: Thu, 9 Nov 2017 15:34:14 +0100 Subject: [PATCH] do not pay attention to text buffer to trigger STREAM_BUFFERING_COMPLETED event. --- src/streaming/Stream.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/streaming/Stream.js b/src/streaming/Stream.js index f90d884573..174587d6d5 100644 --- a/src/streaming/Stream.js +++ b/src/streaming/Stream.js @@ -493,7 +493,9 @@ function Stream(config) { // if there is at least one buffer controller that has not completed buffering yet do nothing for (let i = 0; i < ln; i++) { - if (!processors[i].isBufferingCompleted()) { + //if audio or video buffer is not buffering completed state, do not send STREAM_BUFFERING_COMPLETED + if (!processors[i].isBufferingCompleted() && (processors[i].getType() === Constants.AUDIO || processors[i].getType() === Constants.VIDEO)) { + log('[Stream] onBufferingCompleted - can\'t trigger STREAM_BUFFERING_COMPLETED because streamProcessor ' + processors[i].getType() + ' is not buffering completed'); return; } }