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.
As licence keys are already fetched at the beginning of the download process, there is no need for any extra steps for encrypted content. However, for PRM content, the decryption of the content is done by the
PAKlibrary, which must be pre-initalised (
The watch download operation takes place after the start download operation; the download does not need to have completed for this operation to run but sufficient data must be available.
Playback while downloading
The application decides when the user can start playback of an ongoing download. If the application allows playback to be started, it must be careful about seeking or playing past downloaded data.
The following code example shows how to watch the downloaded asset:
//Get the download object by Universal Unique ID. OTVDownloadItem item = mDlManager.getDownloadByUUID(mUuid); //Set the local path to OTVVideoView. mOTVVideoView.setVideoPathFromDownloadItem(item); mOTVVideoView.start();
Next step: Delete a download entry