Using Annoto Widget API
In Customise Annoto Widget configuration we have learned how to listen to Kaltura player events and get access to the widget configuration and the API:
1
kWidget.addReadyCallback(function (playerId) {
2
player.kBind('annotoPluginReady', function (annotoApi) {
3
// Make use of the Annoto API
4
});
5
});
Copied!
The annotoApi can be used to accomplish various tasks such as dynamically hide/show the widget, load new configuration and maybe the most common task to perform Single Sign On (SSO) authentication:
1
var userJwtToken = '....';
2
player.kBind('annotoPluginReady', function (annotoApi) {
3
// Make use of the Annoto API
4
// If we already have the userJwtToken use it,
5
// alternatively the annotoAPI can be saved in a variable
6
// and used asynchronously.
7
annotoApi.auth(userJwtToken).catch(function(err) {
8
console.error('Annoto SSO auth error: ', err);
9
});
10
});
Copied!
For more information regarding SSO, please refer to the Annoto SSO Technical Guide or contact us at [email protected]
Last modified 1yr ago
Export as PDF
Copy link