Ad over a paused video

Home Forums Webmaster Discussion Ad over a paused video

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #3733 Reply
    Simon3242
    Guest

    Hey guys, we’re looking at the possibility of putting ads over videos on page load, pause and end, but we’re having a hard time finding the right thing to achieve it.
    We’ve seen some WP plugins but they all seem to be limited to YouTube embeds, or only permit using ads from specific services.
    What we really need is a way to display an ad of our choosing over any video uploaded to the adult blog.

    Does anyone have any ideas about how to achieve this?

    #3734 Reply
    DOC
    Guest

    There is a way to do it if you use Flowplayer and its done through CSS.

    #3735 Reply
    chenglou
    Guest

    It’s not too complicated to build it from scratch if you use HTML5 and no Flash.

    You can use a branded player or just a <video> tag, now that Flash is getting blocked in modern browsers. Code a <div> to your page that will contain the ad. Position it over the video with CSS, and set it to display:none; if you do not want it to show before the video starts. Otherwise, take note if you used diplay:block or display:inline-block to position it.

    Then, using JavaScript, you can toggle the ad div’s visibility by switching its CSS display property between “block” (or “inline-block” depending on how you positioned it) and “none”. For the JavaScript, all of these players and video tags have events you can tap into. I think the names of the events are pretty straightforward like “play” and “pause”, regardless of what you use to play videos. For a plain <video> tag, here’s a list of all the events you can tap into.

    w3schools.com/tags/ref_av_dom.asp

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Ad over a paused video
Your information: