Filters the tracks about to become the queue.
Parameters
tracksObject[]- The tracks, in the shape
Tracks::schema()describes. indexnumber- The position in
tracksthat will play first.
More Information
Return a new array to add, drop or reorder tracks before any of them plays.
Usage
wp.hooks.addFilter( 'riff.queue', 'my-plugin', ( tracks, index ) => {
return tracks;
} );Source
tracks = filter( 'queue', tracks, index );plugins/riff/assets/riff.jsView on GitHub
Changelog
| Version | Description |
|---|---|
| 4.0.0 | Introduced. |