brandly / angular-youtube-embed

:tv: Embed a YouTube player with a simple directive

Home Page:http://brandly.github.io/angular-youtube-embed/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

timeupdate Event

demetriusnunes opened this issue · comments

Hi there, would you be interested in merging a timeupdate pseudo-event implementation based on setInterval? This is a big gap when compared to most HTML5 video players out there.

hey! this project is definitely not like most HTML5 players out there. the underlying YouTube iFrame library i'm using supports flash as well.

i think, in specific applications that need to check such things, using setInterval or maybe something with $watch and player.getCurrentTime() could work. however, neither of those options are super cheap, so i'd rather not have it assumed.

since it's easy to detect when the video is playing or not, you can at least have the interval only running when it's actually player.

i like to think of this project as a wrapper around the YouTube iFrame API that makes it easy use with Angular, and since it's not built into that API, i'm hesitant to add it to this project. let me know if you think i'm wrong! :D

also this is somewhat related to #50

I guess you're right. It was not so hard to implement the timeupdate event on my generic videoPlayer component that wraps yours.

glad you got it working!