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/Button.tsx b/client/src/components/Button.tsx
index a89726c..4e0d5ac 100644
--- a/client/src/components/Button.tsx
+++ b/client/src/components/Button.tsx
@@ -108,6 +108,7 @@
export type ExpandableButtonProps = IconButtonProps & {
isVertical?: boolean;
+ expandMenuOnClick?: boolean;
Icon?: ComponentType<SvgIconProps>;
expandMenuOptions?: (ExpandMenuOption | ExpandMenuRadioOption)[];
IconButtonComp?: ComponentType<IconButtonProps>;
@@ -116,6 +117,7 @@
export const ExpandableButton = ({
isVertical,
Icon,
+ expandMenuOnClick,
expandMenuOptions = undefined,
IconButtonComp = IconButton,
...props
@@ -194,7 +196,18 @@
/>
</IconButton>
)}
- <IconButtonComp {...props}>{Icon && <Icon />}</IconButtonComp>
+ <IconButtonComp
+ onClick={
+ expandMenuOnClick
+ ? (event) => {
+ setAnchorEl(event.currentTarget);
+ }
+ : undefined
+ }
+ {...props}
+ >
+ {Icon && <Icon />}
+ </IconButtonComp>
</Box>
</>
);