mirror of https://github.com/calzoneman/sync.git
Add LIVESTREAM_CHROMELESS flag
This commit is contained in:
parent
9f030376b5
commit
aad8eef52b
|
@ -10,9 +10,9 @@ var order = [
|
||||||
'videojs.coffee',
|
'videojs.coffee',
|
||||||
'raw-file.coffee',
|
'raw-file.coffee',
|
||||||
'soundcloud.coffee',
|
'soundcloud.coffee',
|
||||||
'livestream.com.coffee',
|
|
||||||
'twitch.coffee',
|
'twitch.coffee',
|
||||||
'embed.coffee',
|
'embed.coffee',
|
||||||
|
'livestream.com.coffee',
|
||||||
'custom-embed.coffee',
|
'custom-embed.coffee',
|
||||||
'rtmp.coffee',
|
'rtmp.coffee',
|
||||||
'hitbox.coffee',
|
'hitbox.coffee',
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
window.LivestreamPlayer = class LivestreamPlayer extends Player
|
window.LivestreamPlayer = class LivestreamPlayer extends EmbedPlayer
|
||||||
constructor: (data) ->
|
constructor: (data) ->
|
||||||
if not (this instanceof LivestreamPlayer)
|
if not (this instanceof LivestreamPlayer)
|
||||||
return new LivestreamPlayer(data)
|
return new LivestreamPlayer(data)
|
||||||
|
@ -6,14 +6,18 @@ window.LivestreamPlayer = class LivestreamPlayer extends Player
|
||||||
@load(data)
|
@load(data)
|
||||||
|
|
||||||
load: (data) ->
|
load: (data) ->
|
||||||
@setMediaProperties(data)
|
if LIVESTREAM_CHROMELESS
|
||||||
|
data.meta.embed =
|
||||||
@player = $('<iframe/>').attr(
|
src: 'https://cdn.livestream.com/chromelessPlayer/v20/playerapi.swf'
|
||||||
src: "https://cdn.livestream.com/embed/#{data.id}?\
|
tag: 'object'
|
||||||
layout=4&\
|
params:
|
||||||
color=0x000000&\
|
flashvars: "channel=#{data.id}"
|
||||||
iconColorOver=0xe7e7e7&\
|
else
|
||||||
iconColor=0xcccccc"
|
data.meta.embed =
|
||||||
frameborder: '0'
|
src: "https://cdn.livestream.com/embed/#{data.id}?\
|
||||||
)
|
layout=4&\
|
||||||
removeOld(@player)
|
color=0x000000&\
|
||||||
|
iconColorOver=0xe7e7e7&\
|
||||||
|
iconColor=0xcccccc"
|
||||||
|
tag: 'iframe'
|
||||||
|
super(data)
|
||||||
|
|
|
@ -25,6 +25,7 @@ var CHANNEL = {
|
||||||
};
|
};
|
||||||
|
|
||||||
var PLAYER = false;
|
var PLAYER = false;
|
||||||
|
var LIVESTREAM_CHROMELESS = false;
|
||||||
var FLUIDLAYOUT = false;
|
var FLUIDLAYOUT = false;
|
||||||
var VWIDTH;
|
var VWIDTH;
|
||||||
var VHEIGHT;
|
var VHEIGHT;
|
||||||
|
|
|
@ -794,29 +794,6 @@
|
||||||
|
|
||||||
})(Player);
|
})(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) {
|
window.twitchEventCallback = function(events) {
|
||||||
if (!(PLAYER instanceof TwitchPlayer)) {
|
if (!(PLAYER instanceof TwitchPlayer)) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -941,6 +918,38 @@
|
||||||
|
|
||||||
})(Player);
|
})(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>';
|
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) {
|
window.CustomEmbedPlayer = CustomEmbedPlayer = (function(superClass) {
|
||||||
|
|
Loading…
Reference in New Issue