Developers

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

Fires when Now Playing closes.

Also dispatched as the riff:close 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.close', 'my-plugin', ( detail, api ) => {
} );

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

Source

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

Changelog

VersionDescription
4.0.0Introduced.