diff --git a/www/assets/js/callbacks.js b/www/assets/js/callbacks.js
index f75c83a3..e9a9d027 100644
--- a/www/assets/js/callbacks.js
+++ b/www/assets/js/callbacks.js
@@ -617,12 +617,12 @@ Callbacks = {
},
changeMedia: function(data) {
+ console.log(data);
$("#currenttitle").text("Currently Playing: " + data.title);
- if(data.type != "sc" && MEDIATYPE == "sc")
+ if(data.type != "sc" && PLAYER.type == "sc")
// [](/goddamnitmango)
fixSoundcloudShit();
- if(data.type != MEDIATYPE) {
- MEDIATYPE = data.type;
+ if(data.type != PLAYER.type) {
PLAYER = new Media(data);
}
if(PLAYER.update) {
diff --git a/www/assets/js/media.js b/www/assets/js/media.js
index 585ba897..a4d11228 100644
--- a/www/assets/js/media.js
+++ b/www/assets/js/media.js
@@ -471,25 +471,21 @@ Media.prototype.removeOld = function() {
}
Media.prototype.hide = function() {
- if(this.type == "null") {
+ if(!/chrome/ig.test(navigator.userAgent)) {
return;
}
- this.getTime(function(seconds) {
- this.time = seconds;
- this.hidden = $("#ytapiplayer").detach();
- }.bind(this));
+ this.size = {
+ width: $("#ytapiplayer").attr("width"),
+ height: $("#ytapiplayer").attr("height")
+ };
+ $("#ytapiplayer").attr("width", 1)
+ .attr("height", 1);
}
Media.prototype.unhide = function() {
- if(this.type == "null") {
+ if(!/chrome/ig.test(navigator.userAgent)) {
return;
}
- this.hidden.appendTo($("#videodiv"));
- var data = {
- id: this.id,
- currentTime: this.time
- };
- setTimeout(function() { this.load(data); }.bind(this), 1000);
- delete this.hidden;
- delete this.time;
+ $("#ytapiplayer").attr("width", this.size.width)
+ .attr("height", this.size.height);
}
diff --git a/www/channel.html b/www/channel.html
index 48f32184..bfb314b6 100644
--- a/www/channel.html
+++ b/www/channel.html
@@ -289,6 +289,13 @@
+
+
+
+
+
+
+
@@ -296,16 +303,9 @@
-
-
-
-
-
-
-