Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
ng-videosharing-embed
Advanced tools
Embed videos using AngularJS directives
A small project I've started while learning angularJS. It has no real purpose other than educational.
http://erost.net/ng-videosharing-embed/
$ bower install ng-videosharing-embed
$ npm install ng-videosharing-embed
Once installed, add videosharing-embed as a dependency in your module:
angular.module('myModule', ['videosharing-embed']);
Note on JS API:
Each iframe should be identified with a unique id. That ID can be configured by iframe-id
Example
<embed-video iframe-id="vimeo1" api="1" player_id="vimeo1" ng-href="//vimeo.com/111690998"><a href="//vimeo.com/111690998">Watch</a></embed-video>
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>
Callback example
<embed-video data-ng-href="{{videoUrl}}" on-change="videoSelected(videoId, provider)" controls=0><a href="http://www.youtube.com/watch?v=LOKyEt36Kjc">Watch</a></embed-video>
...
$scope.videoSelected = function(videoId, provider) {
if (videoId) {
console.log("Video from " + provider + " with id " + videoId + " was selected");
} else {
console.log("No valid URL entered");
}
}
...
Player's options are unique for each video source. For a list of available options, take a look at src/angular-embedplayer.js, or the player official documentation
FAQs
Embed videos using AngularJS directives
The npm package ng-videosharing-embed receives a total of 177 weekly downloads. As such, ng-videosharing-embed popularity was classified as not popular.
We found that ng-videosharing-embed demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.