Add LIVESTREAM_CHROMELESS flag
This commit is contained in:
parent
9f030376b5
commit
aad8eef52b
4 changed files with 50 additions and 36 deletions
|
|
@ -25,6 +25,7 @@ var CHANNEL = {
|
|||
};
|
||||
|
||||
var PLAYER = false;
|
||||
var LIVESTREAM_CHROMELESS = false;
|
||||
var FLUIDLAYOUT = false;
|
||||
var VWIDTH;
|
||||
var VHEIGHT;
|
||||
|
|
|
|||
|
|
@ -794,29 +794,6 @@
|
|||
|
||||
})(Player);
|
||||
|
||||
window.LivestreamPlayer = LivestreamPlayer = (function(superClass) {
|
||||
extend(LivestreamPlayer, superClass);
|
||||
|
||||
function LivestreamPlayer(data) {
|
||||
if (!(this instanceof LivestreamPlayer)) {
|
||||
return new LivestreamPlayer(data);
|
||||
}
|
||||
this.load(data);
|
||||
}
|
||||
|
||||
LivestreamPlayer.prototype.load = function(data) {
|
||||
this.setMediaProperties(data);
|
||||
this.player = $('<iframe/>').attr({
|
||||
src: "https://cdn.livestream.com/embed/" + data.id + "?layout=4&color=0x000000&iconColorOver=0xe7e7e7&iconColor=0xcccccc",
|
||||
frameborder: '0'
|
||||
});
|
||||
return removeOld(this.player);
|
||||
};
|
||||
|
||||
return LivestreamPlayer;
|
||||
|
||||
})(Player);
|
||||
|
||||
window.twitchEventCallback = function(events) {
|
||||
if (!(PLAYER instanceof TwitchPlayer)) {
|
||||
return false;
|
||||
|
|
@ -941,6 +918,38 @@
|
|||
|
||||
})(Player);
|
||||
|
||||
window.LivestreamPlayer = LivestreamPlayer = (function(superClass) {
|
||||
extend(LivestreamPlayer, superClass);
|
||||
|
||||
function LivestreamPlayer(data) {
|
||||
if (!(this instanceof LivestreamPlayer)) {
|
||||
return new LivestreamPlayer(data);
|
||||
}
|
||||
this.load(data);
|
||||
}
|
||||
|
||||
LivestreamPlayer.prototype.load = function(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'
|
||||
};
|
||||
}
|
||||
return LivestreamPlayer.__super__.load.call(this, data);
|
||||
};
|
||||
|
||||
return LivestreamPlayer;
|
||||
|
||||
})(EmbedPlayer);
|
||||
|
||||
CUSTOM_EMBED_WARNING = 'This channel is embedding custom content from %link%. Since this content is not trusted, you must click "Embed" below to allow the content to be embedded.<hr>';
|
||||
|
||||
window.CustomEmbedPlayer = CustomEmbedPlayer = (function(superClass) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue