Reduce amount of data sent in media updates
This commit is contained in:
parent
69550c7a51
commit
ce99233596
6 changed files with 10 additions and 10 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue