1.0.1 • Published 7 years ago

angular-youtube-lite v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

angular-youtube-lite

Module provide responsive youtube iframe component, to help you embed youtube video in your angular application. Designed for application which doesn't need to use Youtube API.

Installation

npm install --save angular-youtube-lite

Usage

angular.module('app', ['angular-youtube-lite']);

According to rscss layouts definition, you should define your own video container.

.custome-youtube-container {
    width: 50%;
}
<div class="custome-youtube-container">
    <youtube video-id="zYcZC-rcYrc"></youtube>
</div>

The embedded video will stretch to fill your container's width size.

Attributes

AttributesDescriptionDefaultValueType
video-idYoutube video's IDNoneString
playlistList of Youtube video's IDs, separated by commasNoneString
playlist-idYoutube playlist's IDNoneString
hide-logoHide Youtube logo on embedded iframeFalseBoolean
colorColor theme of Youtube iframe, available values: "white","red""red"String
autoplayAutoplay video when the youtube player loadedFalseBoolean
turn-cc-onIf turn-cc-on="true", turn on CC when video start palying, else, use user's reference settings on YoutubeFalseBoolean
related-videoIf related-video="false", Youtube iframe doesn't show related video when video ends.TrueBoolean

For more information, checkout demo page

Credits

Sergey Kupletsky's CodePen

License

MIT