Skip to main content
Skip table of contents

Playing the download

The client application picks a download item and retrieves the local URL associated with it. The URL is loaded and played in a similar way to playback of a normal CDN-hosted stream.

There are no extra steps for encrypted content as licence keys are retrieved earlier in the download process. However, for PRM content, decryption of the content is done by the PAK library, which must be pre-initialised (preparePAK()). Also, to work with PRM-protected content, you must use the PRM-supporting SDK libraries (sdk-prm-integration.aar and sdk-prm-production.aar).

The watch download operation must take place after the start download operation. The download does not need to have completed for this operation to run, although sufficient data must be available. The application decides when the user can start playback of an ongoing download. If the application allows playback to start, it must be careful about seeking or playing past downloaded data.

Example code

The following code example shows how to watch the downloaded asset.

JAVA
//Get the download object by Universal Unique ID.
OTVDownloadItem item = mDlManager.getDownloadByUUID(mUuid);

//Set the local path to OTVVideoView.
mOTVVideoView.setVideoPathFromDownloadItem(item);
mOTVVideoView.start();

See the OTVDownloadItem class reference for details of the API calls used above.

Next step: Delete a download entry

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.