Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Running...
- Running KalturaSupport::PlayerLoaded
test markup, will be hidden
Playhead Segment support
Sample code for switching segments:
kWidget.addReadyCallback(function( playerId ){
var kdp = $('#' + playerId)[0];
$('#switchTime').click(function () {
kdp.setKDPAttribute('mediaProxy', 'mediaPlayFrom', $('#k-from').val());
kdp.setKDPAttribute('mediaProxy', 'mediaPlayTo', $('#k-to').val());
setTimeout(function(){
kdp.sendNotification('doPlay');
},500);
return false;
});
});
Switch segment to to
GO
This example highlights change the entry to 1_sf5ovm7u and update time 5 to 30 second, followed by a content play
changeMedia
kWidget.addReadyCallback(function (playerId) {
var kdp = $('#' + playerId)[0];
$('#changeMediaAndTime').click(function(){
kdp.kBind('onChangeMediaDone', function(){
kdp.sendNotification('doPlay');
});
kdp.sendNotification('changeMedia', { 'entryId': '1_sf5ovm7u'} );
kdp.setKDPAttribute('mediaProxy', 'mediaPlayFrom', 5);
kdp.setKDPAttribute('mediaProxy', 'mediaPlayTo', 30);
return false;
});
});