src/cancelContentPlay.js
/*
This feature makes sure the player is paused during ad loading.

It does this by pausing the player immediately after a "play" where ads will be requested,
then signalling that we should play after the ad is done.
*/
This feature makes sure the player is paused during ad loading.
It does this by pausing the player immediately after a "play" where ads will be requested,
then signalling that we should play after the ad is done.
This feature makes sure the player is paused during ad loading . It does this by pausing the player immediately after a " play " where ads will be requested then signalling that we should play after the ad is done .
function cancelContentPlay() {
  if (this.ads._shouldBlockPlay === false) {
    return;
  }
  if (!this.paused()) {
    this.ads.debug('Playback was canceled by cancelContentPlay');
    this.pause();
  }
  this.ads._cancelledPlay = true;
}
function cancelContentPlay ( ) { if ( this . ads . _shouldBlockPlay === false ) { return ; } if ( ! this . paused ( ) ) { this . ads . debug ( 'Playback was canceled by cancelContentPlay' ) ; this . pause ( ) ; } this . ads . _cancelledPlay = true ; }
This feature makes sure the player is paused during ad loading.
This feature makes sure the player is paused during ad loading .
// this function is in the player's context // Only block play if the ad plugin is in a state when content // playback should be blocked. This currently means during // BeforePrerollState and PrerollState. // pause playback so ads can be handled. // When the 'content-playback' state is entered, this will let us know to play. // This is needed if there is no preroll or if it errors, times out, etc.