« Return to Blog

Youtube IFRAME Event Listener - Custom Box

Author: Zeeshan Arshad     649     03/03/2015

Estimated reading time: 0 minutes, 21 seconds

This is demonstration of how you can listen to event generates by youtube video player using iframe and control the actions. This code can also be used for other purposes beside showing and hiding custom box.

Demo

Source Code:



Youtube IFRAME Event Listener



 


You can only see this box when video is paused OR ended.



Here is full documentation of Youtube API:
https://developers.google.com/youtube/iframe_api_reference