Search code examples
javascriptdolbydolby-audio-api

How to detect if a device can play Dolby Atmos Sound with Javascript


I am looking for a way to detect if the device I am using can support Dolby Atmos sounds.

After searching around I found this call.

https://github.com/w3c/media-capabilities/blob/main/explainer.md#spatial-audio

navigator.mediaCapabilities.decodingInfo({
    type: 'file';
    audio: {
        // Determine support for Dolby Atmos by checking Dolby Digital Plus and spatial rendering.
        contentType: "audio/mp4; codecs=ec-3",
        spatialRendering: true,
    }
}).then(result => {
    // Do things based on results.
    console.log(result.supported);
    console.log(result.smooth);
    console.log(result.powerEfficient);
});

I guess this detects the codec the media was encoded with and if it support spatial audio.

Detecting the codec doesn't necessarily detect whether the system can support Dolby Atmos from what I understand the system needs to be connect to a receiver via a HDMI cable with arch support.

https://www.samsung.com/my/support/tv-audio-video/how-to-use-hdmi-arc-on-samsung-smart-tv/

The receiver needs to support multiple outputs to take the meta data sent from the codec parse through the HDMI arch and then the receiver knows which speaks to send the specific sounds too.

Something like this. https://www.richersounds.com/catalog/product/view/id/16007/s/denon-avcx8500h-black/

What reliable way is there to detect if your system will truly support Dolby Atmos whether its with a receiver or a Dolby Atmos compliant sound bar.

Any suggestions?


Solution

  • Detecting the codec doesn't necessarily detect whether the system can support Dolby Atmos

    Correct.

    What reliable way is there to detect if your system will truly support Dolby Atmos whether its with a receiver or a Dolby Atmos compliant sound bar.

    Unfortunately, this undetectable from the browser.

    The browser itself and even the OS doesn't always know what is downstream. Sorry for the bad news!