hideScreensharing
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
2d25d3c2bc
commit
96b1a5f296
2 changed files with 15 additions and 6 deletions
|
|
@ -57,6 +57,7 @@ import { useFullscreen } from "../video-grid/useFullscreen";
|
|||
import { AudioContainer } from "../video-grid/AudioContainer";
|
||||
import { useAudioOutputDevice } from "../video-grid/useAudioOutputDevice";
|
||||
import { widget, ElementWidgetActions } from "../widget";
|
||||
import { useUrlParams } from "../UrlParams";
|
||||
|
||||
const canScreenshare = "getDisplayMedia" in (navigator.mediaDevices ?? {});
|
||||
// There is currently a bug in Safari our our code with cloning and sending MediaStreams
|
||||
|
|
@ -141,6 +142,8 @@ export function InCallView({
|
|||
|
||||
useAudioOutputDevice(audioRef, audioOutput);
|
||||
|
||||
const { hideScreensharing } = useUrlParams();
|
||||
|
||||
useEffect(() => {
|
||||
widget?.api.transport.send(
|
||||
layout === "freedom"
|
||||
|
|
@ -329,12 +332,15 @@ export function InCallView({
|
|||
<div className={styles.footer}>
|
||||
<MicButton muted={microphoneMuted} onPress={toggleMicrophoneMuted} />
|
||||
<VideoButton muted={localVideoMuted} onPress={toggleLocalVideoMuted} />
|
||||
{canScreenshare && !isSafari && !reducedControls && (
|
||||
<ScreenshareButton
|
||||
enabled={isScreensharing}
|
||||
onPress={toggleScreensharing}
|
||||
/>
|
||||
)}
|
||||
{canScreenshare &&
|
||||
!hideScreensharing &&
|
||||
!isSafari &&
|
||||
!reducedControls && (
|
||||
<ScreenshareButton
|
||||
enabled={isScreensharing}
|
||||
onPress={toggleScreensharing}
|
||||
/>
|
||||
)}
|
||||
{!reducedControls && (
|
||||
<OverflowMenu
|
||||
inCall
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue