Fix media handler event
This commit is contained in:
parent
9a5f40baa0
commit
3cccb86902
1 changed files with 2 additions and 5 deletions
|
@ -349,14 +349,11 @@ function useMediaHandler(client) {
|
|||
|
||||
updateDevices();
|
||||
|
||||
mediaHandler.on("MediaHandler.localStreamsChanged", updateDevices);
|
||||
mediaHandler.on("local_streams_changed", updateDevices);
|
||||
navigator.mediaDevices.addEventListener("devicechange", updateDevices);
|
||||
|
||||
return () => {
|
||||
mediaHandler.removeListener(
|
||||
"MediaHandler.localStreamsChanged",
|
||||
updateDevices
|
||||
);
|
||||
mediaHandler.removeListener("local_streams_changed", updateDevices);
|
||||
navigator.mediaDevices.removeEventListener("devicechange", updateDevices);
|
||||
};
|
||||
}, []);
|
||||
|
|
Loading…
Reference in a new issue