Fix ustream embeds

This commit is contained in:
calzoneman 2015-07-07 19:30:39 -07:00
parent d1f21573e6
commit bba6b29483
2 changed files with 16 additions and 3 deletions

View file

@ -1,3 +1,10 @@
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.'
window.UstreamPlayer = class UstreamPlayer extends EmbedPlayer
constructor: (data) ->
if not (this instanceof UstreamPlayer)
@ -8,5 +15,7 @@ window.UstreamPlayer = class UstreamPlayer extends EmbedPlayer
load: (data) ->
data.meta.embed =
tag: 'iframe'
src: "https://www.ustream.tv/embed/#{data.id}?v=3&wmode=direct&autoplay=1"
src: "http://www.ustream.tv/embed/#{data.id}?v=3&wmode=direct&autoplay=1"
super(data)
mixedContentError: USTREAM_ERROR