Skip to content

Commit

Permalink
polls for duration when absent
Browse files Browse the repository at this point in the history
  • Loading branch information
karimMourra committed Dec 31, 2021
1 parent 6489b13 commit 52b1f05
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/jwplayerVideoProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ export function JWPlayerProvider(config, jwplayer_, adState_, timeState_, callba
}

const item = player.getPlaylistItem() || {}; // TODO does player call need optimization ?
const { duration, playbackMode } = timeState.getState();
let { duration, playbackMode } = timeState.getState();
if (duration === undefined) {
duration = player.getDuration();
}

const content = {
id: item.mediaid,
url: item.file,
Expand Down

0 comments on commit 52b1f05

Please sign in to comment.