Capturing kaltura player events within Player UI

Hi Experts,

We want to send player events like doPlay, doPause etc to external analytics system upon player interaction. For this purpose, we thought of using “IframeCustomPluginJs1” and subscribe to events from an external JS file that contains the following code.

kWidget.addReadyCallback(function(playerId) {
var kdp = document.getElementById(playerId);

kdp.kBind('doPause', function() {
    alert(`Event Triggered for 'doPause'`);
    kdp.sendNotification("mediaDownloadCustom", { entryID: kdp.evaluate('{}') });

kdp.kBind('doPlay', function() {
    alert(`Event Triggered for 'doPlay'`);

kdp.kBind('doStop', function() {
    alert(`Event Triggered for 'doStop'`);

kdp.kBind('mediaDownloadCustom', function(data) {
    alert(`Custom Event Triggered for 'mediaDownloadCustom' with ID: ${data.entryID}`);

$('.controlsContainer .download').click(() => {
    kdp.sendNotification("mediaDownloadCustom", { entryID: kdp.evaluate('{}') });


This will ensure that our events are getting captured irrespective of where the player is embedded as an iframe.

BUT we are unable to see these events being fired from player UI interaction. Also, I don’t see any alert box or debugger or error in console UI.

So question is, does kaltura support sending/subscribing to events from IframeCustomPluginJs1 or not? if not then how can we make sure that events are successfully captured everywhere without writing the repitative code?

Thank You
Saurabh Kabra

Hi @saurabhkabrasap,

Take a look here: