question

GiteshMangla-4449 avatar image
0 Votes"
GiteshMangla-4449 asked GiteshMangla-6711 edited

"Unable to decrypt the encrypted video source (0x20500006)"

Hello,
My name is Gitesh,

I'm currently developping a website to stream video's in Asp .Net 5(c#).
Azure Media Services is my chosen platform to host the video's from.
Azure Media Player is the player I use on the website to render the video's.

I have got the playback of unprotected videos running, but I'm struggeling to get the playback of a DRM encoded video running. Via the Azure Media Services Explorer tool I have configured DRM on one particular asset.

When I playback the video via the Azure Media Services Explorer tool with the Azure Media Player, Its working fine with Bearer token.But when I try to playback the video from my website(I am sending Bearer Token as authToken on FrontEnd.), it is diplaying "Unable to decrypt the encrypted video source (0x20500006)". I see in chrome developer tools (console window) then getting below error.
Failed to load resource: the server responded with a status of 401 (Unauthorized).

azure-media-services
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

WilliamZhang-7888 avatar image
0 Votes"
WilliamZhang-7888 answered SanjayPrajapatiKforce-2694 commented

Can you share an auth token you used as bearer token by your player (outside of AMSE)? Which service issued the token?

AMSE issues symmetric token with a static encryption key, while most token issuers issue tokens with asymmetric key. Let's start from the token issued and token claims.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello, I have been receiving the similar error while trying to stream files with DRM that uses JWT token.
The token looks somewhat like:

 {
   "typ": "JWT",
   "alg": "HS256"
 }.{
   "urn:microsoft:azure:mediaservices:contentkeyidentifier": "KeyID",
   "exp": 1653581325,
   "nbf": 1653494625,
   "iss": "myIssuer",
   "aud": "myAudience"
 }.[Signature]


Am I doing something wrong here?

0 Votes 0 ·
GiteshMangla-6711 avatar image
0 Votes"
GiteshMangla-6711 answered GiteshMangla-6711 edited

Hi Sanjay,

Sorry for the late response

I have resolved the above issue by using the below code. Below code is working for both (Window and MAC)


<video id="resourceVideoTag"
class="azuremediaplayer amp-default-skin amp-big-play-centered video-upload-box vid2"
controls
width="640"
height="400"
poster="@Model.ResourceVideo.ThumbNailUrl"
data-setup='{
"controls": true, "autoplay": false ,
"logo": { "enabled": false },
"techOrder": ["azureHtml5JS", "flashSS", "html5FairPlayHLS","silverlightSS", "html5"],
"nativeControlsForTouch": false
}'
tabindex="0">
<source src="@Model.ResourceVideo.VideoUrl"
data-setup='{
"protectionInfo": [{"type": "PlayReady", "authenticationToken": "@Model.ResourceVideo.BearerToken"},
{"type": "Widevine", "authenticationToken": "@Model.ResourceVideo.BearerToken"},
{"type":"FairPlay","certificateUrl" :"@Model.CertificateFilePath","authenticationToken": "@Model.ResourceVideo.BearerTokenFairPlay"}] ,
"techOrder": ["azureHtml5JS", "flashSS", "html5FairPlayHLS","silverlightSS", "html5"]
}'
type="application/vnd.ms-sstr+xml" />
<p class="amp-no-js">
To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video
</p>
</video>



Jquery Code

var myResourcePlayer = amp('resourceVideoTag');
amp('resourceVideoTag').ready(function () {
myResourcePlayer = this;
myResourcePlayer.play();
});

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.