diff --git a/player/update.coffee b/player/update.coffee index eda70405..92fdb2ec 100644 --- a/player/update.coffee +++ b/player/update.coffee @@ -65,7 +65,7 @@ window.handleMediaUpdate = (data) -> if data.paused and not PLAYER.paused PLAYER.seekTo(data.currentTime) PLAYER.pause() - else if PLAYER.paused + else if PLAYER.paused and not data.paused PLAYER.play() PLAYER.getTime((seconds) -> diff --git a/www/js/player.js b/www/js/player.js index bf173551..bf5f96b3 100644 --- a/www/js/player.js +++ b/www/js/player.js @@ -1142,7 +1142,7 @@ if (data.paused && !PLAYER.paused) { PLAYER.seekTo(data.currentTime); PLAYER.pause(); - } else if (PLAYER.paused) { + } else if (PLAYER.paused && !data.paused) { PLAYER.play(); } return PLAYER.getTime(function(seconds) { diff --git a/www/js/util.js b/www/js/util.js index b24387de..b0d4e5fd 100644 --- a/www/js/util.js +++ b/www/js/util.js @@ -1378,10 +1378,10 @@ function sendVideoUpdate() { } PLAYER.getTime(function (seconds) { socket.emit("mediaUpdate", { - id: PLAYER.videoId, + id: PLAYER.mediaId, currentTime: seconds, paused: PLAYER.paused, - type: PLAYER.type + type: PLAYER.mediaType }); }); }