requestRentalLicense

open fun requestRentalLicense(video: Video, absoluteExpiration: Date, playDuration: Long, listener: EventListener)

Submits an offline playback rental license request for the specified video asynchronously. Upon successful acquisition of license, the video object will be updated to set the license key set identifier and actual expiration date.

Parameters

video

the video for which the offline playback license should be acquired.

absoluteExpiration

defines how long the license is valid to start playback.

playDuration

defines in milliseconds how long the content can be consumed after the start of playback.

listener

reference to a listener that will be notified about the outcome of the request.


open fun requestRentalLicense(video: Video, absoluteExpiration: Date, playDuration: Long, listener: EventListener, config: CustomerRightsTokenConfig)

Submits an offline playback rental license request for the specified video asynchronously. Upon successful acquisition of license, the video object will be updated to set the license key set identifier and actual expiration date.

Parameters

video

the video for which the offline playback license should be acquired.

absoluteExpiration

defines how long the license is valid to start playback.

playDuration

defines in milliseconds how long the content can be consumed after the start of playback.

listener

reference to a listener that will be notified about the outcome of the request.

config

defines additional configuration for the license request


open fun requestRentalLicense(video: Video, absoluteExpiration: Date, playDuration: Long, listener: EventListener, httpRequestConfig: HttpRequestConfig)

Submits an offline playback rental license request for the specified video asynchronously. Upon successful acquisition of license, the video object will be updated to set the license key set identifier and actual expiration date.

Parameters

video

the video for which the offline playback license should be acquired.

absoluteExpiration

defines how long the license is valid to start playback.

playDuration

defines in milliseconds how long the content can be consumed after the start of playback.

listener

reference to a listener that will be notified about the outcome of the request.

httpRequestConfig

Http parameters when retrieving the video. Use empty instead of null.