From 8ad694d8740f86c4de03f92769fc994e731384fd Mon Sep 17 00:00:00 2001 From: David Evans Date: Wed, 12 Apr 2017 09:49:26 +0100 Subject: [PATCH] Fix #1873 - supply correct args to trigger for VIDEO_CHUNK_RECEIVED --- src/streaming/controllers/BufferController.js | 2 +- src/streaming/text/TextSourceBuffer.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/streaming/controllers/BufferController.js b/src/streaming/controllers/BufferController.js index fbb521d8f8..f364c10c14 100644 --- a/src/streaming/controllers/BufferController.js +++ b/src/streaming/controllers/BufferController.js @@ -198,7 +198,7 @@ function BufferController(config) { sourceBufferController.append(buffer, chunk); if (chunk.mediaInfo.type === 'video') { - eventBus.trigger(Events.VIDEO_CHUNK_RECEIVED, chunk); + eventBus.trigger(Events.VIDEO_CHUNK_RECEIVED, {chunk: chunk}); } } diff --git a/src/streaming/text/TextSourceBuffer.js b/src/streaming/text/TextSourceBuffer.js index b0e1ef46ea..b53cc1b680 100644 --- a/src/streaming/text/TextSourceBuffer.js +++ b/src/streaming/text/TextSourceBuffer.js @@ -135,7 +135,9 @@ function TextSourceBuffer() { } - function onVideoChunkReceived(chunk) { + function onVideoChunkReceived(e) { + const chunk = e.chunk; + if (chunk.mediaInfo.embeddedCaptions) { append(chunk.bytes, chunk); }