Skip to content

Commit

Permalink
style: add toast tip for not support full screen browser
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed Aug 29, 2023
1 parent 65284e3 commit 7ca7e36
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { useSize } from '../../utils/useResizeObserver';
import { Translate } from '../../translate';
import { useMemo } from 'react';
import { FullScreenBtn } from '../FullScreenBtn';
import { useEvent } from '@capital/common';
import { showToasts, useEvent } from '@capital/common';

/** @public */
export type ParticipantTileProps = React.HTMLAttributes<HTMLDivElement> & {
Expand Down Expand Up @@ -183,6 +183,12 @@ export const ParticipantTile = ({
if (checkIsFullscreen()) {
document.exitFullscreen();
} else {
if (!containerEl.current.requestFullscreen) {
console.log(Translate.notSupportDOMFullscreen);
showToasts(Translate.notSupportDOMFullscreen, 'info');
return;
}

containerEl.current.requestFullscreen();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,8 @@ export const Translate = {
'zh-CN': '这些人正在会中:',
'en-US': 'Here is people in meeting:',
}),
notSupportDOMFullscreen: localTrans({
'zh-CN': '当前浏览器不支持视图全屏',
'en-US': 'Current browser does not support DOM full screen',
}),
};

0 comments on commit 7ca7e36

Please sign in to comment.