1 Replies - 248 Views - Last Post: 16 October 2017 - 09:19 AM

#1 tdcpepsi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 01-May 07

Need To Add Auto Skip Function To jQuery Pre Roll Ad

Posted 13 October 2017 - 05:53 PM

I've tried over and over to fix this issue but nothing seems to work.
All I need is the "auto skip" added to the pre roll ad within the jQuery function.
If anyone know the fix for the below code please message me ASAP!!!

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script><script>if((typeof jQuery == "undefined") || !window.jQuery )
{ var script = document.createElement("script"); script.type = "text/javascript"; script.src = "http://vtubemobi.com/tpl/main/styles/js/jquery.js"; document.getElementsByTagName('head')[0].appendChild(script);
}
var acanceltext = "Cancel";
var startNextVideo,moveToNext,nextPlayUrl;</script>

jQuery(document).ready(function($){ var pi_postRoll = $('.post-roll-ad').wrap('<div class="piwrap"></div>').parent().html(); $('.piwrap').remove(); jwplayer().onComplete( function(){setTimeout(function(){ /*var postAdIframe = $('.post-roll-ad iframe')[0].contentWindow; postAdIframe.postMessage('{"event":"command","func":"playVideo","args":""}','*');*/$('.video-player').html( pi_postRoll );$('.post-roll-ad').removeClass('hide');}, 3000); });
}); $(document).ready(function() {
jwplayer().onPlay( function(){
$('.plAd').detach().appendTo('.jwplayer');
$('.bAd').detach().appendTo('.jwplayer');
$('div.screenAd').addClass('hide');
$('.plAd').addClass('hide');
}); jwplayer().stop();
$('.pre-roll-ad').removeClass('hide');
$('.bigadclose').click(function(){ $('.pre-roll-ad').addClass('hide').remove('.pre-roll-ad'); jwplayer().play(true); });
jwplayer().onComplete( function(){
$('.post-roll-ad').removeClass('hide');
$('.bigadclose').click(function(){ jwplayer().play(true); });
});

Is This A Good Question/Topic? 0
  • +

Replies To: Need To Add Auto Skip Function To jQuery Pre Roll Ad

#2 ArtificialSoldier  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1829
  • View blog
  • Posts: 5,761
  • Joined: 15-January 14

Re: Need To Add Auto Skip Function To jQuery Pre Roll Ad

Posted 16 October 2017 - 09:19 AM

If that code was formatted to be human readable it would be a lot easier to figure out what it's doing. What exactly is "the auto skip" that you're trying to add?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1