Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

Commit

Permalink
Update video duration on every durationchange
Browse files Browse the repository at this point in the history
  • Loading branch information
nnarhinen committed Feb 13, 2019
1 parent 53857ce commit d5b70e7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/engine/html5-factory.js
Expand Up @@ -302,6 +302,9 @@ function html5factory(engineName, player, root, canPlay, ext) {
switch (flow) {

case 'ready':
if (player.ready && (player.live || player.dvr)) {
player.video.duration = api.duration
}
if (player.ready) return player.debug('Player already ready, not sending duplicate ready event');
if ((!api.duration || api.duration === Infinity) && !player.live) return player.debug('No duration and VOD setup, not sending ready event');
arg = extend(video, {
Expand Down

0 comments on commit d5b70e7

Please sign in to comment.