JSPM

angular-video

0.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 244
  • Score
    100M100P100Q81285F
  • License MIT

A directive that takes in a vimeo or a youtube url and converts it into an embedded friendly url and the displays it.

Package Exports

  • angular-video

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (angular-video) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

angular-video

A directive that takes in a vimeo or a youtube url and converts it into an embedded friendly url and the displays it.

###Contributing angular-video is a free and open source library, and we appreciate any help you're willing to give.

What it does

  • Converts any url into an embedded friendly url (according to vimeo's and youtube's preference)
  • Gets the trusted resource url using angular's trustAsResourceUrl() functionality

Available url formats

Getting Started

Download the code, and include the anguvideo.js file in your page. Then add the angvideo module to your Angular App file, e.g.

var app = angular.module('app', ["anguvideo"]);

Usage

<anguvideo ng-model="modelContainingURL" width="100%" height="200"></anguvideo>
<div anguvideo ng-model="modelContainingURL" width="250" height="250"></div>

Description of attributes

Attribute Description Required Example
ngModel An angular model containing the URL Yes $scope.URL
width The desired width of the video No 50% or 500px
height The desired height of the video No 400
hideControls Set to hide YouTube title and player controls No true

License

The anguvideo project is covered by the MIT License.

The MIT License (MIT)

Copyright (c) 2014 Mariandi Stylianou, and contributors to the angular-video project.