Media Capabilities API

The Media Capabilities API allows developers to determine the decoding and encoding abilities of the device. It exposes information such as whether a media is supported and whether playback should be smooth and power-efficient, with real-time feedback about the playback to better enable adaptive streaming, and access to display property information.

The navigator.mediaCapabilities object exposes the decondingInfo() and encodingInfo() methods, which accepts either an audio configuration object or a video configuration object.
RESETRUNFULL
<!DOCTYPE html><html><body><script>
if ('mediaCapabilities' in navigator) {
   const audioConfig = {
      type : 'file',
      audio : {
         contentType: "audio/mp3",
         channels: 2,
         bitrate: 132700,
         samplerate: 5200
      }
   };
   navigator.mediaCapabilities.decodingInfo(audioConfig).then(result => {
      document.write('This configuration is ' +
                     (result.supported ? '' : 'not ') + 'supported, ' +
                     (result.smooth ? '' : 'not ') + 'smooth, and ' +
                     (result.powerEfficient ? '' : 'not ') + 'power efficient.');
   }).catch(() => {
      document.write("decodingInfo error: " + contentType)
   });
}
</script></body></html>