From 08249638117ea91d3fd458de16d8ec3ca18f4a38 Mon Sep 17 00:00:00 2001 From: Robin Date: Thu, 1 Feb 2024 14:06:53 -0500 Subject: [PATCH] Remove the disablePictureInPicture Firefox hack https://bugzilla.mozilla.org/show_bug.cgi?id=1865748 is fixed in Firefox 122.0, so we can now use the attribute the normal way. --- src/room/VideoPreview.tsx | 9 +-------- src/video-grid/VideoTile.tsx | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/src/room/VideoPreview.tsx b/src/room/VideoPreview.tsx index 599367d0..4d1f040c 100644 --- a/src/room/VideoPreview.tsx +++ b/src/room/VideoPreview.tsx @@ -114,14 +114,7 @@ export const VideoPreview: FC = ({ playsInline // There's no reason for this to be focusable tabIndex={-1} - // React supports the disablePictureInPicture attribute, but Firefox - // only recognizes a value of "true", whereas React sets it to the empty - // string. So we need to bypass React and set it specifically to "true". - // https://bugzilla.mozilla.org/show_bug.cgi?id=1865748 - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - // eslint-disable-next-line react/no-unknown-property - disablepictureinpicture="true" + disablePictureInPicture /> {!muteStates.video.enabled && (
diff --git a/src/video-grid/VideoTile.tsx b/src/video-grid/VideoTile.tsx index 3ba16315..45543707 100644 --- a/src/video-grid/VideoTile.tsx +++ b/src/video-grid/VideoTile.tsx @@ -134,14 +134,7 @@ const Tile = forwardRef( trackRef={video} // There's no reason for this to be focusable tabIndex={-1} - // React supports the disablePictureInPicture attribute, but Firefox - // only recognizes a value of "true", whereas React sets it to the empty - // string. So we need to bypass React and set it specifically to "true". - // https://bugzilla.mozilla.org/show_bug.cgi?id=1865748 - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - // eslint-disable-next-line react/no-unknown-property - disablepictureinpicture="true" + disablePictureInPicture /> )}