Reduce amount of data sent in media updates

This commit is contained in:
calzoneman 2013-05-14 11:35:11 -04:00
parent 69550c7a51
commit ce99233596
6 changed files with 10 additions and 10 deletions

View file

@ -628,7 +628,7 @@ function synchtubeLayout() {
}
function onYouTubeIframeAPIReady() {
if(!PLAYER)
if(PLAYER.type == "null")
PLAYER = new Media({id: "", type: "yt"});
if(USEROPTS.layout == "fluid") {
fluidLayout();

View file

@ -51,6 +51,7 @@ Media.prototype.nullPlayer = function() {
Media.prototype.initYouTube = function() {
this.removeOld();
console.log("init YouTube");
this.player = new YT.Player("ytapiplayer", {
height: VHEIGHT,
width: VWIDTH,
@ -60,7 +61,7 @@ Media.prototype.initYouTube = function() {
"controls": 1,
},
events: {
onPlayerReady: function() {
onReady: function() {
socket.emit("playerReady");
},
onStateChange: function(ev) {