test fix.
Showing
1 changed file
with
4 additions
and
8 deletions
... | @@ -368,10 +368,6 @@ var | ... | @@ -368,10 +368,6 @@ var |
368 | return 1; // HAVE_METADATA | 368 | return 1; // HAVE_METADATA |
369 | }; | 369 | }; |
370 | 370 | ||
371 | player.on('loadedmanifest', function() { | ||
372 | updateDuration(); | ||
373 | }); | ||
374 | |||
375 | player.on('seeking', function() { | 371 | player.on('seeking', function() { |
376 | var currentTime = player.currentTime(); | 372 | var currentTime = player.currentTime(); |
377 | player.hls.mediaIndex = getMediaIndexByTime(player.hls.media, currentTime); | 373 | player.hls.mediaIndex = getMediaIndexByTime(player.hls.media, currentTime); |
... | @@ -389,9 +385,9 @@ var | ... | @@ -389,9 +385,9 @@ var |
389 | /** | 385 | /** |
390 | * Update the player duration | 386 | * Update the player duration |
391 | */ | 387 | */ |
392 | updateDuration = function() { | 388 | updateDuration = function(playlist) { |
393 | // update the duration | 389 | // update the duration |
394 | player.duration(totalDuration(player.hls.media)); | 390 | player.duration(totalDuration(playlist)); |
395 | // tell the flash tech of the new duration | 391 | // tell the flash tech of the new duration |
396 | if(player.el().querySelector('.vjs-tech').id === 'video_flash_api') { | 392 | if(player.el().querySelector('.vjs-tech').id === 'video_flash_api') { |
397 | player.el().querySelector('.vjs-tech').vjs_setProperty('duration', player.duration()); | 393 | player.el().querySelector('.vjs-tech').vjs_setProperty('duration', player.duration()); |
... | @@ -426,7 +422,7 @@ var | ... | @@ -426,7 +422,7 @@ var |
426 | playlist); | 422 | playlist); |
427 | player.hls.media = playlist; | 423 | player.hls.media = playlist; |
428 | 424 | ||
429 | updateDuration(); | 425 | updateDuration(player.hls.media); |
430 | } | 426 | } |
431 | }; | 427 | }; |
432 | 428 | ||
... | @@ -577,7 +573,7 @@ var | ... | @@ -577,7 +573,7 @@ var |
577 | player.hls.media = player.hls.master.playlists[0]; | 573 | player.hls.media = player.hls.master.playlists[0]; |
578 | 574 | ||
579 | // update the duration | 575 | // update the duration |
580 | player.duration(totalDuration(parser.manifest)); | 576 | updateDuration(parser.manifest); |
581 | 577 | ||
582 | // periodicaly check if the buffer needs to be refilled | 578 | // periodicaly check if the buffer needs to be refilled |
583 | player.on('timeupdate', fillBuffer); | 579 | player.on('timeupdate', fillBuffer); | ... | ... |
-
Please register or sign in to post a comment