From c36dedfb9dd7b1db1af9a25d15522904564d42fb Mon Sep 17 00:00:00 2001 From: Shawn Busolits Date: Wed, 13 Jun 2018 15:05:05 -0400 Subject: [PATCH] refactor: Remove playOnLoad from setContentWith(AdTag|AdsResponse|adsRequest). This stopped working with the refactor, and due to how the player and contrib-ads handle autoplay, is no longer supported. Fixes #524. --- src/controller.js | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/controller.js b/src/controller.js index 0bc00bc5..a1db6dcc 100644 --- a/src/controller.js +++ b/src/controller.js @@ -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.