Getting 401 error on AES resust using VideoJs setup

Sturla 176 Reputation points
2022-08-28T13:04:13.79+00:00

Hi, I´m trying to swap out Azure Media Player for the VideoJs in hope it fixes my other problem of not being able to play my AES stream on Safari IPhone (works on Safari Mac))

But I´m missing something because what ever I try I get a 401 error. I created a git repo here that you can try out.

235526-401-errors.png

here is a screenshot of one request
235517-401-error-request.png

But I also get successful requests

235535-successful-request.png

And the only thing the player does is spinning. Can you see what I´m doing wrong here?

Azure Media Services
Azure Media Services
A group of Azure services that includes encoding, format conversion, on-demand streaming, content protection, and live streaming services.
302 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. David Bristol 971 Reputation points Microsoft Employee
    2022-08-29T15:04:31.88+00:00

    The OPTIONS requests are successful because they don't require authentication/authorization. However, the GET requests for AES keys do require authorization. I don't see a bearer token listed in the request, but I do see that you include it in your sample. You can add:

    &token={yourtoken}

    ..as a query string to the URL.

    1 person found this answer helpful.

  2. ajkuma 22,401 Reputation points Microsoft Employee
    2022-10-11T10:48:06.133+00:00

    To benefit the community, posting the discussion from our offline discussion.

    Video.js player cannot work with AES encryption due to the native player’s limitation on iOS.
    I suggest you to protect your content with DRM with video.js player.

    As shared by my colleague (sudong), the published website, a reference example.
    (add your own manifest url to test)

    Sample code used: https://github.com/Azure-Samples/media-services-3rdparty-player-samples/tree/master/src/video.js
    at line 44: index.js: var vhs = videoJS.tech().vhs;

    Thanks for your patience and cooperation!

    --
    To benefit the community find the right answers, please do mark the post which was helpful by clicking on Accept Answer’ & ‘Up-Vote’.

    1 person found this answer helpful.
    0 comments No comments