Add LIVESTREAM_CHROMELESS flag

This commit is contained in:
Calvin Montgomery 2015-07-05 14:00:59 -07:00
parent 9f030376b5
commit aad8eef52b
4 changed files with 50 additions and 36 deletions

View file

@ -1,4 +1,4 @@
window.LivestreamPlayer = class LivestreamPlayer extends Player
window.LivestreamPlayer = class LivestreamPlayer extends EmbedPlayer
constructor: (data) ->
if not (this instanceof LivestreamPlayer)
return new LivestreamPlayer(data)
@ -6,14 +6,18 @@ window.LivestreamPlayer = class LivestreamPlayer extends Player
@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)
if LIVESTREAM_CHROMELESS
data.meta.embed =
src: 'https://cdn.livestream.com/chromelessPlayer/v20/playerapi.swf'
tag: 'object'
params:
flashvars: "channel=#{data.id}"
else
data.meta.embed =
src: "https://cdn.livestream.com/embed/#{data.id}?\
layout=4&\
color=0x000000&\
iconColorOver=0xe7e7e7&\
iconColor=0xcccccc"
tag: 'iframe'
super(data)