NamPNQ / bower-videogular-youtube

Videogular `youtube` plugin repository for distribution on `bower`
MIT License
41 stars 32 forks source link

Allow videos to start at a specified time #40

Closed idpaterson closed 9 years ago

idpaterson commented 9 years ago

This change simply allows the start parameter which directs YouTube to start the video at the specified number of seconds. This is required in our use case to resume a video that the user was watching earlier when the original directive had since been destroyed.

Sample usage:

<vg-video vg-src="config.sources" vg-youtube="rel=1;showinfo=1;start={{config.start}}"></vg-video>
<vg-media vg-src="config.sources" vg-youtube="start=30"></vg-media>
2fdevs commented 9 years ago

Thanks!

Accepted!

idpaterson commented 9 years ago

Thanks. That was perhaps a bit self-serving for me to add just one property, it could be nice to have a whitelist like ng-videosharing-embed (which I was using prior to videogular) so that any values supported in the iframe URL can be provided over the defaults. Unlike controls=0 which overrides default behavior in the YouTube player, start=0 really has no need to be sent in the player URL, this was just the easiest way to support it at the time.