Solved

iframe or DIV Swap

Posted on 2014-10-07
4
82 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 500 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

708 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now