Developers

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

Fires when the track starts or resumes playing.

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

Parameters

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

More Information

Usage

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

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

Source

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

Changelog

VersionDescription
4.0.0Introduced.