Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

1

430
Visualizações
How to use DRM License for ExoPlayer in Dash.js or similar

I have this customer which asked my a few ago to deliver an Android app for play stream videos. He had the links for the video and the url for the DRM License, which came in a object like this:

    "n": {
    "drm_license_url": "\thttps://sp-supplier.supplier.com/?deviceId=SoMeALphaNUmericakStuFF=",
    "drm_scheme": "widevine",
    "icon": "https://blogger.googleusercontent.com/img/some-logo.png",
    "name": "ANY NAME",
    "uri": "https://supplier-supplier-sl.supplier.com/live/c6eds/VIDEO/SA_Live_dash_enc_2A/SOMEVIDEO.mpd"
  },

I managed to succesful play the videos, after some reading of ExoPlayer library.

Now he wants to also play the same videos on a web, so after some reading I realized that I need to use dash.js or a similar MPD / m3u0 player, which also accept DRM license protection. I had read the documentation for make it, but the issue arised when, in order to pass the DRM license, I have to create this:

var protData = {
        "com.widevine.alpha": {
            "serverURL": "https://drm-widevine-licensing.axtest.net/AcquireLicense",
            "httpRequestHeaders": {
                "X-AxDRM-Message": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2ZXJzaW9uIjoxLCJjb21fa2V5X2lkIjoiYjMzNjRlYjUtNTFmNi00YWUzLThjOTgtMzNjZWQ1ZTMxYzc4IiwibWVzc2FnZSI6eyJ0eXBlIjoiZW50aXRsZW1lbnRfbWVzc2FnZSIsImZpcnN0X3BsYXlfZXhwaXJhdGlvbiI6NjAsInBsYXlyZWFkeSI6eyJyZWFsX3RpbWVfZXhwaXJhdGlvbiI6dHJ1ZX0sImtleXMiOlt7ImlkIjoiOWViNDA1MGQtZTQ0Yi00ODAyLTkzMmUtMjdkNzUwODNlMjY2IiwiZW5jcnlwdGVkX2tleSI6ImxLM09qSExZVzI0Y3Iya3RSNzRmbnc9PSJ9XX19.FAbIiPxX8BHi9RwfzD7Yn-wugU19ghrkBFKsaCPrZmU"
            },
            priority: 0
        }

(Source: https://reference.dashif.org/dash.js/latest/samples/drm/widevine.html)

Now, I understand that I have to pass the same Licence URL in the key serverUrl, but about the header, I dont really know which value I must pass to the key X-AxDRM-Message because I does not have that, and neither the customer.

I tried using the pre-built players provided by dash for testing, in which you can choose your params, including DRM License, but Got the following error:

DRM: licenser error! --com.widevine.alpha update, XHR error. status is "" (0), readyState is 4

My questions are:

  • Do I need further information from the DRM supplier in order to run same videos on web?
  • There are any ways to create the protData object with the information that I already have?
  • Can I do this or I´m using the wrong library?

Thanks! Matias

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

The service quite likely requires user authentication and/or a token to be included in the license request.

This functionality is very likely built into the app so it includes the token after authentication. You won't be able to simply copy and paste a license request in this case.

To explore more and verify, Microsoft Azure provides good documentation around DRM integration, not only for its own PlayReady DRM but for Widevine also.

You can see an example of token authentication on their pages:

enter image description here

If you read through the accompanying documentation you can see how the tokens are used in various scenarios: https://docs.microsoft.com/en-us/azure/media-services/previous/media-services-protect-with-playready-widevine

about 4 years ago · Juan Pablo Isaza Relatório

0

Hello, good, I'm looking for the same thing, could you contact me because I want to create an app with those same characteristics that your client asked for an app to play videos!

about 4 years ago · Franco matias Diaz Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda