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 /> <RoomPreferences />
</IconButton> </IconButton>
</Tooltip> </Tooltip>
{isEmbedded ? null : ( <Tooltip
<Tooltip title={isFullscreen ? 'Exit fullscreen' : 'Enter fullscreen'}
title={isFullscreen ? 'Exit fullscreen' : 'Enter fullscreen'} >
<IconButton
size="large"
edge="end"
color="inherit"
aria-label="fullscreen"
onClick={onClickFullscreen}
> >
<IconButton {isFullscreen ? <FullscreenExit /> : <Fullscreen />}
size="large" </IconButton>
edge="end" </Tooltip>
color="inherit"
aria-label="fullscreen"
onClick={onClickFullscreen}
>
{isFullscreen ? <FullscreenExit /> : <Fullscreen />}
</IconButton>
</Tooltip>
)}
<Tooltip title="Click to show peer list"> <Tooltip title="Click to show peer list">
<IconButton <IconButton
size="large" size="large"

View File

@ -13,6 +13,13 @@ interface EmbedCodeDialogProps {
embedUrl: URL embedUrl: URL
} }
const iframeFeatureAllowList = [
'camera',
'microphone',
'display-capture',
'fullscreen',
]
export const EmbedCodeDialog = ({ export const EmbedCodeDialog = ({
showEmbedCode, showEmbedCode,
handleEmbedCodeWindowClose, handleEmbedCodeWindowClose,
@ -33,7 +40,9 @@ export const EmbedCodeDialog = ({
}} }}
wrapLines={true} 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> </SyntaxHighlighter>
<DialogContentText <DialogContentText
sx={{ sx={{