mirror of
https://github.com/vector-im/element-call.git
synced 2024-11-15 00:04:59 +08:00
Delint
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
eda8404144
commit
d5375ca9ed
@ -23,7 +23,6 @@ import { VideoTile } from "./VideoTile";
|
||||
import { VideoTileSettingsModal } from "./VideoTileSettingsModal";
|
||||
import { useModalTriggerState } from "../Modal";
|
||||
|
||||
|
||||
export function VideoTileContainer({
|
||||
item,
|
||||
width,
|
||||
@ -56,11 +55,13 @@ export function VideoTileContainer({
|
||||
isLocal,
|
||||
localVolume
|
||||
);
|
||||
const { modalState: videoTileSettingsModalState, modalProps: videoTileSettingsModalProps } =
|
||||
useModalTriggerState();
|
||||
const {
|
||||
modalState: videoTileSettingsModalState,
|
||||
modalProps: videoTileSettingsModalProps,
|
||||
} = useModalTriggerState();
|
||||
const onOptionsPress = () => {
|
||||
videoTileSettingsModalState.open();
|
||||
}
|
||||
};
|
||||
|
||||
// Firefox doesn't respect the disablePictureInPicture attribute
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1611831
|
||||
@ -83,7 +84,12 @@ export function VideoTileContainer({
|
||||
showOptions={!item.callFeed.isLocal()}
|
||||
{...rest}
|
||||
/>
|
||||
{videoTileSettingsModalState.isOpen && <VideoTileSettingsModal {...videoTileSettingsModalProps} feed={item.callFeed} />}
|
||||
{videoTileSettingsModalState.isOpen && (
|
||||
<VideoTileSettingsModal
|
||||
{...videoTileSettingsModalProps}
|
||||
feed={item.callFeed}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ export function useCallFeed(callFeed) {
|
||||
}
|
||||
|
||||
function onLocalVolumeChanged(localVolume) {
|
||||
setState((prevState) => ({ ...prevState, localVolume }))
|
||||
setState((prevState) => ({ ...prevState, localVolume }));
|
||||
}
|
||||
|
||||
function onUpdateCallFeed() {
|
||||
@ -69,7 +69,10 @@ export function useCallFeed(callFeed) {
|
||||
CallFeedEvent.MuteStateChanged,
|
||||
onMuteStateChanged
|
||||
);
|
||||
callFeed.removeListener(CallFeedEvent.LocalVolumeChanged, onLocalVolumeChanged);
|
||||
callFeed.removeListener(
|
||||
CallFeedEvent.LocalVolumeChanged,
|
||||
onLocalVolumeChanged
|
||||
);
|
||||
callFeed.removeListener(CallFeedEvent.NewStream, onUpdateCallFeed);
|
||||
}
|
||||
};
|
||||
|
@ -34,7 +34,7 @@ export const useMediaStream = (
|
||||
stream: MediaStream,
|
||||
audioOutputDevice: string,
|
||||
mute = false,
|
||||
localVolume: number,
|
||||
localVolume: number
|
||||
): RefObject<MediaElement> => {
|
||||
const mediaRef = useRef<MediaElement>();
|
||||
|
||||
@ -90,7 +90,7 @@ export const useMediaStream = (
|
||||
if (localVolume === null || localVolume === undefined) return;
|
||||
|
||||
mediaRef.current.volume = localVolume;
|
||||
}, [localVolume])
|
||||
}, [localVolume]);
|
||||
|
||||
useEffect(() => {
|
||||
const mediaEl = mediaRef.current;
|
||||
@ -196,7 +196,7 @@ export const useSpatialMediaStream = (
|
||||
audioContext: AudioContext,
|
||||
audioDestination: AudioNode,
|
||||
mute = false,
|
||||
localVolume: number,
|
||||
localVolume: number
|
||||
): [RefObject<Element>, RefObject<MediaElement>] => {
|
||||
const tileRef = useRef<Element>();
|
||||
const [spatialAudio] = useSpatialAudio();
|
||||
@ -205,7 +205,7 @@ export const useSpatialMediaStream = (
|
||||
stream,
|
||||
audioOutputDevice,
|
||||
spatialAudio || mute,
|
||||
localVolume,
|
||||
localVolume
|
||||
);
|
||||
|
||||
const pannerNodeRef = useRef<PannerNode>();
|
||||
|
Loading…
Reference in New Issue
Block a user