Fires when a tab beside Now Playing is shown, including Up next. A plugin that added a tab fills its panel here, and again on riff.track while its tab is showing.
Also dispatched as the riff:tab event on #riff, with the same detail. The event bubbles.
Parameters
detailObject- What changed.
idstringThe tab's slug.panelHTMLElementThe tab's panel,[data-riff-panel="<slug>"].trackObject|nullThe track playing.
apiObjectwindow.riff.
More Information
Usage
wp.hooks.addAction( 'riff.tab', 'my-plugin', ( detail, api ) => {
} );
// Or, without wp-hooks:
window.riff.on( 'tab', ( detail ) => {} );Source
emit( 'tab', {
id,
panel: $( `[data-riff-panel="${ id }"]` ),
track: track() || null,
} );plugins/riff/assets/riff.jsView on GitHub
Changelog
| Version | Description |
|---|---|
| 4.17.0 | Introduced. |