Skip to content

AngularJS directives for simply embed media player such as flash, twitch, justin.

Notifications You must be signed in to change notification settings

angleman/angularjs-media

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AngularJS Media Directives

Features

Simply embed media such as flash, twitch, justin player with simple html components.

Simple demo: /app

Requirements

  • AngularJS, tested on 1.0.7.

Installation

var app = angular.module('app', ['angularjs.media.directives']);

Usage

To embed flash player:

  <flash width="270" height="60" src="files/Inter-banner.swf"></flash>
  <flash width="270" height="60" src="files/AMD-banner.swf"></flash>
  <flash width="270" height="60" src="files/MSI-banner.swf"></flash>

Param:

  • src - {expression} - passing string url to convert to flash player.

To embed youtube player:

  <youtube width="466" height="250" v="BlQ2tMQzg80" start="16" end="30" autoplay="0"></youtube>
  <youtube width="466" height="250" v="BlQ2tMQzg80" params="?autoplay=1&start=25"></youtube>
  <youtube width="466" height="250" v="{{firstVideo}}" start="64" end="120" autoplay="1"></youtube>
  <youtube width="466" height="250" v="{{firstVideo}}?autoplay=1&start=90&end=120"></youtube>

Params:

  • v - {template} - passing v code to convert youtube embed player.
  • start - {expression} - passing number setup start time.
  • end - {expression} - passing number setup end time.
  • autoplay - {expression} - passing 0 or (true|1) for auto start.
  • params - {template} - passing string to setup by single attribute.

Notice: If <youtube params=""> already setup, then passing variable directly.


To embed twitch player and chatroom:

  <twitch width="600" height="400" channel="honeydotcakes"></twitch>
  <iframe width="300" height="400" twitch-chat channel="honeydotcakes"></iframe>

Params:

  • channel - {template} - passing string of channel name.
  • twitch-chat - (attribute) - identify iframe element to embed chatroom.

Notice: Chatroom directive can be twitch-chat and channel or twitch-chat-channel self alone.


To embed justin player and chatroom:

  <justin width="600" height="400" channel="ms_yuyu"></justin>
  <iframe width="300" height="400" justin-chat-channel="ms_yuyu"></iframe>

Params:

  • channel - {template} - passing string of channel name.
  • justin-chat - (attribute) - identify iframe element to embed chatroom.

Notice: Chatroom directive can be justin-chat and channel or justin-chat-channel self alone.

References

About

AngularJS directives for simply embed media player such as flash, twitch, justin.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%