RESOLVED FIXED310690
MediaPlayer::supportsType unnecessarily queries the GPUP for all non-cache queries
https://bugs.webkit.org/show_bug.cgi?id=310690
Summary MediaPlayer::supportsType unnecessarily queries the GPUP for all non-cache qu...
Jean-Yves Avenard [:jya]
Reported 2026-03-24 22:08:45 PDT
When MediaPlayer::supportsType is called it calls bestMediaEngineForSupportParameters to determine the best MediaPlayerFactory able to handle this call. This loops over all registered MediaPlayerFactory and call supportsTypeAndCodecs on each of them. This includes the MediaPlayerRemoteFactory which can only handle CRABS content. MediaPlayer::supportsType is used to by MediaSource.isTypeSupported. Each call by MediaSource.isTypeSupported will call into the MediaPlayerRemoteFactory(AVFoundation) which will performs a sync call to the GPUP only to respond it's not supported. This account for a significant wasted time during which the web content main thread is blocked waiting for an answer. We should only have MediaPlayerRemoteFactory calls for its registered type (e.g. not MediaSource)
Attachments
Radar WebKit Bug Importer
Comment 1 2026-03-24 22:08:52 PDT
Jean-Yves Avenard [:jya]
Comment 2 2026-03-25 07:33:18 PDT
EWS
Comment 3 2026-03-25 20:12:21 PDT
Committed 309957@main (110a4711d4eb): <https://commits.webkit.org/309957@main> Reviewed commits have been landed. Closing PR #61327 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.