I am trying to upload a video file and stream it with DRM using Azure Media Services, So far I managed to upload the file, get a streaming URL and get a token but when trying to play it on http://ampdemo.azureedge.net/ I am getting an error
Unable to decrypt encrypted video source 0x20500004
Been searching for a couple of hours now for what might cause the issue but haven't found anything that helped. I used this repo (and changed the keys to my own)
In addition, I created a content key policy named CommonEncryptionCencDrmContentKeyPolicy with license type PlayReady and Restriction type token
Can anyone help and share what am I missing here?
Thanks!
Make sure you are using https:// for everything.... don't mix http: on any URLs That's usually the issue.
Update: I can't quite spot the issue within the token, but it could be something to do with the way that you have defined the restriction in the ContentKeyPolicyTokenRestriction object.
Make sure that your issuer and audience match what you passed into the JWT token. If the sample worked for you, it might be the difference.
let restriction: ContentKeyPolicyTokenRestriction = { odataType: "#Microsoft.Media.ContentKeyPolicyTokenRestriction", issuer: issuer, audience: audience, primaryVerificationKey: primaryKey, restrictionTokenType: "Jwt", alternateVerificationKeys: undefined, requiredClaims: requiredClaims }
Check through all pats that set the Content Key Policy token restriction up, and make sure that it matches your required claims passed into the JWT token.