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|nullThe track loaded, or null.
apiObjectwindow.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 } );plugins/riff/assets/riff.jsView on GitHub
Changelog
| Version | Description |
|---|---|
| 4.0.0 | Introduced. |