Hi There,
We are developing a mobile app with .NET Maui Blazor. Here all the HTML/C#/JS happens within the BlazorWebView.
The issue is that the JS Bitmovin Player does not read from the Android Manifest and the app does not present a web domain to the Player. So the whitelisting of the Android Package Name or a web domain has no effect. As a result the Player returns (SETUP_MISSING_LICENSE_ALLOWLIST).
Is there any solution/workaround for this?
(We did not try IOS yet.)
Best,
Peter
hi Peter,
Iâd like to know more about where the HTML/CSS content is hosted. Will it come packaged on your Maui App or is it hosted on a web server and then referenced on the BlazorWebView?
thx
Hi Thomas,
Itâs all in the MAUI app, except for some main default CSS.
Best,
Peter
thanks Peter.
Since this is not a hosted app, could you please try adding these tweak properties to the player config?
config:{
tweaks: {
file_protocol: true,
app_id: 'ANY_STRING_ID'
}
}
you can add the app_id into the allow list in licenses. You can name your app id with any string /text.
Could you please try this and let me know if it works?
thanks
Hi Thomas,
Unfortunately, this does not seem to work. Below is my player script.
I waited for 30 minutes for the app_id to be allowlisted. But no change. Still getting: This domain is not allowlisted (SETUP_MISSING_LICENSE_ALLOWLIST)
window.setupBitmovinPlayer = function (playername, videoname, urlStreamingLink, aestoken) {
var conf = {
key: âxxxxxxxxxxxxxxxâ,
network: {
preprocessHttpRequest: (type, request) => {
if (type === bitmovin.player.HttpRequestType.KEY_HLS_AES) {
request.headers[âAuthorizationâ] = 'Bearer â + aestoken;
}
return Promise.resolve(request);
}
},
tweaks: {
file_protocol: true,
app_id: â8BE988A0-B2B7-4A78-B2C8-75FB9C202B5Aâ
}
};
var source = {
title: videoname,
hls: urlStreamingLink
};
var player = new bitmovin.player.Player(document.getElementById(playername), conf);
player.load(source);
};
Peter van Vogelpoel
hello Peter,
I see. Is it possible for you to look and share what is contained in the Licensing request and response?
Hi Thomas,
I donât know how to do that exactly when I debug om my Android Device. But I did prepare a small sample project for you to work on. Is there a way that I can get a small zip file to you?
Peter
thanks Peter, I just received the sample Maui app. We will try to review it soon.
Also, you should be able to capture your network traffic with a tool like. Charles, or the like.
thanks
Also, another question I have: Hosting the HTML/JS page on a web server, then reference it from the Maui app is not an option on your use case?
I understand that that would solve the problem. So Iâm trying. But then I have to find the â_framework/blazor.webview.jsâ from the index.htlm on the server. I donât know how to do that.
Running into all kind of issues trying to run the HTML/JS from the server. I donât think thatâs a workable solution. But maybe you find a way to do it.
hello Peter,
I havenât found yet the best solution to this, but I have figured out that BlazorWebView location.hostname
is 0.0.0.0
If I add 0.0.0.0 to the allow list on the bitmovin dashboard , the player will start working immediately.
I think the best solution would be finding a way to set up a custom hostname/origin in Maui, however I am not familiar with that technology and havenât found a way to do it.
as a workaround now, 0.0.0.0 would work.
Please let me know if this helps you, and please feel free to post your questions to the Community.
Hello Thomas,
Thank you for this. I understand that this is a workaround, but it works perfectly. Many thanks.
I did email you about getting the Casting working with an aestoken. Is that okay, or do you prefer that I paste that here as well?
Best,
Peter
1 Like
good to know this works for you Peter.
Best regards,
-Thomas