Class: Kaltura::KalturaPlayReadyDrmService

Inherits:
KalturaServiceBase show all
Defined in:
lib/kaltura_plugins/kaltura_play_ready_client_plugin.rb

Instance Attribute Summary

Attributes inherited from KalturaServiceBase

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaPlayReadyDrmService

Returns a new instance of KalturaPlayReadyDrmService.



414
415
416
# File 'lib/kaltura_plugins/kaltura_play_ready_client_plugin.rb', line 414

def initialize(client)
	super(client)
end

Instance Method Details

#generate_keyKalturaPlayReadyContentKey

Generate key id and content key for PlayReady encryption



420
421
422
423
424
425
426
427
# File 'lib/kaltura_plugins/kaltura_play_ready_client_plugin.rb', line 420

def generate_key()
	kparams = {}
	client.queue_service_action_call('playready_playreadydrm', 'generateKey', 'KalturaPlayReadyContentKey', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#get_content_keys(key_ids) ⇒ array

Get content keys for input key ids

Returns:

  • (array)


431
432
433
434
435
436
437
438
439
# File 'lib/kaltura_plugins/kaltura_play_ready_client_plugin.rb', line 431

def get_content_keys(key_ids)
	kparams = {}
	client.add_param(kparams, 'keyIds', key_ids)
	client.queue_service_action_call('playready_playreadydrm', 'getContentKeys', 'KalturaPlayReadyContentKey', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#get_entry_content_key(entry_id, create_if_missing = false) ⇒ KalturaPlayReadyContentKey

Get content key and key id for the given entry



443
444
445
446
447
448
449
450
451
452
# File 'lib/kaltura_plugins/kaltura_play_ready_client_plugin.rb', line 443

def get_entry_content_key(entry_id, create_if_missing=false)
	kparams = {}
	client.add_param(kparams, 'entryId', entry_id)
	client.add_param(kparams, 'createIfMissing', create_if_missing)
	client.queue_service_action_call('playready_playreadydrm', 'getEntryContentKey', 'KalturaPlayReadyContentKey', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#get_license_details(key_id, device_id, device_type, entry_id = KalturaNotImplemented, referrer = KalturaNotImplemented) ⇒ KalturaPlayReadyLicenseDetails

Get Play Ready policy and dates for license creation



456
457
458
459
460
461
462
463
464
465
466
467
468
# File 'lib/kaltura_plugins/kaltura_play_ready_client_plugin.rb', line 456

def get_license_details(key_id, device_id, device_type, entry_id=KalturaNotImplemented, referrer=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'keyId', key_id)
	client.add_param(kparams, 'deviceId', device_id)
	client.add_param(kparams, 'deviceType', device_type)
	client.add_param(kparams, 'entryId', entry_id)
	client.add_param(kparams, 'referrer', referrer)
	client.queue_service_action_call('playready_playreadydrm', 'getLicenseDetails', 'KalturaPlayReadyLicenseDetails', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end