I know that to get a Widevine license from Azure Media Service (AMS) I need an access token (JWT). I get that token from Azure Active Directory. Now I don't know how to put the access token in the Widevine challenge that Exoplayer does.
My solution that doesn't seem to work:
I use Xamarin, so C#.
I use ADAL to get the token.
I use the StreamingDrmSessionManager.NewWidevineInstance to get the Widevine license and I use this
optionalParams = new Dictionary<string, string> { { "AccessToken", accessToken } }
for the optionalKeyRequestParameters parameter.
What am I doing wrong.
Thanks
Bob, At this point,
So why don't we go step by step: let's first make sure the Azure AD token and your content protection configuration in AMS match up, by removing the Xamarin player from the picture for the moment.
Use this test player: to test with your protected stream and AAD token https://openidconnectweb.azurewebsites.net/AMTestPlayer If you want to check/match the issuer, audience and (hope you have not added claim, if you have) claims between AAD and AMS, you can use this JWT tool: https://openidconnectweb.azurewebsites.net/DRMTool/Jwt (paste in your JWT from AAD and click on "Parse & Verify" button).
Once we make sure your protected content and your AAD token work well, then we can move to player.
For player, we can temporarily try to use query string "access_token=[JWT]" to pass in the token, just to figure out whether the API supports token passing.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.