Monday, March 28, 2011

[YouTube-API] div over youtube video

I have a div layered over a youtube video to display some text.
however, i still want users to be able to interact with the video
(play, pause, close ads, users comments, related vids, etc.)
but since the div is over the video, that is not possible

i am trying to to use initMouseEvent to do so.
https://developer.mozilla.org/en/DOM/event.initMouseEvent

it works with regular dom objects, divs, images, etc, but doesnt seem
to work with flash objects.

my code is:

evt.initMouseEvent('click', true, true, window,0, screenX,screenY,
cleintX, clientY, false, false, false, false, 0, null);
document.getElementById("ytPlayer").dispatchEvent(evt);

but that doesnt pause the video or close the ad.

any ideas?

--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.

No comments:

Post a Comment