File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -283,6 +283,8 @@ Here we put all of this together in a very basic example player.
283
283
data .set (segment .data , segment .initSegment .byteLength );
284
284
console .log (muxjs .mp4 .tools .inspect (data));
285
285
sourceBuffer .appendBuffer (data);
286
+ // reset the 'data' event listener to just append (moof/mdat) boxes to the Source Buffer
287
+ transmuxer .off (' data' );
286
288
})
287
289
288
290
fetch (segments .shift ()).then ((response )=> {
@@ -294,10 +296,9 @@ Here we put all of this together in a very basic example player.
294
296
}
295
297
296
298
function appendNextSegment (){
297
- // reset the 'data' event listener to just append (moof/mdat) boxes to the Source Buffer
298
- transmuxer .off (' data' );
299
299
transmuxer .on (' data' , (segment ) => {
300
300
sourceBuffer .appendBuffer (new Uint8Array (segment .data ));
301
+ transmuxer .off (' data' );
301
302
})
302
303
303
304
if (segments .length == 0 ){
You can’t perform that action at this time.
0 commit comments