mirror of https://github.com/calzoneman/sync.git
Rename Hitbox -> Smashcast
This commit is contained in:
parent
55b03d51d7
commit
d23b5278b1
|
@ -16,7 +16,7 @@ var order = [
|
|||
'livestream.com.coffee',
|
||||
'custom-embed.coffee',
|
||||
'rtmp.coffee',
|
||||
'hitbox.coffee',
|
||||
'smashcast.coffee',
|
||||
'ustream.coffee',
|
||||
'imgur.coffee',
|
||||
'gdrive-youtube.coffee',
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"author": "Calvin Montgomery",
|
||||
"name": "CyTube",
|
||||
"description": "Online media synchronizer and chat",
|
||||
"version": "3.36.2",
|
||||
"version": "3.36.3",
|
||||
"repository": {
|
||||
"url": "http://github.com/calzoneman/sync"
|
||||
},
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
window.HitboxPlayer = class HitboxPlayer extends EmbedPlayer
|
||||
constructor: (data) ->
|
||||
if not (this instanceof HitboxPlayer)
|
||||
return new HitboxPlayer(data)
|
||||
|
||||
@load(data)
|
||||
|
||||
load: (data) ->
|
||||
data.meta.embed =
|
||||
src: "https://www.hitbox.tv/embed/#{data.id}"
|
||||
tag: 'iframe'
|
||||
super(data)
|
|
@ -0,0 +1,12 @@
|
|||
window.SmashcastPlayer = class SmashcastPlayer extends EmbedPlayer
|
||||
constructor: (data) ->
|
||||
if not (this instanceof SmashcastPlayer)
|
||||
return new SmashcastPlayer(data)
|
||||
|
||||
@load(data)
|
||||
|
||||
load: (data) ->
|
||||
data.meta.embed =
|
||||
src: "https://www.smashcast.tv/embed/#{data.id}"
|
||||
tag: 'iframe'
|
||||
super(data)
|
|
@ -12,7 +12,7 @@ TYPE_MAP =
|
|||
tv: TwitchPlayer
|
||||
cu: CustomEmbedPlayer
|
||||
rt: RTMPPlayer
|
||||
hb: HitboxPlayer
|
||||
hb: SmashcastPlayer
|
||||
us: UstreamPlayer
|
||||
im: ImgurPlayer
|
||||
vm: VideoJSPlayer
|
||||
|
|
|
@ -519,7 +519,7 @@ var Getters = {
|
|||
});
|
||||
},
|
||||
|
||||
/* hitbox.tv */
|
||||
/* hitbox.tv / smashcast.tv */
|
||||
hb: function (id, callback) {
|
||||
var m = id.match(/([\w-]+)/);
|
||||
if (m) {
|
||||
|
@ -528,7 +528,7 @@ var Getters = {
|
|||
callback("Invalid ID", null);
|
||||
return;
|
||||
}
|
||||
var title = "Hitbox.tv - " + id;
|
||||
var title = "Smashcast - " + id;
|
||||
var media = new Media(id, title, "--:--", "hb");
|
||||
callback(false, media);
|
||||
},
|
||||
|
|
|
@ -239,7 +239,7 @@
|
|||
case "fi":
|
||||
return id;
|
||||
case "hb":
|
||||
return "https://hitbox.tv/" + id;
|
||||
return "https://www.smashcast.tv/" + id;
|
||||
case "hl":
|
||||
return id;
|
||||
case "sb":
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
(function() {
|
||||
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,
|
||||
var CUSTOM_EMBED_WARNING, CustomEmbedPlayer, DEFAULT_ERROR, DailymotionPlayer, EmbedPlayer, FilePlayer, GoogleDrivePlayer, GoogleDriveYouTubePlayer, HLSPlayer, ImgurPlayer, LivestreamPlayer, Player, RTMPPlayer, SmashcastPlayer, 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
|
@ -1234,25 +1234,25 @@
|
|||
|
||||
})(VideoJSPlayer);
|
||||
|
||||
window.HitboxPlayer = HitboxPlayer = (function(superClass) {
|
||||
extend(HitboxPlayer, superClass);
|
||||
window.SmashcastPlayer = SmashcastPlayer = (function(superClass) {
|
||||
extend(SmashcastPlayer, superClass);
|
||||
|
||||
function HitboxPlayer(data) {
|
||||
if (!(this instanceof HitboxPlayer)) {
|
||||
return new HitboxPlayer(data);
|
||||
function SmashcastPlayer(data) {
|
||||
if (!(this instanceof SmashcastPlayer)) {
|
||||
return new SmashcastPlayer(data);
|
||||
}
|
||||
this.load(data);
|
||||
}
|
||||
|
||||
HitboxPlayer.prototype.load = function(data) {
|
||||
SmashcastPlayer.prototype.load = function(data) {
|
||||
data.meta.embed = {
|
||||
src: "https://www.hitbox.tv/embed/" + data.id,
|
||||
src: "https://www.smashcast.tv/embed/" + data.id,
|
||||
tag: 'iframe'
|
||||
};
|
||||
return HitboxPlayer.__super__.load.call(this, data);
|
||||
return SmashcastPlayer.__super__.load.call(this, data);
|
||||
};
|
||||
|
||||
return HitboxPlayer;
|
||||
return SmashcastPlayer;
|
||||
|
||||
})(EmbedPlayer);
|
||||
|
||||
|
@ -1514,7 +1514,7 @@
|
|||
tv: TwitchPlayer,
|
||||
cu: CustomEmbedPlayer,
|
||||
rt: RTMPPlayer,
|
||||
hb: HitboxPlayer,
|
||||
hb: SmashcastPlayer,
|
||||
us: UstreamPlayer,
|
||||
im: ImgurPlayer,
|
||||
vm: VideoJSPlayer,
|
||||
|
|
|
@ -49,7 +49,7 @@ function formatURL(data) {
|
|||
case "fi":
|
||||
return data.id;
|
||||
case "hb":
|
||||
return "https://hitbox.tv/" + data.id;
|
||||
return "https://www.smashcast.tv/" + data.id;
|
||||
case "hl":
|
||||
return data.id;
|
||||
case "sb":
|
||||
|
@ -1324,7 +1324,7 @@ function parseMediaLink(url) {
|
|||
};
|
||||
}
|
||||
|
||||
if ((m = url.match(/hitbox\.tv\/([^\?&#]+)/))) {
|
||||
if ((m = url.match(/(?:hitbox|smashcast)\.tv\/([^\?&#]+)/))) {
|
||||
return {
|
||||
id: m[1],
|
||||
type: "hb"
|
||||
|
|
Loading…
Reference in New Issue