diff options
-rw-r--r-- | backend.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/backend.js b/backend.js index 81726c6..98d748b 100644 --- a/backend.js +++ b/backend.js @@ -647,6 +647,33 @@ class Backend extends EventEmitter { this.queuePlayers.push(queuePlayer) this.emit('added queue player', queuePlayer) + for (const event of [ + 'playing', + 'done playing', + 'queue', + 'distribute-queue', + 'unqueue', + 'clear-queue-past', + 'clear-queue-up-to', + 'shuffle-queue', + 'clear-queue', + 'queue updated', + 'seek-ahead', + 'seek-back', + 'toggle-pause', + 'set-pause', + 'toggle-loop', + 'set-loop', + 'vol-up', + 'vol-down', + 'set-volume', + 'set-pause-next-track' + ]) { + queuePlayer.on(event, (...data) => { + this.emit(event, queuePlayer, ...data) + }) + } + return queuePlayer } |