From 217ed115a3704ee49791a8dc3395050cd26e3d46 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Fri, 16 Oct 2015 20:23:41 -0700 Subject: [PATCH] Fix #513 --- src/channel/playlist.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/channel/playlist.js b/src/channel/playlist.js index 24428d00..60a05f9c 100644 --- a/src/channel/playlist.js +++ b/src/channel/playlist.js @@ -740,9 +740,13 @@ PlaylistModule.prototype.handleAssignLeader = function (user, data) { this.channel.logger.log("[playlist] Resuming autolead"); if (this.current !== null) { + // Ensure the video is unpaused before resuming autolead. + // In the past, people have reported stuck playlists because + // they assigned leader, paused, then removed leader. this.current.media.paused = false; + this.sendMediaUpdate(this.channel.users); - if (!this._leadInterval) { + if (!this._leadInterval && this.current.media.seconds > 0) { this._lastUpdate = Date.now(); this._leadInterval = setInterval(this._leadLoop.bind(this), 1000); this._leadLoop();