bool MediaRecorder::isTypeSupported(const String& type) { RawPtr<WebMediaRecorderHandler> handler = Platform::current()->createMediaRecorderHandler(); if (!handler) return false; // If true is returned from this method, it only indicates that the // MediaRecorder implementation is capable of recording Blob objects for the // specified MIME type. Recording may still fail if sufficient resources are // not available to support the concrete media encoding. // [1] https://w3c.github.io/mediacapture-record/MediaRecorder.html#methods ContentType contentType(type); return handler->canSupportMimeType(contentType.type(), contentType.parameter("codecs")); }