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] Update mediaCapabilitiesProber API #1472

Open
wants to merge 15 commits into
base: dev
Choose a base branch
from

Conversation

peaBerberian
Copy link
Collaborator

After some brainstorming related to #1470, we noticed that as is, our old mediaCapabilitiesProber experimental tool could gain by being more flexible.

Especially, the getCompatibleDRMConfigurations method checked multiple EME MediaKeySystemConfiguration at once and returned information on actual configurations compatible to them once all of them have been checked.

We wondered whether this method would not be more useful by making it less powerful: we'll now only check for a single MediaKeySystemConfiguration per method call (and rename that method to checkDrmConfiguration).
Doing this signals to an application that it can just combine multiple calls if it wants the old behavior (e.g. through a Promise.all), use Promise.race to just obtain the first one etc. (this would still be possible with the previous API, but seemed unnatural to application developers).

I also added a timeout argument to it, but realized that it might be very complex to maintain, as theoretically checkDrmConfiguration could call multiple browser API sequentially in the future (as other mediaCapabilitiesProber's methods are doing).
In that case, where are we supposed to apply the timeout: to each browser API call or globally on the method?


I also profited from this work to rewrite the implementation of other mediaCapabilitiesProber's method without changing their API, as I found that a lot of its data-processing code was unneeded and difficult to follow.

@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 Jun 26, 2024
@peaBerberian peaBerberian added this to the 4.2.0 milestone Jun 27, 2024
@peaBerberian peaBerberian added the Priority: 2 (Medium) This issue or PR has a medium priority. label Jul 26, 2024
@peaBerberian peaBerberian force-pushed the misc/mcp-refacto branch 2 times, most recently from 818d788 to 99059eb Compare September 4, 2024 10:30
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.

1 participant