Passing HLS AES token to CAF Receiver?

Hi Thomas,

I put already a question in the edited post above. Did you see?

And yes I will go to the IBC. I’m not sure which day yet. Would it be wise to set a meeting date?

Best,
Peter

1 Like

sorry, my bad, overlooked that part somehow.
Which DRM are you using? is it playready? also it might be worth checking if MAUI webview are compatible with DRM at all.

Regarding IBC, I passed your email to one of our team members, they will contact you to agree on a meeting time.
regards,
-Thomas

1 Like

Hi Thomas,

Yes, it’s playready. The thing is that when I open the link below in a webbrowser on my mobile (Android) then there is no problem. When the link is opened in the build in browser of MS Outlook on the Android mobile the same issue occurs like I mentioned. So I’m not sure if this has anything to do with the MAUI webview.

You can try for yourself:

https://filmgenie.azurewebsites.net/vodplayer/90a7a1a2-4934-421e-0fa7-08da8bedaa33

1 Like

thanks Peter,
It can still be the capabilities of the Maui WebView.
Could you please add a logic like this one below to get the compatibility of the browser? you can print it on the screen if you dont have access to the console:

var config = [{
  "initDataTypes": ["cenc"],
  "audioCapabilities": [{
    "contentType": "audio/mp4;codecs=\"mp4a.40.2\""
  }],
  "videoCapabilities": [{
    "contentType": "video/mp4;codecs=\"avc1.42E01E\""
  }]
}];
try {
  navigator.
  requestMediaKeySystemAccess("com.widevine.alpha", config).
  then(function(mediaKeySystemAccess) {
    console.log('widevine support ok');
  }).catch(function(e) {
    console.log('no widevine support');
    console.log(e);
  });
} catch (e) {
  console.log('no widevine support');
  console.log(e);
}
try {
  navigator.
  requestMediaKeySystemAccess("com.microsoft.playready", config).
  then(function(mediaKeySystemAccess) {
    console.log('playready support ok');
  }).catch(function(e) {
    console.log('no playready support');
    console.log(e);
  });
} catch (e) {
    console.log('no playready support');
  console.log(e);
}
try {
  navigator.
  requestMediaKeySystemAccess("org.w3.clearkey",config).
  then(function(mediaKeySystemAccess) {
    console.log('clearkey support ok');
  }).catch(function(e) {
    console.log('no clearkey support');
    console.log(e);
  });
} catch (e) {
  console.log('no clearkey support');
  console.log(e);
}
1 Like

I’m not sure where and how to do this. I’m working in MAUI/Blazor which essentially is a Blazor Webapp in a Webview. All is C#/HTML and a bit of Javascript. The player is configured with the Javascript. The Android Manifest just acts like a kind of host.

So I don’t know where to go with your code. But maybe I’m missing the obvious.

1 Like

hi Peter this will go inside your Javascript, just on the same page you setup bitmovin player. You can either change the console.log for an alert() or add the results into the HTML.
You can call this code inside the same method where you initialise your player.

regards,

1 Like

Alright, that worked. What I’m getting in MAUI Webview is:

Clearkey support ok
no Playready support
no Widevine support

In the mobile webbrowser (Edge, Chrome) I’m getting

Clearkey support ok
no Playready support
Widevine support ok

I’m using both Playready and Widevine. It seems I have to use Clearkey for this.

1 Like

I found something that might be helpful. I let you know if I figured this out.

https://github.com/videojs/video.js/issues/5563

1 Like

Hi Thomas,

Within the MAUI Webview things only work with Clearkey. Good for now.

But my next issue is that also on iOS it’s only Clearkey. Good enough. But still somehow iOS (latest version on iPad) is not playing my streams. I’m using .ism/manifest(format=m3u8-aapl-v4) as format. Should that be different? Or is there another trick?

I have this in the player setup for the aestoken:

    network: {
        preprocessHttpRequest: (type, request) => {
            if (type === bitmovin.player.HttpRequestType.KEY_HLS_AES) {
                request.headers['Authorization'] = 'Bearer ' + aestoken;
            }
            return Promise.resolve(request);
        },
    }

The player shows the length of the video fine, but it does not play.

Same thing works without issue in Windows and in browsers and MAUI on Android.

You can download the manifest here:
https://filmbookingmediaendpoint-filmbookingmedia-euwe.streaming.media.azure.net/752fa431-8414-453b-9bad-deeda62f51ea/013626db-f8b8-482e-8b5c-6cc13238.ism/manifest(format=m3u8-aapl-v4)

Any advise?

Best,
Peter

1 Like

hello Peter,

What happens if you play your page directly on iOS safari in your iPad? does it play?
For this we need more details, like the player logs. Is there a way you can get the console logs our of your Maui WebView?
Could you listen to the error event also PlayerEvent | Bitmovin Player API 8.93.0 and print (or alert) the details of this event? (assuming this event will be triggered, it might not, but hopefully).

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.