Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Proposal] fix(prober): return "not supported" if browser API take too long #1470

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

Florent-Bouisset
Copy link
Collaborator

Calling navigator.requestMediaKeySystemAccess() can hang infinitly on some devices. (Noticed on a windows device in an app under WebView v2).
As a result, mediaCapabilitiesProber.getCompatibleDRMConfigurations() hangs infinitly and does not return the supported key systems.

To handle such case, I propose to add a timeout when testing such browser APIs, and to consider that the device has not the capabilities for this media configuration if no response is given in a reasonable time (I have set it to 30 seconds).

I added this behavior for the following browsers API:

"isTypeSupported"
"isTypeSupportedWithFeatures"
"matchMedia"
"decodingInfos"
"requestMediaKeySystemAccess"
"getStatusForPolicy";

@peaBerberian
Copy link
Collaborator

In what scenario does that happen? Everytime the check should fail on those devices?

Why targeting only the mediaCapabilitiesProber if the issue is with the navigator.requestMediaKeySystemAccess call in general?

30s in any case is a lot, is the wanted experience to hang for 30 seconds in that case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants