I am using AWS' Chime JavaScript SDK, and am running into an issue with the addDeviceChangeObserver
method that lives on the AudioVideoFacade
. Simply put, it doesn't appear to be firing any of the observer methods when my devices change. (i.e. when I unplug my headset, no observer methods fire - but I confirm my devices are no longer listed in the system settings.)
This is roughly how it looks when I set the observer:
import ChimeDeviceChangeObserver from '../chime/ChimeDeviceChangeObserver';
...
audioVideo.addDeviceChangeObserver(ChimeDeviceChangeObserver);
This is my ChimeDeviceChangeObserver class:
export default class ChimeDeviceChangeObserver {
audioOutputsChanged(freshAudioOutputDeviceList) {
console.log('Output list changed', freshAudioOutputDeviceList);
}
audioInputsChanged(freshAudioInputDeviceList) {
console.log('Input list changed', freshAudioInputDeviceList);
}
videoInputsChanged(freshVideoInputDeviceList) {
console.log('Video list changed', freshVideoInputDeviceList);
}
}
When I unplug/replug my device(s) none of the observer methods log as expected. I've doubled checked that my observer method names match the AWS SDK docs, and am at a loss what for to check next.
Thanks for any and all help!