File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
chrome/player/players/mp4 Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -374,6 +374,7 @@ export default class MP4Player extends EventEmitter {
374374 this . running = false ;
375375 throw new Error ( 'No current fragment' ) ;
376376 }
377+
377378 const frags = this . client . getFragments ( this . getCurrentVideoLevelID ( ) ) || [ ] ;
378379
379380 const time = this . video . currentTime ;
@@ -419,13 +420,16 @@ export default class MP4Player extends EventEmitter {
419420 this . loader = null ;
420421 } else return ;
421422
423+ this . mp4box . appendBuffer ( data ) ;
424+ this . currentFragments . push ( frag ) ;
425+ frag . addReference ( ReferenceTypes . MP4PLAYER , true ) ;
426+
422427 if ( ! this . fileLength ) {
423428 const rangeHeader = entry . responseHeaders [ 'content-range' ] ;
424429 if ( ! rangeHeader ) {
425430 console . warn ( 'No content length' ) ;
426431 this . fileLength = 0 ;
427432
428- // make next fragment
429433 if ( ! this . metaData ) {
430434 const nextParsePosition = this . mp4box . nextParsePosition || ( frag . rangeEnd + 1 ) ;
431435 const fragIndex = Math . floor ( nextParsePosition / FRAGMENT_SIZE ) ;
@@ -444,10 +448,6 @@ export default class MP4Player extends EventEmitter {
444448 this . initializeFragments ( ) ;
445449 }
446450 }
447- // console.log("append", frag)
448- this . mp4box . appendBuffer ( data ) ;
449- this . currentFragments . push ( frag ) ;
450- frag . addReference ( ReferenceTypes . MP4PLAYER , true ) ;
451451 this . runLoad ( ) ;
452452 } ,
453453 onProgress : ( stats , context , data , xhr ) => {
You can’t perform that action at this time.
0 commit comments