Merge pull request #2138 from robintown/disable-pip

Remove the disablePictureInPicture Firefox hack
This commit is contained in:
Robin 2024-02-02 09:40:03 -05:00 committed by GitHub
commit 2891ce0857
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 16 deletions

View File

@ -114,14 +114,7 @@ export const VideoPreview: FC<Props> = ({
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 && (
<div className={styles.avatarContainer}>

View File

@ -134,14 +134,7 @@ const Tile = forwardRef<HTMLDivElement, TileProps>(
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
/>
)}
</div>