Developers

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

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.
  • trackObject
    The track that ended.
apiObject
window.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() } );

Changelog

VersionDescription
4.0.0Introduced.