Fires when a track plays to its end, before the next one loads.
Also dispatched as the riff:ended event on #riff, with the same detail. The event bubbles.
Parameters
detailObject- What changed.
trackObjectThe track that ended.
apiObjectwindow.riff.
More Information
Usage
wp.hooks.addAction( 'riff.ended', 'my-plugin', ( detail, api ) => {
} );
// Or, without wp-hooks:
window.riff.on( 'ended', ( detail ) => {} );Source
emit( 'ended', { track: track() } );plugins/riff/assets/riff.jsView on GitHub
Changelog
| Version | Description |
|---|---|
| 4.0.0 | Introduced. |