feat(embed): enable fullscreen

This commit is contained in:
Jeremy Kahn 2023-10-09 09:42:12 -05:00
parent 0911c29729
commit 1370b9d197
2 changed files with 22 additions and 15 deletions

View File

@ -159,21 +159,19 @@ export const ShellAppBar = ({
<RoomPreferences />
</IconButton>
</Tooltip>
{isEmbedded ? null : (
<Tooltip
title={isFullscreen ? 'Exit fullscreen' : 'Enter fullscreen'}
<Tooltip
title={isFullscreen ? 'Exit fullscreen' : 'Enter fullscreen'}
>
<IconButton
size="large"
edge="end"
color="inherit"
aria-label="fullscreen"
onClick={onClickFullscreen}
>
<IconButton
size="large"
edge="end"
color="inherit"
aria-label="fullscreen"
onClick={onClickFullscreen}
>
{isFullscreen ? <FullscreenExit /> : <Fullscreen />}
</IconButton>
</Tooltip>
)}
{isFullscreen ? <FullscreenExit /> : <Fullscreen />}
</IconButton>
</Tooltip>
<Tooltip title="Click to show peer list">
<IconButton
size="large"

View File

@ -13,6 +13,13 @@ interface EmbedCodeDialogProps {
embedUrl: URL
}
const iframeFeatureAllowList = [
'camera',
'microphone',
'display-capture',
'fullscreen',
]
export const EmbedCodeDialog = ({
showEmbedCode,
handleEmbedCodeWindowClose,
@ -33,7 +40,9 @@ export const EmbedCodeDialog = ({
}}
wrapLines={true}
>
{`<iframe src="${embedUrl}" allow="camera;microphone;display-capture" width="800" height="800" />`}
{`<iframe src="${embedUrl}" allow="${iframeFeatureAllowList.join(
';'
)}" width="800" height="800" />`}
</SyntaxHighlighter>
<DialogContentText
sx={{