If you change roles to audience, then come back to host, the camera and mic do not work
This issue was related to how the <videoCall/> and <TracksConfigure/> components are mounted and unmounted by the UIKit when the role changes. in React 18 the mount and unmounts are not as clear cut as older versions of React so when the <videoCall/> gets mounted as part of the audience flow and then remounted as part of the host flow it causes the component to mount and unmount which creates a shadow reference in the RTCConfigure so the leave channel is properly executed.
to resolve this issue, I moved the role logic from the main UIKit component to TracksConfigure component
This issue was related to how the
<videoCall/>
and<TracksConfigure/>
components are mounted and unmounted by the UIKit when the role changes. in React 18 the mount and unmounts are not as clear cut as older versions of React so when the<videoCall/>
gets mounted as part of the audience flow and then remounted as part of the host flow it causes the component to mount and unmount which creates a shadow reference in the RTCConfigure so the leave channel is properly executed.to resolve this issue, I moved the role logic from the main UIKit component to TracksConfigure component