Fix ustream to be https

This commit is contained in:
Calvin Montgomery 2017-01-05 20:31:20 -08:00
parent 31880fa625
commit 5f4e9076df
2 changed files with 3 additions and 16 deletions

View File

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

View File

@ -1,5 +1,5 @@
(function() { (function() {
var CUSTOM_EMBED_WARNING, CustomEmbedPlayer, DEFAULT_ERROR, DailymotionPlayer, EmbedPlayer, FilePlayer, GoogleDrivePlayer, GoogleDriveYouTubePlayer, HLSPlayer, HitboxPlayer, ImgurPlayer, LivestreamPlayer, Player, RTMPPlayer, SoundCloudPlayer, TYPE_MAP, TwitchPlayer, USTREAM_ERROR, UstreamPlayer, VideoJSPlayer, VimeoPlayer, YouTubePlayer, codecToMimeType, genParam, sortSources, var CUSTOM_EMBED_WARNING, CustomEmbedPlayer, DEFAULT_ERROR, DailymotionPlayer, EmbedPlayer, FilePlayer, GoogleDrivePlayer, GoogleDriveYouTubePlayer, HLSPlayer, HitboxPlayer, ImgurPlayer, LivestreamPlayer, Player, RTMPPlayer, SoundCloudPlayer, TYPE_MAP, TwitchPlayer, UstreamPlayer, VideoJSPlayer, VimeoPlayer, YouTubePlayer, codecToMimeType, genParam, sortSources,
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty; hasProp = {}.hasOwnProperty;
@ -1258,8 +1258,6 @@
})(EmbedPlayer); })(EmbedPlayer);
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 = UstreamPlayer = (function(superClass) { window.UstreamPlayer = UstreamPlayer = (function(superClass) {
extend(UstreamPlayer, superClass); extend(UstreamPlayer, superClass);
@ -1273,13 +1271,11 @@
UstreamPlayer.prototype.load = function(data) { UstreamPlayer.prototype.load = function(data) {
data.meta.embed = { data.meta.embed = {
tag: 'iframe', tag: 'iframe',
src: "http://www.ustream.tv/embed/" + data.id + "?v=3&wmode=direct&autoplay=1" src: "https://www.ustream.tv/embed/" + data.id + "?html5ui&autoplay=1"
}; };
return UstreamPlayer.__super__.load.call(this, data); return UstreamPlayer.__super__.load.call(this, data);
}; };
UstreamPlayer.prototype.mixedContentError = USTREAM_ERROR;
return UstreamPlayer; return UstreamPlayer;
})(EmbedPlayer); })(EmbedPlayer);