Developers

wp.hooks.applyFilters( 'riff.queue', tracks, index )

Filters the tracks about to become the queue.

Parameters

tracksObject[]
The tracks, in the shape Tracks::schema() describes.
indexnumber
The position in tracks that 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 );

Changelog

VersionDescription
4.0.0Introduced.