Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make callback after play button is pushed - Youtube embed video

Is it possible to do a javascript action after play button is pushed? I know I will need to use onStateChange function form Youtube's API. But I really don't know where to start? Any help? Thank you.

--

I have also found something here: http://apiblog.youtube.com/2011/01/introducing-javascript-player-api-for.html

like image 869
tomexx Avatar asked Nov 16 '11 13:11

tomexx


People also ask

How do I embed a Youtube video in a certain point?

To have a video start playing from a specific point, add “? start=” to a video's embed code, followed by the time in seconds at which you'd like the video to begin playing.

How do I change the embed settings on Youtube?

Sign in to Studio Content Manager. In the Overview section, scroll to Block embedding in apps. Click User-uploaded content and select the rule you want to apply to apps that embed user-uploaded videos claimed against one of your assets: Allow in all apps (default option): No restrictions on embedding in any app.


2 Answers

Here's a solution that you should be able to extend easily: http://jsbin.com/evagof

like image 87
amustill Avatar answered Sep 19 '22 07:09

amustill


Hey here is the answer . http://jsfiddle.net/masiha/4mEDR/ Enjoy ...let me know if you have more qtns

like image 20
May Avatar answered Sep 18 '22 07:09

May