diff options
author | (quasar) nebula <towerofnix@gmail.com> | 2021-03-24 00:33:09 -0300 |
---|---|---|
committer | (quasar) nebula <towerofnix@gmail.com> | 2021-03-24 00:33:09 -0300 |
commit | e6c0e708b6781473b6343a9d9aa111f215226298 (patch) | |
tree | d1a1364370695861e2064aaf36cd279a59e8870b | |
parent | aeaedff0645cda9e5e45b58318ecbc0f7b2c0d88 (diff) |
cherry-pick queue player events
10/10 odds this is going to cause some merge conflict soon oh god
-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 } |