AVPlay API DRM PlayReady with auth headers not working

AVPlay API DRM PlayReady with auth headers not working

BY 11 Sep 2018 Web Application Development

Hi all,

I’m trying to reproduce a DASH stream protected with PlayReady using AVPlay API. The server to obtain the key is protected with auth headers. 

I set the headers when calling to ‘.setDrm()’ method before calling to ‘.prepare()’. Like the next example:

var DrmParam = {};
DrmParam.LicenseServer = "http://license.company.com";
DrmParam.Authorization    = "[AUTH KEY]";
webapis.avplay.setDrm("PLAYREADY", "SetProperties", JSON.stringify(DrmParam));

I have tried to set the headers in different ways but none works. I receive ‘PLAYER_ERROR_CONNECTION_FAILED’ when calling to ‘.prepare()’. The server seems to be working properly because It works on other platforms. How should I set the headers? Is there any way to debug the HTTP requests from AVPlay? (Web Inspector ‘Network’ is not working).

Regards,

Miguel

Written by