Remove volume button in call interface in Firefox
Add click event for `CallingVolumeButton` and `CallingScreenShareButton`
in call interface to open their respective menu.
Remove localVideoRef and remoteVideoRef from CallProvider
Change-Id: I87601153cb3e24b38a5f764b11935e32402caa31
diff --git a/client/src/components/CallButtons.tsx b/client/src/components/CallButtons.tsx
index 2ecc4fc..d1beab8 100644
--- a/client/src/components/CallButtons.tsx
+++ b/client/src/components/CallButtons.tsx
@@ -152,6 +152,7 @@
return (
<CallButton
aria-label="screen share"
+ expandMenuOnClick
Icon={ScreenShareArrowIcon}
expandMenuOptions={[
{
@@ -206,17 +207,13 @@
export const CallingVolumeButton = (props: ExpandableButtonProps) => {
const options = useMediaDeviceExpandMenuOptions('audiooutput');
- const { remoteVideoRef } = useContext(CallContext);
-
- // Audio out options are only available on chrome and other browsers that support `setSinkId`
- // https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/setSinkId#browser_compatibility
- const hasSetSinkId = remoteVideoRef.current?.setSinkId != null;
return (
<CallButton
aria-label="volume options"
+ expandMenuOnClick
Icon={VolumeIcon}
- expandMenuOptions={hasSetSinkId ? options : undefined}
+ expandMenuOptions={options}
{...props}
/>
);