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

Question: how can I detect when the timeline is manipulated?

germanger opened this issue · comments

Given this scenario:

  • Player is complety loaded (100% of the video is already loaded)
  • Player is in state "playing" (it already fired that event some time ago)

If the user clicks in the timeline (eg: in the middle, or 3/4 of it), the player will skip to that part without firing any events (no buffering because its already buffered, not playing because it is already playing).

How can I detect this situation?
Is "watching" the only way?

i'm not sure!

depending on your needs, you could potentially build your own progress bar and call seekTo when it's clicked. you can use player parameters to hide the standard controls

you could put a $watch on getCurrentTime(), but that seems fragile

let me know if you find a better way!