Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Client-side Scripting _ How to insert an in-video ad script into an iframed video served from google drive

Posted by: Mark Harris Nov 24 2017, 01:05 PM

Hello,

I need to insert an in-video ad script code provided by an ad network into an iframed video to be posted on my wordpress blog, served from my google drive. The result that I want is the ad is loaded inside the video player screen before the video starts, See below image :

IPB Image

So when the viewer is about to hit play the ad shows up with an option to be closed and resume video playing.

I have 2 pieces of code -

1- The iframe code generated from Google Drive :

CODE
<div style="width: 640px; height: 480px; position: relative;">
<iframe  src="https://drive.google.com/file/d/1n6ttu6xZf7A-8cCq1-H0XEBzwwJAorMD/preview" width="640" height="480" frameborder="0" scrolling="no" seamless="" allowfullscreen="allowfullscreen"></iframe>
<div style="width: 80px; height: 80px; position: absolute; opacity: 0; right: 0px; top: 0px;"></div>
</div>


2- The Ad Script provided by the Ad network :
CODE
<script async src="//adserver.juicyads.com/js/jads.js"></script>
<ins id="634965" data-width="308" data-height="298"></ins>
<script>(adsbyjuicy = window.adsbyjuicy || []).push({'adzone':634965});</script>



Many thanks in advance for any help !

Mark


Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)