Check if user clicked on a iframe embedded youtube video
hi i have a webpage which allows users to enter the youtube video and embeds and shows it( a bit of url manupilation to get video id and link an iframe src=youtube.com/embed/videoid -not the point here)....the video shows up nicely with my preferences of height and width. h开发者_开发百科ow do i know if the user clicked on the youtube video to watch it...i basically want it to expand the video area when the user clicks on the video so he can get a better and bigger view...thanks btw im doing this as a front end jscript/jquery project thing so asp.net/php is a no go ...im looking for something that triggers a function to resize and play the video as the user attempts to click on the iframe/or a mask div...anything..
I think the trategy is to "mask" the video with a transparent div. Create a div with "position:absolute" and appropriate values for "left/top" in order to make the div "overlap" your video. Once user click the div, you enlarge the video & hide the "mask".
About the way to play video when click the mask : Javascript play Youtube Video
精彩评论