Remove some legacy cruft
This commit is contained in:
parent
7214b7c474
commit
394f03ee1c
7 changed files with 15 additions and 90 deletions
|
|
@ -24,27 +24,10 @@ window.EmbedPlayer = class EmbedPlayer extends Player
|
|||
console.error('EmbedPlayer::load(): missing meta.embed')
|
||||
return
|
||||
|
||||
if embed.tag == 'object'
|
||||
@player = @loadObject(embed)
|
||||
else
|
||||
@player = @loadIframe(embed)
|
||||
@player = @loadIframe(embed)
|
||||
|
||||
removeOld(@player)
|
||||
|
||||
loadObject: (embed) ->
|
||||
object = $('<object/>').attr(
|
||||
type: 'application/x-shockwave-flash'
|
||||
data: embed.src
|
||||
wmode: 'opaque'
|
||||
)
|
||||
genParam('allowfullscreen', 'true').appendTo(object)
|
||||
genParam('allowscriptaccess', 'always').appendTo(object)
|
||||
|
||||
for key, value of embed.params
|
||||
genParam(key, value).appendTo(object)
|
||||
|
||||
return object
|
||||
|
||||
loadIframe: (embed) ->
|
||||
if embed.src.indexOf('http:') == 0 and location.protocol == 'https:'
|
||||
if @__proto__.mixedContentError?
|
||||
|
|
|
|||
|
|
@ -6,18 +6,11 @@ window.LivestreamPlayer = class LivestreamPlayer extends EmbedPlayer
|
|||
@load(data)
|
||||
|
||||
load: (data) ->
|
||||
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'
|
||||
data.meta.embed =
|
||||
src: "https://cdn.livestream.com/embed/#{data.id}?\
|
||||
layout=4&\
|
||||
color=0x000000&\
|
||||
iconColorOver=0xe7e7e7&\
|
||||
iconColor=0xcccccc"
|
||||
tag: 'iframe'
|
||||
super(data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue