npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

angular-video-module

v0.0.2

Published

A reusable video module that includes the YouTube API automatically

Readme

angular-video-module

An Angular module to inject the YouTube API and embed a video

Installation

via Bower

$ bower install --save angular-video-module

or via NPM

$ npm install --save angular-video-module

or the simple way, by including /dist/angular-video-module.min.js and /dist/angular-video-module.css into the head of your HTML.

Usage

Follow these steps to get it working in your project. In src you can see a working example of the module and play around with it. Alternatively, just follow these steps.

Adding to your Angular project

You can add the module as a dependency after declaring your own module, like so:

angular
    .module('myApp', ['angular-video-module'])
    .config(config)
    .run(run);

The directive is now available to your app and can be used in your HTML.

HTML

To include the directive, use the following markup:

<video-player
    src="ScMzIvxBSi4"
    posterframe="https://placeholdit.imgix.net/~text?txtsize=33&txt=Click-to-play&w=560&h=315"
    autoplay="0"
    loading-message="Loading..."
    additional-class="myClass myOtherClass">
</video-player>

At the moment, the video player only accepts the ID of a YouTube video, which much be supplied with the src param.

Calling events on the video player

Should you need to call an event on the video player, you can call the following events:

  • video.playing
  • video.paused
  • video.ended

Each can be called as like so:

$scope.$on("video.playing", function(){
    // perform action
});

Styling

As this requires some CSS to handle the responsiveness of the module, some CSS has been included. As everyone has their own take on SASS/pre-processors/post-processors/etc, this module does not dictate a specific CSS build tool, instead allowing you to integrate the existing CSS into your own environment.

For that reason, the CSS in the project is supplied un-minified to allow you to read and amend where requried for faster development, without the need to trawl the uncompiled source.

The default styling here uses a BEM pattern for styling.

Support

This module has been developed to support versions of Angular from 1.2.2 up to 1.4.5 - If IE8 support is required please make sure to use Angular 1.2.

Browser Support

This module has been developed to support all modern browsers will providing legacy support for IE8 and up.

Development

If you wish to contribute or amend the source files and recompile you can do so by running the local development tasks.

You will need to install the dependencies by running npm install then run the default gulp task by running gulp. This will create a local server and run the uncompiled version of the assets. The files are then visible at: http://localhost:8001

Unit tests are still to be added.

Roadmap

  • Unit tests
  • Add Vimeo support
  • Add Native HTML5 Video support