Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
default: minor
---

# Remove pip video setting now that we have sable call
18 changes: 0 additions & 18 deletions src/app/features/settings/cosmetics/Cosmetics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,23 +232,6 @@ function IdentityCosmetics() {
);
}

function VideoCosmetics() {
const [allowPipVideos, setPipVideos] = useSetting(settingsAtom, 'allowPipVideos');

return (
<Box direction="Column" gap="100">
<Text size="L400">Video</Text>
<SequenceCard className={SequenceCardStyle} variant="SurfaceVariant" direction="Column">
<SettingTile
title="Picture in Picture Videos"
description="If your browser has it enabled, allows you to pop out the videos in the video call interface. Does not apply retroactively to current joined voice rooms."
after={<Switch variant="Primary" value={allowPipVideos} onChange={setPipVideos} />}
/>
</SequenceCard>
</Box>
);
}

type CosmeticsProps = {
requestClose: () => void;
};
Expand Down Expand Up @@ -278,7 +261,6 @@ export function Cosmetics({ requestClose }: CosmeticsProps) {
<IdentityCosmetics />
<JumboEmoji />
<Privacy />
<VideoCosmetics />
</Box>
</PageContent>
</Scroll>
Expand Down
15 changes: 0 additions & 15 deletions src/app/hooks/useCallEmbed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { createContext, RefObject, useCallback, useContext, useEffect, useState
import { MatrixRTCSession } from 'matrix-js-sdk/lib/matrixrtc/MatrixRTCSession';
import { MatrixClient, Room } from 'matrix-js-sdk';
import { useSetAtom } from 'jotai';
import { settingsAtom } from '$state/settings';
import { useSetting } from '$state/hooks/settings';
import * as Sentry from '@sentry/react';
import {
CallEmbed,
Expand Down Expand Up @@ -105,19 +103,6 @@ export const useCallStart = (dm = false) => {

export const useCallJoined = (embed?: CallEmbed): boolean => {
const [joined, setJoined] = useState(embed?.joined ?? false);
const [allowPip] = useSetting(settingsAtom, 'allowPipVideos');

if (embed && allowPip) {
const removeDisablePictureInPicture = (mutated: any) => {
mutated.forEach((event: any) => {
Array.from(event.target.getElementsByTagName('video')).forEach((video: any) => {
video.removeAttribute('disablepictureinpicture');
});
});
};
const pipObserver = new MutationObserver(removeDisablePictureInPicture);
pipObserver.observe(embed.iframe.contentDocument!, { subtree: true, childList: true });
}

useClientWidgetApiEvent(
embed?.call,
Expand Down
2 changes: 0 additions & 2 deletions src/app/state/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export interface Settings {
showHiddenEvents: boolean;
showTombstoneEvents: boolean;
legacyUsernameColor: boolean;
allowPipVideos: boolean;

usePushNotifications: boolean;
useInAppNotifications: boolean;
Expand Down Expand Up @@ -130,7 +129,6 @@ const defaultSettings: Settings = {
showHiddenEvents: false,
showTombstoneEvents: false,
legacyUsernameColor: false,
allowPipVideos: false,

enableMSC4268CMD: false,

Expand Down
Loading