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?

@peaBerberian peaBerberian added this to the 4.2.0 milestone Jun 27, 2024
@peaBerberian peaBerberian added the proposal This Pull Request or Issue is only a proposal for a change with the expectation of a debate on it label Jul 9, 2024
@peaBerberian peaBerberian added the Priority: 2 (Medium) This issue or PR has a medium priority. label Jul 26, 2024
@peaBerberian peaBerberian modified the milestones: 4.2.0, 4.3.0 Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: 2 (Medium) This issue or PR has a medium priority. proposal This Pull Request or Issue is only a proposal for a change with the expectation of a debate on it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants