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.
trackObjectThe track.
apiObjectwindow.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() } );plugins/riff/assets/riff.jsView on GitHub
Changelog
| Version | Description |
|---|---|
| 4.0.0 | Introduced. |