Add livestream.com player

This commit is contained in:
calzoneman 2015-06-16 12:50:17 -04:00
parent 480497bea4
commit cf5756227d
3 changed files with 46 additions and 2 deletions

View file

@ -0,0 +1,19 @@
window.LivestreamPlayer = class LivestreamPlayer extends Player
constructor: (data) ->
if not (this instanceof LivestreamPlayer)
return new LivestreamPlayer(data)
@load(data)
load: (data) ->
@setMediaProperties(data)
@player = $('<iframe/>').attr(
src: "https://cdn.livestream.com/embed/#{data.id}?\
layout=4&\
color=0x000000&\
iconColorOver=0xe7e7e7&\
iconColor=0xcccccc"
frameborder: '0'
)
removeOld(@player)

View file

@ -5,6 +5,7 @@ TYPE_MAP =
gd: VideoJSPlayer
gp: VideoJSPlayer
sc: SoundCloudPlayer
li: LivestreamPlayer
window.loadMediaPlayer = (data) ->
if data.type of TYPE_MAP