Access Control Widevine ks

This shows arbitrary custom access logic being applied to widevine content.

Without KS:

With KS:
loading ...

Generating the KS request server side:

  1. <?php
  2. // Include the kaltura client available at: http://www.kaltura.com/api_v3/testme/client-libs.php
  3. require_once( '/kaltura_client_v3/KalturaClient.php' );
  4.  
  5. // setup your local config:
  6. $partnerId = '929011';
  7. $kalturaUserSecret = 'Your user secret is available in the settings tab in the KMC';
  8. $entryId = '1_4f9zv9fu';
  9.  
  10. $conf = new KalturaConfiguration( $partnerId );
  11. $conf->serviceUrl = 'https://cdnapisec.kaltura.com';
  12. $conf->serviceBase = '/api_v3/index.php?service=';
  13.  
  14. $client = new KalturaClient( $conf );
  15.  
  16. $ks = $client->session->start ( $kalturaUserSecret,
  17. $_SERVER['REMOTE_ADDR'],
  18. KalturaSessionType::USER,
  19. $partnerId,
  20. 3600, // expire in one hour
  21. "sview:{$entryId}" // give permission to "view" the entry for the allocated time
  22. );
  23. // echo the KS out or return it to your embed logic,
  24. echo $ks;

Now take the KS and include in your embed:

  1. kWidget.embed('playerTargetId', {
  2. 'wid': '_929011',
  3. 'uiconf_id' : '16115322',
  4. 'entry_id' : '1_4f9zv9fu',
  5. 'flashvars':{
  6. 'flavorTags' : 'widevine_mbr,mbr,web',
  7. 'widevine': {
  8. 'plugin': true
  9. },
  10. 'ks': /* your generated sview ks goes here */
  11. }
  12. });
html5 qunit | flash qunit