Skip to content

Commit

Permalink
Added clarifying comments
Browse files Browse the repository at this point in the history
  • Loading branch information
AnirudhRahul committed Feb 16, 2022
1 parent c4cec43 commit 876536e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/videojsVideoProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ export function VideojsProvider(config, videojs_, adState_, timeState_, callback
url: player.currentSrc()
};
// Only include length if player is ready
// player.readyState() returns a level of readiness from 0 to 4
// https://docs.videojs.com/player#readyState
if (player.readyState() > 0) {
content.len = Math.round(player.duration());
}
Expand Down Expand Up @@ -114,6 +116,8 @@ export function VideojsProvider(config, videojs_, adState_, timeState_, callback

// TODO: Determine placement may not be in stream if videojs is only used to serve ad content
// ~ Sort of resolved check if the player has a source to tell if the placement is instream
// Still cannot reliably check what type of placement the player is if its outstream
// i.e. we can't tell if its interstitial, in article, etc.
if (content.url) {
video.placement = PLACEMENT.IN_STREAM;
}
Expand Down

0 comments on commit 876536e

Please sign in to comment.