add OnPlayQueueChange hook

This commit is contained in:
Drew Weymouth
2024-03-03 10:38:12 -08:00
parent 013204727d
commit 9b72ff9d17
4 changed files with 33 additions and 0 deletions
+5
View File
@@ -74,6 +74,11 @@ func (p *PlaybackManager) OnVolumeChange(cb func(int)) {
p.engine.onVolumeChange = append(p.engine.onVolumeChange, cb)
}
// Registers a callback that is notified whenever the play queue changes.
func (p *PlaybackManager) OnQueueChange(cb func()) {
p.engine.onQueueChange = append(p.engine.onQueueChange, cb)
}
// Registers a callback that is notified whenever the player has been seeked.
func (p *PlaybackManager) OnSeek(cb func()) {
p.engine.onSeek = append(p.engine.onSeek, cb)