The plugin has 2 main ways with which you can plugin into the player's JS API and start your custom implementation:
- On your post/page view, once you post your shortcode, you have the option to add an onReady callback to the player inside the shortcode itself. Here's an example:
[brid video="VIDEO_ID" player="PLAYER_ID" title="Video Title" bridonready="foo"]By adding bridonready="your_function_name" to your shortcode, you add an onReady callback to the player. You are then free to do your custom coding inside your custom-named method.
- If you set an onReady method name both on the settings screen of the plugin and inside a player's shortcode, the one set on the shortcode level will override what is set on the plugin settings level.
- The onReady callback will not work or be added for Brid content units, Google AMP and Facebook Instant Article embed codes.