Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

iframe or DIV Swap

Posted on 2014-10-07
4
Medium Priority
?
93 Views
Last Modified: 2015-01-02
http://the surfers view dot com

Can anybody point me in the direction of how they get their video to stop playing after 2 min like that and swap it with an ad?
0
Comment
Question by:-TNT-
4 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 2000 total points
ID: 40368763
if you use the onStateChange to know whene the video start playing, you can start a 2 seconds timer to display an overlay div over the video, basicaly the video container and the overlay div are in the same container with : position:absolute, same top and left and the div have a greate z-index of come after the video. you put yoru add inside this overlay div.

https://developers.google.com/youtube/js_api_reference?hl=fr#Events
0
 

Author Comment

by:-TNT-
ID: 40393545
Awesome!
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question