Playhead Segment support



Sample code for switching segments:
  1. kWidget.addReadyCallback(function( playerId ){
  2. var kdp = $('#' + playerId)[0];
  3. $('#switchTime').click(function () {
  4. kdp.setKDPAttribute('mediaProxy', 'mediaPlayFrom', $('#k-from').val());
  5. kdp.setKDPAttribute('mediaProxy', 'mediaPlayTo', $('#k-to').val());
  6. setTimeout(function(){
  7. kdp.sendNotification('doPlay');
  8. },500);
  9. return false;
  10. });
  11. });
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
  1. kWidget.addReadyCallback(function (playerId) {
  2. var kdp = $('#' + playerId)[0];
  3. $('#changeMediaAndTime').click(function(){
  4. kdp.kBind('onChangeMediaDone', function(){
  5. kdp.sendNotification('doPlay');
  6. });
  7. kdp.sendNotification('changeMedia', { 'entryId': '1_sf5ovm7u'} );
  8. kdp.setKDPAttribute('mediaProxy', 'mediaPlayFrom', 5);
  9. kdp.setKDPAttribute('mediaProxy', 'mediaPlayTo', 30);
  10. return false;
  11. });
  12. });

html5 qunit | flash qunit