vincenzomerolla / angular-vimeo-embed

A simple AngularJS directive to embed Vimeo videos easily onto your website.
MIT License
12 stars 9 forks source link

Status of adding Javascript API to control the embedded player #3

Closed astanley86 closed 8 years ago

astanley86 commented 8 years ago

I am using this directive and it works great! However, I'm struggling to figure out how I can use ng-click to play my vimeo video when you click on a custom button. Seems like it should be easy but I'm a beginning developer. Thanks for any help you can provide.

vincenzomerolla commented 8 years ago

@astanley86 Hey! Thanks for the kudos.

I know this project hasn't gotten much attention on my part and I have been busy with other stuff, but I will update it soon and make much needed improvements. This includes supporting the API, providing better documentation, have the project implement UMD, and publish it to npm. If it's time-sensitive and you want to implement it yourself, you can look at Vimeo's documentation here.

It involves using the postMessage Web API to relay a message to the iframe's window object as shown here.

astanley86 commented 8 years ago

Thank you! I came up with a hack that will get me by in the mean time. I have the video autoplay and when I click my custom button I load the video into the DOM so that when it appears it, it starts playing :)

I look forward to the updates. Thanks for the quick response!