开发者

Youtube videos observe onclick

开发者 https://www.devze.com 2023-03-20 18:38 出处:网络
I\'m trying to handle an event when the user click on a Youtube embedded videos to start them. Each video is included in a <li> element which, again, is included in a <div> container.

I'm trying to handle an event when the user click on a Youtube embedded videos to start them. Each video is included in a <li> element which, again, is included in a <div> container. Like:

<div class="container">
<ul>
<li><embed src="..."></embed></li>
<li><embed src="..."></embed></li>
</ul>
</div>

This container is a prototype scroller which automatically go next after a time (by setInterval). I want that, on observe (click) on videos, the autoScroll stops (by clearInterval).

Neither observing clicking on embed or li elements works but, with Firefox, the observing on the container element works, allowing me to clear the interval.

The problem is that only Firefox works, other browsers don't get the observe method on it.

Any so开发者_JAVA百科lution?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号