Skip to content

Instantly share code, notes, and snippets.

@pzagor2
Created May 15, 2017 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pzagor2/1378093b67878e26450f9cb67c098811 to your computer and use it in GitHub Desktop.
Save pzagor2/1378093b67878e26450f9cb67c098811 to your computer and use it in GitHub Desktop.
//# sourceURL=RAD.js
var radWrapper = document.getElementById('rad-wrapper');
var inEditor = window.location.href.indexOf('edit-loader.html') > -1 ? true : false;
var inScreenshot = window.location.href.indexOf('preview?screenshot=1') > -1 ? true : false;
var ad = Radical.getAdByContainer(window.frameElement);
if (!inEditor) {
(function () {
var VIDEO_EL_ID = 'a2';
var videoContainer = document.getElementById(VIDEO_EL_ID);
var videoElement = videoContainer.getElementsByTagName('video')[0];
setTimeout(function() {
//unmuteVideo, muteVideo, pauseVideo, playVideo, restartVideo
ad.callExtension('html5video', 'playVideo', [VIDEO_EL_ID]);
ad.callExtension('html5video', 'muteVideo', [VIDEO_EL_ID]);
}, 3000);
})();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment