videojs-contrib-media-sources
Advanced tools
Comparing version 4.4.8 to 4.5.0
@@ -5,2 +5,7 @@ CHANGELOG | ||
-------------------- | ||
## 4.5.0 (2017-08-18) | ||
* fix duplicate caption processing [#156](https://github.com/videojs/videojs-contrib-media-sources/pull/156) | ||
* Support for multiple CEA608 tracks and HLS-provided track names [#140](https://github.com/videojs/videojs-contrib-media-sources/pull/140) | ||
-------------------- | ||
## 4.4.8 (2017-07-17) | ||
@@ -7,0 +12,0 @@ * Fix processing segments when mediaSource is closed [#151](https://github.com/videojs/videojs-contrib-media-sources/pull/151) |
@@ -75,3 +75,5 @@ /** | ||
captionArray.forEach(function (caption) { | ||
this.inbandTextTrack_.addCue(new Cue(caption.startTime + this.timestampOffset, caption.endTime + this.timestampOffset, caption.text)); | ||
var track = caption.stream; | ||
this.inbandTextTracks_[track].addCue(new Cue(caption.startTime + this.timestampOffset, caption.endTime + this.timestampOffset, caption.text)); | ||
}, sourceHandler); | ||
@@ -78,0 +80,0 @@ } |
@@ -35,5 +35,14 @@ /** | ||
var cleanupTextTracks = function cleanupTextTracks(player) { | ||
removeExistingTrack(player, 'captions', 'cc1'); | ||
var tracks = player.remoteTextTracks() || []; | ||
for (var i = tracks.length - 1; i >= 0; i--) { | ||
var track = tracks[i]; | ||
if (track.kind === 'captions') { | ||
player.removeRemoteTextTrack(track); | ||
} | ||
} | ||
removeExistingTrack(player, 'metadata', 'Timed Metadata'); | ||
}; | ||
exports.cleanupTextTracks = cleanupTextTracks; |
@@ -24,9 +24,28 @@ /** | ||
// create an in-band caption track if one is present in the segment | ||
if (segment.captions && segment.captions.length && !sourceBuffer.inbandTextTrack_) { | ||
(0, _cleanupTextTracks.removeExistingTrack)(player, 'captions', 'cc1'); | ||
sourceBuffer.inbandTextTrack_ = player.addRemoteTextTrack({ | ||
kind: 'captions', | ||
label: 'cc1' | ||
}, false).track; | ||
player.tech_.trigger({ type: 'usage', name: 'hls-608' }); | ||
if (segment.captions && segment.captions.length) { | ||
if (!sourceBuffer.inbandTextTracks_) { | ||
sourceBuffer.inbandTextTracks_ = {}; | ||
} | ||
for (var trackId in segment.captionStreams) { | ||
if (!sourceBuffer.inbandTextTracks_[trackId]) { | ||
player.tech_.trigger({ type: 'usage', name: 'hls-608' }); | ||
var track = player.textTracks().getTrackById(trackId); | ||
if (track) { | ||
// Resuse an existing track with a CC# id because this was | ||
// very likely created by videojs-contrib-hls from information | ||
// in the m3u8 for us to use | ||
sourceBuffer.inbandTextTracks_[trackId] = track; | ||
} else { | ||
// Otherwise, create a track with the default `CC#` label and | ||
// without a language | ||
sourceBuffer.inbandTextTracks_[trackId] = player.addRemoteTextTrack({ | ||
kind: 'captions', | ||
id: trackId, | ||
label: trackId | ||
}, false).track; | ||
} | ||
} | ||
} | ||
} | ||
@@ -33,0 +52,0 @@ |
@@ -216,7 +216,16 @@ /** | ||
(0, _removeCuesFromTrack2['default'])(0, Infinity, _this.metadataTrack_); | ||
(0, _removeCuesFromTrack2['default'])(0, Infinity, _this.inbandTextTrack_); | ||
if (_this.inbandTextTracks_) { | ||
for (var track in _this.inbandTextTracks_) { | ||
(0, _removeCuesFromTrack2['default'])(0, Infinity, _this.inbandTextTracks_[track]); | ||
} | ||
} | ||
}); | ||
var onHlsReset = this.onHlsReset_.bind(this); | ||
this.mediaSource_.player_.tech_.on('hls-reset', onHlsReset); | ||
this.mediaSource_.player_.tech_.hls.on('dispose', function () { | ||
_this.transmuxer_.terminate(); | ||
_this.mediaSource_.player_.tech_.off('hls-reset', onHlsReset); | ||
}); | ||
@@ -289,3 +298,7 @@ } | ||
(0, _removeCuesFromTrack2['default'])(start, end, this.metadataTrack_); | ||
(0, _removeCuesFromTrack2['default'])(start, end, this.inbandTextTrack_); | ||
if (this.inbandTextTracks_) { | ||
for (var track in this.inbandTextTracks_) { | ||
(0, _removeCuesFromTrack2['default'])(start, end, this.inbandTextTracks_[track]); | ||
} | ||
} | ||
this.trigger({ type: 'update' }); | ||
@@ -595,2 +608,7 @@ this.trigger({ type: 'updateend' }); | ||
} | ||
}, { | ||
key: 'onHlsReset_', | ||
value: function onHlsReset_() { | ||
this.transmuxer_.postMessage({ action: 'resetCaptions' }); | ||
} | ||
}]); | ||
@@ -597,0 +615,0 @@ |
@@ -116,2 +116,7 @@ /** | ||
} | ||
}, { | ||
key: 'resetCaptions', | ||
value: function resetCaptions() { | ||
this.transmuxer.resetCaptions(); | ||
} | ||
}]); | ||
@@ -118,0 +123,0 @@ |
@@ -193,2 +193,10 @@ /** | ||
this.onHlsReset_ = function () { | ||
_this.sourceBuffers.forEach(function (sourceBuffer) { | ||
if (sourceBuffer.transmuxer_) { | ||
sourceBuffer.transmuxer_.postMessage({ action: 'resetCaptions' }); | ||
} | ||
}); | ||
}; | ||
// Re-emit MediaSource events on the polyfill | ||
@@ -211,2 +219,4 @@ ['sourceopen', 'sourceclose', 'sourceended'].forEach(function (eventName) { | ||
_this.player_.tech_.on('hls-reset', _this.onHlsReset_); | ||
if (_this.player_.audioTracks && _this.player_.audioTracks()) { | ||
@@ -262,2 +272,3 @@ _this.player_.audioTracks().on('change', _this.updateActiveSourceBuffers_); | ||
this.player_.off('mediachange', this.onPlayerMediachange_); | ||
this.player_.tech_.off('hls-reset', this.onHlsReset_); | ||
} | ||
@@ -264,0 +275,0 @@ }); |
@@ -175,2 +175,7 @@ /** | ||
} | ||
}, { | ||
key: 'resetCaptions', | ||
value: function resetCaptions() { | ||
this.transmuxer.resetCaptions(); | ||
} | ||
}]); | ||
@@ -177,0 +182,0 @@ |
@@ -472,3 +472,7 @@ /** | ||
// Remove Any Captions | ||
(0, _removeCuesFromTrack2['default'])(start, end, this.inbandTextTrack_); | ||
if (this.inbandTextTracks_) { | ||
for (var track in this.inbandTextTracks_) { | ||
(0, _removeCuesFromTrack2['default'])(start, end, this.inbandTextTracks_[track]); | ||
} | ||
} | ||
} | ||
@@ -475,0 +479,0 @@ |
{ | ||
"name": "videojs-contrib-media-sources", | ||
"version": "4.4.8", | ||
"version": "4.5.0", | ||
"description": "A Media Source Extensions plugin for video.js", | ||
@@ -80,3 +80,3 @@ "main": "es5/videojs-contrib-media-sources.js", | ||
"global": "^4.3.0", | ||
"mux.js": "4.1.5", | ||
"mux.js": "4.2.0", | ||
"video.js": "^5.17.0", | ||
@@ -83,0 +83,0 @@ "webworkify": "1.0.2" |
@@ -67,3 +67,5 @@ /** | ||
captionArray.forEach(function(caption) { | ||
this.inbandTextTrack_.addCue( | ||
let track = caption.stream; | ||
this.inbandTextTracks_[track].addCue( | ||
new Cue( | ||
@@ -70,0 +72,0 @@ caption.startTime + this.timestampOffset, |
@@ -29,4 +29,13 @@ /** | ||
export const cleanupTextTracks = function(player) { | ||
removeExistingTrack(player, 'captions', 'cc1'); | ||
const tracks = player.remoteTextTracks() || []; | ||
for (let i = tracks.length - 1; i >= 0; i--) { | ||
const track = tracks[i]; | ||
if (track.kind === 'captions') { | ||
player.removeRemoteTextTrack(track); | ||
} | ||
} | ||
removeExistingTrack(player, 'metadata', 'Timed Metadata'); | ||
}; |
@@ -19,10 +19,28 @@ /** | ||
if (segment.captions && | ||
segment.captions.length && | ||
!sourceBuffer.inbandTextTrack_) { | ||
removeExistingTrack(player, 'captions', 'cc1'); | ||
sourceBuffer.inbandTextTrack_ = player.addRemoteTextTrack({ | ||
kind: 'captions', | ||
label: 'cc1' | ||
}, false).track; | ||
player.tech_.trigger({type: 'usage', name: 'hls-608'}); | ||
segment.captions.length) { | ||
if (!sourceBuffer.inbandTextTracks_) { | ||
sourceBuffer.inbandTextTracks_ = {}; | ||
} | ||
for (let trackId in segment.captionStreams) { | ||
if (!sourceBuffer.inbandTextTracks_[trackId]) { | ||
player.tech_.trigger({type: 'usage', name: 'hls-608'}); | ||
let track = player.textTracks().getTrackById(trackId); | ||
if (track) { | ||
// Resuse an existing track with a CC# id because this was | ||
// very likely created by videojs-contrib-hls from information | ||
// in the m3u8 for us to use | ||
sourceBuffer.inbandTextTracks_[trackId] = track; | ||
} else { | ||
// Otherwise, create a track with the default `CC#` label and | ||
// without a language | ||
sourceBuffer.inbandTextTracks_[trackId] = player.addRemoteTextTrack({ | ||
kind: 'captions', | ||
id: trackId, | ||
label: trackId | ||
}, false).track; | ||
} | ||
} | ||
} | ||
} | ||
@@ -29,0 +47,0 @@ |
@@ -182,7 +182,16 @@ /** | ||
removeCuesFromTrack(0, Infinity, this.metadataTrack_); | ||
removeCuesFromTrack(0, Infinity, this.inbandTextTrack_); | ||
if (this.inbandTextTracks_) { | ||
for (let track in this.inbandTextTracks_) { | ||
removeCuesFromTrack(0, Infinity, this.inbandTextTracks_[track]); | ||
} | ||
} | ||
}); | ||
let onHlsReset = this.onHlsReset_.bind(this); | ||
this.mediaSource_.player_.tech_.on('hls-reset', onHlsReset); | ||
this.mediaSource_.player_.tech_.hls.on('dispose', () => { | ||
this.transmuxer_.terminate(); | ||
this.mediaSource_.player_.tech_.off('hls-reset', onHlsReset); | ||
}); | ||
@@ -249,3 +258,7 @@ } | ||
removeCuesFromTrack(start, end, this.metadataTrack_); | ||
removeCuesFromTrack(start, end, this.inbandTextTrack_); | ||
if (this.inbandTextTracks_) { | ||
for (let track in this.inbandTextTracks_) { | ||
removeCuesFromTrack(start, end, this.inbandTextTracks_[track]); | ||
} | ||
} | ||
this.trigger({ type: 'update' }); | ||
@@ -544,2 +557,6 @@ this.trigger({ type: 'updateend' }); | ||
} | ||
onHlsReset_() { | ||
this.transmuxer_.postMessage({action: 'resetCaptions'}); | ||
} | ||
} |
@@ -79,2 +79,7 @@ /** | ||
} | ||
resetCaptions() { | ||
this.transmuxer.resetCaptions(); | ||
} | ||
} | ||
@@ -81,0 +86,0 @@ |
@@ -162,2 +162,10 @@ /** | ||
this.onHlsReset_ = () => { | ||
this.sourceBuffers.forEach((sourceBuffer) => { | ||
if (sourceBuffer.transmuxer_) { | ||
sourceBuffer.transmuxer_.postMessage({action: 'resetCaptions'}); | ||
} | ||
}); | ||
}; | ||
// Re-emit MediaSource events on the polyfill | ||
@@ -184,2 +192,4 @@ [ | ||
this.player_.tech_.on('hls-reset', this.onHlsReset_); | ||
if (this.player_.audioTracks && this.player_.audioTracks()) { | ||
@@ -235,2 +245,3 @@ this.player_.audioTracks().on('change', this.updateActiveSourceBuffers_); | ||
this.player_.off('mediachange', this.onPlayerMediachange_); | ||
this.player_.tech_.off('hls-reset', this.onHlsReset_); | ||
} | ||
@@ -237,0 +248,0 @@ }); |
@@ -135,2 +135,7 @@ /** | ||
} | ||
resetCaptions() { | ||
this.transmuxer.resetCaptions(); | ||
} | ||
} | ||
@@ -137,0 +142,0 @@ |
@@ -424,3 +424,7 @@ /** | ||
// Remove Any Captions | ||
removeCuesFromTrack(start, end, this.inbandTextTrack_); | ||
if (this.inbandTextTracks_) { | ||
for (let track in this.inbandTextTracks_) { | ||
removeCuesFromTrack(start, end, this.inbandTextTracks_[track]); | ||
} | ||
} | ||
} | ||
@@ -427,0 +431,0 @@ |
@@ -18,3 +18,8 @@ import Qunit from 'qunit'; | ||
this.sourceHandler = { | ||
inbandTextTrack_: new MockTextTrack(), | ||
inbandTextTracks_: { | ||
CC1: new MockTextTrack(), | ||
CC2: new MockTextTrack(), | ||
CC3: new MockTextTrack(), | ||
CC4: new MockTextTrack() | ||
}, | ||
metadataTrack_: new MockTextTrack(), | ||
@@ -31,13 +36,32 @@ mediaSource_: { | ||
addTextTrackData(this.sourceHandler, [], []); | ||
equal(this.sourceHandler.inbandTextTrack_.cues.length, 0, 'added no 608 cues'); | ||
equal(this.sourceHandler.inbandTextTracks_.CC1.cues.length, 0, 'added no 608 cues'); | ||
equal(this.sourceHandler.metadataTrack_.cues.length, 0, 'added no metadata cues'); | ||
}); | ||
test('creates cues for 608 captions', function() { | ||
test('creates cues for 608 captions with "stream" property in ccX', function() { | ||
addTextTrackData(this.sourceHandler, [{ | ||
startTime: 0, | ||
endTime: 1, | ||
text: 'caption text' | ||
text: 'CC1 text', | ||
stream: 'CC1' | ||
}, { | ||
startTime: 0, | ||
endTime: 1, | ||
text: 'CC2 text', | ||
stream: 'CC2' | ||
}, { | ||
startTime: 0, | ||
endTime: 1, | ||
text: 'CC3 text', | ||
stream: 'CC3' | ||
}, { | ||
startTime: 0, | ||
endTime: 1, | ||
text: 'CC4 text', | ||
stream: 'CC4' | ||
}], []); | ||
equal(this.sourceHandler.inbandTextTrack_.cues.length, 1, 'added one 608 cues'); | ||
equal(this.sourceHandler.inbandTextTracks_.CC1.cues.length, 1, 'added one 608 cue to CC1'); | ||
equal(this.sourceHandler.inbandTextTracks_.CC2.cues.length, 1, 'added one 608 cue to CC2'); | ||
equal(this.sourceHandler.inbandTextTracks_.CC3.cues.length, 1, 'added one 608 cue to CC3'); | ||
equal(this.sourceHandler.inbandTextTracks_.CC4.cues.length, 1, 'added one 608 cue to CC4'); | ||
equal(this.sourceHandler.metadataTrack_.cues.length, 0, 'added no metadata cues'); | ||
@@ -51,4 +75,4 @@ }); | ||
}]); | ||
equal(this.sourceHandler.inbandTextTrack_.cues.length, 0, 'added no 608 cues'); | ||
equal(this.sourceHandler.inbandTextTracks_.CC1.cues.length, 0, 'added no 608 cues'); | ||
equal(this.sourceHandler.metadataTrack_.cues.length, 1, 'added one metadata cues'); | ||
}); |
@@ -72,2 +72,9 @@ import document from 'global/document'; | ||
const createDataMessage = function(data, audioData, metadata, captions) { | ||
let captionStreams = {}; | ||
if (captions) { | ||
captions.forEach((caption) => { | ||
captionStreams[caption.stream] = true; | ||
}); | ||
} | ||
return { | ||
@@ -86,3 +93,4 @@ data: { | ||
metadata, | ||
captions | ||
captions, | ||
captionStreams | ||
} | ||
@@ -1056,3 +1064,4 @@ } | ||
endTime: 3, | ||
text: 'This is an in-band caption' | ||
text: 'This is an in-band caption', | ||
stream: 'CC1' | ||
}]; | ||
@@ -1074,2 +1083,7 @@ | ||
}, | ||
textTracks() { | ||
return { | ||
getTrackById() {} | ||
}; | ||
}, | ||
remoteTextTracks() { | ||
@@ -1076,0 +1090,0 @@ return addedTracks; |
@@ -222,11 +222,13 @@ import document from 'global/document'; | ||
sourceBuffer.inbandTextTrack_ = { | ||
removeCue(cue) { | ||
removedCue.push(cue); | ||
this.cues.splice(this.cues.indexOf(cue), 1); | ||
}, | ||
cues: [ | ||
{startTime: 10, endTime: 20, text: 'delete me'}, | ||
{startTime: 0, endTime: 2, text: 'save me'} | ||
] | ||
sourceBuffer.inbandTextTracks_ = { | ||
CC1: { | ||
removeCue(cue) { | ||
removedCue.push(cue); | ||
this.cues.splice(this.cues.indexOf(cue), 1); | ||
}, | ||
cues: [ | ||
{startTime: 10, endTime: 20, text: 'delete me'}, | ||
{startTime: 0, endTime: 2, text: 'save me'} | ||
] | ||
} | ||
}; | ||
@@ -248,3 +250,3 @@ mediaSource.videoBuffer_.remove = function(start, end) { | ||
QUnit.equal( | ||
sourceBuffer.inbandTextTrack_.cues.length, | ||
sourceBuffer.inbandTextTracks_.CC1.cues.length, | ||
1, | ||
@@ -268,4 +270,6 @@ 'one cue remains after remove' | ||
sourceBuffer.inbandTextTrack_ = { | ||
cues: null | ||
sourceBuffer.inbandTextTracks_ = { | ||
CC1: { | ||
cues: null | ||
} | ||
}; | ||
@@ -284,3 +288,3 @@ | ||
QUnit.equal( | ||
sourceBuffer.inbandTextTrack_.cues, | ||
sourceBuffer.inbandTextTracks_.CC1.cues, | ||
null, | ||
@@ -301,11 +305,13 @@ 'cues are still null' | ||
muxedBuffer.inbandTextTrack_ = { | ||
removeCue(cue) { | ||
removedCue.push(cue); | ||
this.cues.splice(this.cues.indexOf(cue), 1); | ||
}, | ||
cues: [ | ||
{startTime: 10, endTime: 20, text: 'delete me'}, | ||
{startTime: 0, endTime: 2, text: 'save me'} | ||
] | ||
muxedBuffer.inbandTextTracks_ = { | ||
CC1: { | ||
removeCue(cue) { | ||
removedCue.push(cue); | ||
this.cues.splice(this.cues.indexOf(cue), 1); | ||
}, | ||
cues: [ | ||
{startTime: 10, endTime: 20, text: 'delete me'}, | ||
{startTime: 0, endTime: 2, text: 'save me'} | ||
] | ||
} | ||
}; | ||
@@ -326,3 +332,3 @@ mediaSource.videoBuffer_.remove = function(start, end) { | ||
QUnit.equal(removes, 1, 'called remove on only one source buffer'); | ||
QUnit.equal(muxedBuffer.inbandTextTrack_.cues.length, | ||
QUnit.equal(muxedBuffer.inbandTextTracks_.CC1.cues.length, | ||
1, | ||
@@ -1059,2 +1065,7 @@ 'one cue remains after remove'); | ||
}, | ||
textTracks() { | ||
return { | ||
getTrackById() {} | ||
}; | ||
}, | ||
remoteTextTracks() { | ||
@@ -1074,7 +1085,9 @@ }, | ||
endTime: 3, | ||
text: 'This is an in-band caption' | ||
}] | ||
text: 'This is an in-band caption in CC1', | ||
stream: 'CC1' | ||
}], | ||
captionStreams: {CC1: true} | ||
})); | ||
sourceBuffer.transmuxer_.onmessage(doneMessage); | ||
let cues = sourceBuffer.inbandTextTrack_.cues; | ||
let cues = sourceBuffer.inbandTextTracks_.CC1.cues; | ||
@@ -1085,3 +1098,3 @@ QUnit.equal(hls608, 1, 'one hls-608 event was triggered'); | ||
QUnit.equal(cues.length, 1, 'created one cue'); | ||
QUnit.equal(cues[0].text, 'This is an in-band caption', 'included the text'); | ||
QUnit.equal(cues[0].text, 'This is an in-band caption in CC1', 'included the text'); | ||
QUnit.equal(cues[0].startTime, 11, 'started at eleven'); | ||
@@ -1091,2 +1104,69 @@ QUnit.equal(cues[0].endTime, 13, 'ended at thirteen'); | ||
QUnit.test('captions use existing tracks with id equal to CC#', function() { | ||
let mediaSource = new videojs.MediaSource(); | ||
let sourceBuffer = mediaSource.addSourceBuffer('video/mp2t'); | ||
let addTrackCalled = 0; | ||
let tracks = { | ||
CC1: { | ||
kind: 'captions', | ||
label: 'CC1', | ||
id: 'CC1', | ||
cues: [], | ||
addCue(cue) { | ||
this.cues.push(cue); | ||
} | ||
}, | ||
CC2: { | ||
kind: 'captions', | ||
label: 'CC2', | ||
id: 'CC2', | ||
cues: [], | ||
addCue(cue) { | ||
this.cues.push(cue); | ||
} | ||
} | ||
}; | ||
mediaSource.player_ = { | ||
addRemoteTextTrack(options) { | ||
addTrackCalled++; | ||
}, | ||
textTracks() { | ||
return { | ||
getTrackById(id) { | ||
return tracks[id]; | ||
} | ||
}; | ||
}, | ||
remoteTextTracks() { | ||
}, | ||
tech_: new videojs.EventTarget() | ||
}; | ||
sourceBuffer.timestampOffset = 10; | ||
sourceBuffer.transmuxer_.onmessage(createDataMessage('video', new Uint8Array(1), { | ||
captions: [{ | ||
stream: 'CC1', | ||
startTime: 1, | ||
endTime: 3, | ||
text: 'This is an in-band caption in CC1' | ||
}, { | ||
stream: 'CC2', | ||
startTime: 1, | ||
endTime: 3, | ||
text: 'This is an in-band caption in CC2' | ||
}], | ||
captionStreams: {CC1: true, CC2: true} | ||
})); | ||
sourceBuffer.transmuxer_.onmessage(doneMessage); | ||
let cues = sourceBuffer.inbandTextTracks_.CC1.cues; | ||
QUnit.equal(addTrackCalled, 0, 'no tracks were created'); | ||
QUnit.equal(tracks.CC1.cues.length, 1, 'CC1 contains 1 cue'); | ||
QUnit.equal(tracks.CC2.cues.length, 1, 'CC2 contains 1 cue'); | ||
QUnit.equal(tracks.CC1.cues[0].text, 'This is an in-band caption in CC1', 'CC1 contains the right cue'); | ||
QUnit.equal(tracks.CC2.cues[0].text, 'This is an in-band caption in CC2', 'CC2 contains the right cue'); | ||
}); | ||
QUnit.test('translates metadata events into WebVTT cues', function() { | ||
@@ -1173,5 +1253,2 @@ let mediaSource = new videojs.MediaSource(); | ||
label: 'Timed Metadata' | ||
}, { | ||
kind: 'captions', | ||
label: 'cc1' | ||
}]; | ||
@@ -1207,2 +1284,7 @@ let removedTracks = []; | ||
}, | ||
textTracks() { | ||
return { | ||
getTrackById() {} | ||
}; | ||
}, | ||
remoteTextTracks() { | ||
@@ -1223,8 +1305,10 @@ return addedTracks; | ||
endTime: 3, | ||
text: 'This is an in-band caption' | ||
}] | ||
text: 'This is an in-band caption', | ||
stream: 'CC1' | ||
}], | ||
captionStreams: {CC1: true} | ||
})); | ||
sourceBuffer.transmuxer_.onmessage(doneMessage); | ||
QUnit.equal(removedTracks.length, 2, 'removed two text tracks'); | ||
QUnit.equal(removedTracks.length, 1, 'removed one text tracks'); | ||
QUnit.equal(removedTracks.filter(t => ['captions', 'metadata'].indexOf(t.kind) === -1).length, | ||
@@ -1277,2 +1361,7 @@ 0, | ||
}, | ||
textTracks() { | ||
return { | ||
getTrackById() {} | ||
}; | ||
}, | ||
remoteTextTracks() { | ||
@@ -1292,4 +1381,6 @@ return addedTracks; | ||
endTime: 3, | ||
text: 'This is an in-band caption' | ||
}] | ||
text: 'This is an in-band caption', | ||
stream: 'CC1' | ||
}], | ||
captionStreams: {CC1: true} | ||
})); | ||
@@ -1296,0 +1387,0 @@ sourceBuffer.transmuxer_.onmessage(doneMessage); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4639071
97
85966
+ Addedmux.js@4.2.0(transitive)
- Removedmux.js@4.1.5(transitive)
Updatedmux.js@4.2.0