Embed videos using AngularJS directives
A small project I've started while learning angularJS. It has no real purpose other than educational.
$ bower install ng-videosharing-embed
Once installed, add videosharing-embed as a dependency in your module:
angular.module('myModule', ['videosharing-embed']);
- AngularJS v1.0.0+ is supported
- Youtube (iframe)
- Youtube no cookies (iframe)
- Dailymotion (iframe)
- Vimeo (iframe)
Generic
<embed-video href="<videoUrl>" width=xxx height=xxx [options]></embed-video>
Example
<embed-video data-ng-href="http://www.youtube.com/watch?v=LOKyEt36Kjc" controls=0><a href="http://www.youtube.com/watch?v=LOKyEt36Kjc">Watch</a></embed-video>
Player's options are unique for each video source. For a list of available options, take a look at src/angular-embedplayer.js