diff --git a/.changeset/remove_pip_video_setting_now_that_we_have_sable_call.md b/.changeset/remove_pip_video_setting_now_that_we_have_sable_call.md new file mode 100644 index 000000000..00c84f43e --- /dev/null +++ b/.changeset/remove_pip_video_setting_now_that_we_have_sable_call.md @@ -0,0 +1,5 @@ +--- +default: minor +--- + +# Remove pip video setting now that we have sable call diff --git a/src/app/features/settings/cosmetics/Cosmetics.tsx b/src/app/features/settings/cosmetics/Cosmetics.tsx index 601c078d1..d1a65b6ba 100644 --- a/src/app/features/settings/cosmetics/Cosmetics.tsx +++ b/src/app/features/settings/cosmetics/Cosmetics.tsx @@ -232,23 +232,6 @@ function IdentityCosmetics() { ); } -function VideoCosmetics() { - const [allowPipVideos, setPipVideos] = useSetting(settingsAtom, 'allowPipVideos'); - - return ( - - Video - - } - /> - - - ); -} - type CosmeticsProps = { requestClose: () => void; }; @@ -278,7 +261,6 @@ export function Cosmetics({ requestClose }: CosmeticsProps) { - diff --git a/src/app/hooks/useCallEmbed.ts b/src/app/hooks/useCallEmbed.ts index 4039bc70b..a5bd94b9d 100644 --- a/src/app/hooks/useCallEmbed.ts +++ b/src/app/hooks/useCallEmbed.ts @@ -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, @@ -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, diff --git a/src/app/state/settings.ts b/src/app/state/settings.ts index c7de24591..e9331c62f 100644 --- a/src/app/state/settings.ts +++ b/src/app/state/settings.ts @@ -50,7 +50,6 @@ export interface Settings { showHiddenEvents: boolean; showTombstoneEvents: boolean; legacyUsernameColor: boolean; - allowPipVideos: boolean; usePushNotifications: boolean; useInAppNotifications: boolean; @@ -130,7 +129,6 @@ const defaultSettings: Settings = { showHiddenEvents: false, showTombstoneEvents: false, legacyUsernameColor: false, - allowPipVideos: false, enableMSC4268CMD: false,