In Firefox and Safari no way to add device change event listener?

Trying to listen for device change using devicechange event listener. In Edge & Chrome the following code works:

navigator.mediaDevices.ondevicechange = () => {
  console.log('device changed');
};

However in Safari & Firefox that doesn’t work, but if I look into caniuse, it says that it’s supported: https://caniuse.com/mdn-api_mediadevices_devicechange_event

Anybody have an idea what am I doing wrong ? Tried executing code in console and still device change event not detected in Safari & Firefox.

Thank you!