cinera_player_pre.js: Only resume() if playing

This commit is contained in:
Matt Mascarenhas 2018-02-28 01:25:50 +00:00
parent e7aefbada0
commit 6f99a50f50
1 changed files with 4 additions and 1 deletions

View File

@ -118,8 +118,11 @@ Player.prototype.updateSize = function() {
this.markersContainer.style.height = height; this.markersContainer.style.height = height;
if (this.youtubePlayerReady) { if (this.youtubePlayerReady) {
this.youtubePlayer.setSize(Math.floor(width), Math.floor(height)); this.youtubePlayer.setSize(Math.floor(width), Math.floor(height));
if(this.playing)
{
this.resume(); this.resume();
} }
}
} }
// Stops the per-frame work that the player does. Call when you want to hide or get rid of the player. // Stops the per-frame work that the player does. Call when you want to hide or get rid of the player.