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,7 +159,6 @@ 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'}
> >
@ -173,7 +172,6 @@ export const ShellAppBar = ({
{isFullscreen ? <FullscreenExit /> : <Fullscreen />} {isFullscreen ? <FullscreenExit /> : <Fullscreen />}
</IconButton> </IconButton>
</Tooltip> </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={{