Skip to content

Latest commit

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

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

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

Description of attributes

AttributeDescriptionRequiredExample
ngModelAn angular model containing the URLYes$scope.URL
widthThe desired width of the videoNo50% or 500px
heightThe desired height of the videoNo400
hide-controlsSet to hide YouTube player controlsNotrue
auto-playSet to autoplay video on webNotrue
show-infoSet false to hide YouTube titleNofalse
relSet false to not show related videosNofalse
modest-brandingSet to hide YouTube brand on controls barNotrue

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.

About

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

Resources

Stars

20 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages