mirror of https://github.com/calzoneman/sync.git
More fixes
This commit is contained in:
parent
3f81883994
commit
d1d7c8dd05
|
@ -11,27 +11,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|||
|
||||
var VIMEO_FLASH = false;
|
||||
|
||||
var constructors = {
|
||||
"yt": YouTubePlayer,
|
||||
"vi": VIMEO_FLASH ? VimeoFlashPlayer : VimeoPlayer,
|
||||
"dm": DailymotionPlayer,
|
||||
"sc": SoundcloudPlayer,
|
||||
"li": LivestreamPlayer,
|
||||
"tw": TwitchTVPlayer,
|
||||
"jt": JustinTVPlayer,
|
||||
"us": UstreamPlayer,
|
||||
"rt": RTMPPlayer,
|
||||
"im": ImgurPlayer,
|
||||
"cu": CustomPlayer
|
||||
};
|
||||
|
||||
function loadMediaPlayer(data) {
|
||||
if(data.type in constructors) {
|
||||
PLAYER = new constructors[data.type](data);
|
||||
PLAYER.type = data.type;
|
||||
}
|
||||
}
|
||||
|
||||
function removeOld(replace) {
|
||||
replace = replace || $("<div/>");
|
||||
var old = $("#ytapiplayer");
|
||||
|
@ -793,3 +772,24 @@ function handleMediaUpdate(data) {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
var constructors = {
|
||||
"yt": YouTubePlayer,
|
||||
"vi": VIMEO_FLASH ? VimeoFlashPlayer : VimeoPlayer,
|
||||
"dm": DailymotionPlayer,
|
||||
"sc": SoundcloudPlayer,
|
||||
"li": LivestreamPlayer,
|
||||
"tw": TwitchTVPlayer,
|
||||
"jt": JustinTVPlayer,
|
||||
"us": UstreamPlayer,
|
||||
"rt": RTMPPlayer,
|
||||
"im": ImgurPlayer,
|
||||
"cu": CustomPlayer
|
||||
};
|
||||
|
||||
function loadMediaPlayer(data) {
|
||||
if(data.type in constructors) {
|
||||
PLAYER = new constructors[data.type](data);
|
||||
PLAYER.type = data.type;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue