When the Annoto plugin is loaded by the Kaltura player, it triggers custom events that allows you to get access to the configuration and the API for full customisation and control of the widget.
To subscribe to Kaltura player events please use Kaltura player API:
For detailed information on the Kaltura player API, please refer to http://player.kaltura.com/docs/api
annotoPluginSetup
is triggered first by the Annoto plugin and provides opportunity to modify the Annoto widget configuration before the widget is bootstrapped.
Once the widget is bootstrapped by the plugin annotoPluginReady
is triggered and provides access to the Annoto API.
Below is an example of modifying some basic widget options:
config is already setup by the Kaltura Annoto plugin, so we need only to override the required configuration, such as clientId, getPageUrl hook, etc. DO NOT CHANGE THE PLAYER TYPE OR PLAYER ELEMENT CONFIG.
For the default widget configuration used by the plugin please refer to: https://github.com/Annoto/kaltura-plugin
The plugin exposes annotoPluginReady
event that provides access to the API for implementing the SSO functionality.
Advanced topic
In some cases you might not have the required configuration for the Annoto Widget when annotoPluginSetup
is triggered, or would want to postpone the bootstrap of the widget until some condition is met.
Until delayDoneCallback
is called, the widget won't be bootstrapped and annotoPluginReady
won't be triggered.
If doneCb is not called, the widget is not bootstrapped. This can be used to dynamically decide on which videos to load the annoto plugin.