From 876536e95a47b7c66a775e0d02003213e59b9743 Mon Sep 17 00:00:00 2001 From: AnirudhRahul Date: Wed, 16 Feb 2022 11:56:56 -0500 Subject: [PATCH] Added clarifying comments --- modules/videojsVideoProvider.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/videojsVideoProvider.js b/modules/videojsVideoProvider.js index a1c336e0d93..5fb8e7ce44a 100644 --- a/modules/videojsVideoProvider.js +++ b/modules/videojsVideoProvider.js @@ -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()); } @@ -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; }