Developers

wp.hooks.doAction( 'riff.open', detail, api )

Fires when Now Playing opens.

Also dispatched as the riff:open event on #riff, with the same detail. The event bubbles.

Parameters

detailObject
What changed.
  • trackObject
    The track playing.
apiObject
window.riff.

More Information

Usage

wp.hooks.addAction( 'riff.open', 'my-plugin', ( detail, api ) => {
} );

// Or, without wp-hooks:
window.riff.on( 'open', ( detail ) => {} );

Source

emit( 'open', { track: track() } );

Changelog

VersionDescription
4.0.0Introduced.