Skip to content

Commit

Permalink
refactor: Remove playOnLoad from setContentWith(AdTag|AdsResponse|ads…
Browse files Browse the repository at this point in the history
…Request). This stopped working with the refactor, and due to how the player and contrib-ads handle autoplay, is no longer supported. Fixes #524.
  • Loading branch information
shawnbuso committed Jun 13, 2018
1 parent 29de101 commit c36dedf
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/controller.js
Expand Up @@ -570,25 +570,6 @@ Controller.prototype.setContentWithAdsRequest =
this.playerWrapper.changeSource(contentSrc);
};

/**
* Sets the content of the video player. You should use this method instead
* of setting the content src directly to ensure the proper ads request is
* used when the video content is loaded.
* @param {?string} contentSrc The URI for the content to be played. Leave
* blank to use the existing content.
* @param {?Object} adsRequest The ads request to be requested when the
* content loads. Leave blank to use the existing ads request.
* @param {?boolean} playOnLoad True to play the content once it has loaded,
* false to only load the content but not start playback.
*/
Controller.prototype.setContentWithAdsRequest =
function(contentSrc, adsRequest, playOnLoad) {
this.reset();
this.settings.adsRequest =
adsRequest ? adsRequest : this.settings.adsRequest;
this.playerWrapper.changeSource(contentSrc, playOnLoad);
};


/**
* Resets the state of the plugin.
Expand Down

0 comments on commit c36dedf

Please sign in to comment.