Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to play PlayReady DRM video offline #8

Open
softsara opened this issue Jul 31, 2017 · 1 comment
Open

Unable to play PlayReady DRM video offline #8

softsara opened this issue Jul 31, 2017 · 1 comment

Comments

@softsara
Copy link

I have a video file placed in azure media server. The video file is MPEG-DASH protected and it requires JWT token, uses Software DRM. Video works fine when internet is available.

I wanted to play the same video in offline mode. Therefore I used AdaptiveMediaCache sample of https://github.com/flecoqui/Windows10/tree/master/Samples to achieve this. With this, i am able to download the video content and able to play the downloaded video content only if the internet is available. Because it requires the play ready license url https://xxxxxx.keydelivery.mediaservices.windows.net/PlayReady/.

However when there is no internet this service is not available to me. Therefore I receive the "Video could not be decoded" error in video player and "MF_MEDIA_ENGINE_ERR_DECODE : HRESULT - 0x8004110E" exception in MediaFailed event handler.

What i am missing here? Or how to cache or persist the playready license for offline play?

@flecoqui
Copy link
Owner

Currently this sample application only support Smooth Streaming Assets. DASH and HLS support will require a specific effort. The manifestCache.cs file needs to be updated to spport DASH and HLS:
https://github.com/flecoqui/Windows10/blob/master/Samples/AdaptiveMediaCache/cs/AdaptiveMediaCache/ManifestCache.cs#L796

Moreover, If you look at the sample streams there:
https://github.com/flecoqui/Windows10/blob/master/Samples/AdaptiveMediaCache/cs/AudioVideoPlayer/DataModel/MediaData.json
You'll see that some use "Non persistent" and "Persistent" license. In order to support offline video you need to use Persistent license.
For instance with PlayReady test servers:
Non Persistent:
http://playready.directtaps.net/pr/svc/rightsmanager.asmx?PlayRight=1&UseSimpleNonPersistentLicense=1
Persistent during a period of time:
http://playready.directtaps.net/pr/svc/rightsmanager.asmx?PlayRight=1&FirstPlayExpiration=600

You need to configure your backend to deliver persistent license.
At least, I didn't test this application with Azure Media Services JWT Token.
The sample there: https://github.com/flecoqui/Windows10/tree/master/Samples/TestMediaApp does support JWT Token Authentication.

Hope this helps,
Fred

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants