Is there a way to get aspect ratio of the webcam in firefox

I’m trying to get the aspect ratio of the webcam using javascript.
As per this documentation, it’s not working for firefox.
https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackSettings/aspectRatio

As Per it says, and I tried it’s working in chrome perfectly well and not working in firefox, it gives undefined for aspect ratio in firefox.

But I have seen that this site – https://webcamtests.com/
Somehow able to detect the aspect ratio of the webcam?

Is there any workaround to get the aspect ratio for firefox?