Developers

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

Fires once the player is set up, its state restored and window.riff available.

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

Parameters

detailObject
The player's state.
  • queueObject[]
    The queue in play order.
  • trackObject|null
    The track loaded, or null.
apiObject
window.riff.

More Information

Usage

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

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

Source

emit( 'ready', { queue: api.queue(), track: track() || null } );

Changelog

VersionDescription
4.0.0Introduced.