Fires when the queue changes while it plays: tracks added to play next or at the end, one moved or removed, or the queue cleared.
Also dispatched as the riff:queue event on #riff, with the same detail. The event bubbles.
Parameters
detailObject- What changed.
changestringnext,add,move,removeorclear.queueObject[]The queue in play order.indexnumberThe playing track's place in it.
apiObjectwindow.riff.
More Information
Usage
wp.hooks.addAction( 'riff.queue', 'my-plugin', ( detail, api ) => {
} );
// Or, without wp-hooks:
window.riff.on( 'queue', ( detail ) => {} );Source
emit( 'queue', { change, queue: api.queue(), index: pos } );plugins/riff/assets/riff.jsView on GitHub
Changelog
| Version | Description |
|---|---|
| 4.19.0 | Introduced. |