The decodingInfo() method of the MediaCapabilities interface returns a promise that fulfils with information about how well the user agent can decode/display media with a given configuration.
The encodingInfo() method of the MediaCapabilities interface returns a promise that fulfills with the tested media configuration's capabilities for encoding media.
The
MediaCapabilitiesinterface of the Media Capabilities API provides information about the decoding abilities of the device, system and browser.MDN Reference