Rename Hitbox -> Smashcast

This commit is contained in:
Calvin Montgomery 2017-05-20 16:50:00 -07:00
parent 55b03d51d7
commit d23b5278b1
9 changed files with 31 additions and 31 deletions

View file

@ -16,7 +16,7 @@ var order = [
'livestream.com.coffee', 'livestream.com.coffee',
'custom-embed.coffee', 'custom-embed.coffee',
'rtmp.coffee', 'rtmp.coffee',
'hitbox.coffee', 'smashcast.coffee',
'ustream.coffee', 'ustream.coffee',
'imgur.coffee', 'imgur.coffee',
'gdrive-youtube.coffee', 'gdrive-youtube.coffee',

View file

@ -2,7 +2,7 @@
"author": "Calvin Montgomery", "author": "Calvin Montgomery",
"name": "CyTube", "name": "CyTube",
"description": "Online media synchronizer and chat", "description": "Online media synchronizer and chat",
"version": "3.36.2", "version": "3.36.3",
"repository": { "repository": {
"url": "http://github.com/calzoneman/sync" "url": "http://github.com/calzoneman/sync"
}, },

View file

@ -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)

12
player/smashcast.coffee Normal file
View file

@ -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)

View file

@ -12,7 +12,7 @@ TYPE_MAP =
tv: TwitchPlayer tv: TwitchPlayer
cu: CustomEmbedPlayer cu: CustomEmbedPlayer
rt: RTMPPlayer rt: RTMPPlayer
hb: HitboxPlayer hb: SmashcastPlayer
us: UstreamPlayer us: UstreamPlayer
im: ImgurPlayer im: ImgurPlayer
vm: VideoJSPlayer vm: VideoJSPlayer

View file

@ -519,7 +519,7 @@ var Getters = {
}); });
}, },
/* hitbox.tv */ /* hitbox.tv / smashcast.tv */
hb: function (id, callback) { hb: function (id, callback) {
var m = id.match(/([\w-]+)/); var m = id.match(/([\w-]+)/);
if (m) { if (m) {
@ -528,7 +528,7 @@ var Getters = {
callback("Invalid ID", null); callback("Invalid ID", null);
return; return;
} }
var title = "Hitbox.tv - " + id; var title = "Smashcast - " + id;
var media = new Media(id, title, "--:--", "hb"); var media = new Media(id, title, "--:--", "hb");
callback(false, media); callback(false, media);
}, },

View file

@ -239,7 +239,7 @@
case "fi": case "fi":
return id; return id;
case "hb": case "hb":
return "https://hitbox.tv/" + id; return "https://www.smashcast.tv/" + id;
case "hl": case "hl":
return id; return id;
case "sb": case "sb":

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, 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; }, 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;
@ -1234,25 +1234,25 @@
})(VideoJSPlayer); })(VideoJSPlayer);
window.HitboxPlayer = HitboxPlayer = (function(superClass) { window.SmashcastPlayer = SmashcastPlayer = (function(superClass) {
extend(HitboxPlayer, superClass); extend(SmashcastPlayer, superClass);
function HitboxPlayer(data) { function SmashcastPlayer(data) {
if (!(this instanceof HitboxPlayer)) { if (!(this instanceof SmashcastPlayer)) {
return new HitboxPlayer(data); return new SmashcastPlayer(data);
} }
this.load(data); this.load(data);
} }
HitboxPlayer.prototype.load = function(data) { SmashcastPlayer.prototype.load = function(data) {
data.meta.embed = { data.meta.embed = {
src: "https://www.hitbox.tv/embed/" + data.id, src: "https://www.smashcast.tv/embed/" + data.id,
tag: 'iframe' tag: 'iframe'
}; };
return HitboxPlayer.__super__.load.call(this, data); return SmashcastPlayer.__super__.load.call(this, data);
}; };
return HitboxPlayer; return SmashcastPlayer;
})(EmbedPlayer); })(EmbedPlayer);
@ -1514,7 +1514,7 @@
tv: TwitchPlayer, tv: TwitchPlayer,
cu: CustomEmbedPlayer, cu: CustomEmbedPlayer,
rt: RTMPPlayer, rt: RTMPPlayer,
hb: HitboxPlayer, hb: SmashcastPlayer,
us: UstreamPlayer, us: UstreamPlayer,
im: ImgurPlayer, im: ImgurPlayer,
vm: VideoJSPlayer, vm: VideoJSPlayer,

View file

@ -49,7 +49,7 @@ function formatURL(data) {
case "fi": case "fi":
return data.id; return data.id;
case "hb": case "hb":
return "https://hitbox.tv/" + data.id; return "https://www.smashcast.tv/" + data.id;
case "hl": case "hl":
return data.id; return data.id;
case "sb": case "sb":
@ -1324,7 +1324,7 @@ function parseMediaLink(url) {
}; };
} }
if ((m = url.match(/hitbox\.tv\/([^\?&#]+)/))) { if ((m = url.match(/(?:hitbox|smashcast)\.tv\/([^\?&#]+)/))) {
return { return {
id: m[1], id: m[1],
type: "hb" type: "hb"