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/contexts/CallProvider.tsx b/client/src/contexts/CallProvider.tsx
index fdb6935..13e0d24 100644
--- a/client/src/contexts/CallProvider.tsx
+++ b/client/src/contexts/CallProvider.tsx
@@ -16,7 +16,7 @@
* <https://www.gnu.org/licenses/>.
*/
import { CallAction, CallBegin, WebSocketMessageType } from 'jami-web-common';
-import { createContext, MutableRefObject, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
+import { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react';
import { Navigate, useNavigate } from 'react-router-dom';
import LoadingPage from '../components/Loading';
@@ -46,24 +46,10 @@
};
type CurrentMediaDeviceIds = Record<MediaDeviceKind, MediaDeviceIdState>;
-/**
- * HTMLVideoElement with the `sinkId` and `setSinkId` optional properties.
- *
- * These properties are defined only on supported browsers
- * https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/setSinkId#browser_compatibility
- */
-interface VideoElementWithSinkId extends HTMLVideoElement {
- sinkId?: string;
- setSinkId?: (deviceId: string) => void;
-}
-
export interface ICallContext {
mediaDevices: MediaDevicesInfo;
currentMediaDeviceIds: CurrentMediaDeviceIds;
- localVideoRef: MutableRefObject<VideoElementWithSinkId | null>;
- remoteVideoRef: MutableRefObject<VideoElementWithSinkId | null>;
-
isAudioOn: boolean;
setIsAudioOn: SetState<boolean>;
isVideoOn: boolean;
@@ -101,9 +87,6 @@
},
},
- localVideoRef: { current: null },
- remoteVideoRef: { current: null },
-
isAudioOn: false,
setIsAudioOn: () => {},
isVideoOn: false,
@@ -144,9 +127,6 @@
const { conversationId, conversation } = useContext(ConversationContext);
const navigate = useNavigate();
- const localVideoRef = useRef<HTMLVideoElement | null>(null);
- const remoteVideoRef = useRef<HTMLVideoElement | null>(null);
-
const [mediaDevices, setMediaDevices] = useState(defaultCallContext.mediaDevices);
const [audioInputDeviceId, setAudioInputDeviceId] = useState<string>();
const [audioOutputDeviceId, setAudioOutputDeviceId] = useState<string>();
@@ -404,8 +384,6 @@
value={{
mediaDevices,
currentMediaDeviceIds,
- localVideoRef,
- remoteVideoRef,
isAudioOn,
setIsAudioOn,
isVideoOn,