From 3cccb869028404f5aed0c426a7c0a94f6ca86644 Mon Sep 17 00:00:00 2001 From: Robert Long Date: Mon, 29 Nov 2021 14:43:13 -0800 Subject: [PATCH] Fix media handler event --- src/Room.jsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Room.jsx b/src/Room.jsx index f4c0f71..7225bf5 100644 --- a/src/Room.jsx +++ b/src/Room.jsx @@ -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); }; }, []);