Add imgur and ustream
This commit is contained in:
parent
8dd3280305
commit
b34f972629
4 changed files with 74 additions and 2 deletions
12
player/imgur.coffee
Normal file
12
player/imgur.coffee
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
window.ImgurPlayer = class ImgurPlayer extends CustomEmbedPlayer
|
||||
constructor: (data) ->
|
||||
if not (this instanceof ImgurPlayer)
|
||||
return new ImgurPlayer(data)
|
||||
|
||||
@load(data)
|
||||
|
||||
load: (data) ->
|
||||
data.meta.embed =
|
||||
tag: 'iframe'
|
||||
src: "https://imgur.com/a/#{data.id}/embed"
|
||||
super(data)
|
||||
|
|
@ -10,6 +10,8 @@ TYPE_MAP =
|
|||
cu: CustomEmbedPlayer
|
||||
rt: RTMPPlayer
|
||||
hb: HitboxPlayer
|
||||
us: UstreamPlayer
|
||||
im: ImgurPlayer
|
||||
|
||||
window.loadMediaPlayer = (data) ->
|
||||
if data.type of TYPE_MAP
|
||||
|
|
|
|||
12
player/ustream.coffee
Normal file
12
player/ustream.coffee
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
window.UstreamPlayer = class UstreamPlayer extends CustomEmbedPlayer
|
||||
constructor: (data) ->
|
||||
if not (this instanceof UstreamPlayer)
|
||||
return new UstreamPlayer(data)
|
||||
|
||||
@load(data)
|
||||
|
||||
load: (data) ->
|
||||
data.meta.embed =
|
||||
tag: 'iframe'
|
||||
src: "https://www.ustream.tv/embed/#{data.id}?v=3&wmode=direct&autoplay=1"
|
||||
super(data)
|
||||
Loading…
Add table
Add a link
Reference in a new issue