CyTube/player/ustream.coffee

22 lines
866 B
CoffeeScript
Raw Normal View History

2015-07-08 02:30:39 +00:00
USTREAM_ERROR = 'Ustream.tv\'s embed player only works over plain HTTP, but you are
viewing this page over secure HTTPS. Your browser therefore blocks the
ustream embed due to mixed content policy. In order to view ustream, you must
view this page over plain HTTP (change "https://" to "http://" in the address
bar)-- your websocket will still be connecting using secure HTTPS. This is
something that ustream needs to fix.'
2015-06-30 01:32:18 +00:00
window.UstreamPlayer = class UstreamPlayer extends EmbedPlayer
2015-06-21 14:39:16 +00:00
constructor: (data) ->
if not (this instanceof UstreamPlayer)
return new UstreamPlayer(data)
@load(data)
load: (data) ->
data.meta.embed =
tag: 'iframe'
2015-07-08 02:30:39 +00:00
src: "http://www.ustream.tv/embed/#{data.id}?v=3&wmode=direct&autoplay=1"
2015-06-21 14:39:16 +00:00
super(data)
2015-07-08 02:30:39 +00:00
mixedContentError: USTREAM_ERROR