时间优化

This commit is contained in:
yj 2024-10-21 14:58:47 +08:00
parent fa6b85e4f5
commit 487675d20e
2 changed files with 13 additions and 2 deletions

View File

@ -93,8 +93,15 @@ const ShareScreenWindow: React.FC = () => {
} }
}) })
return () => { return () => {
clearInterval(timeout) setTimeStr(res => {
channel.close(); channel.postMessage({
type: 'shareScreenWindowTime',
shareScreenWindowTime: res
});
clearInterval(timeout)
channel.close();
return res
})
}; };
}, []); }, []);
const changeCurrentSeconds = (time: number): string => { const changeCurrentSeconds = (time: number): string => {

View File

@ -208,6 +208,7 @@ const Meeting: React.FC = () => {
const { const {
type, type,
shareScreenWindowfooterListsTitle, shareScreenWindowfooterListsTitle,
shareScreenWindowTime,
userListWindowPostOpenMicr, userListWindowPostOpenMicr,
userListWindowPostOpenCamera, userListWindowPostOpenCamera,
userListWindowDeleteRoomManager, userListWindowDeleteRoomManager,
@ -239,6 +240,9 @@ const Meeting: React.FC = () => {
await stopScreenCapture() await stopScreenCapture()
await allUserLook(userInfo.uid, userInfo.userName) await allUserLook(userInfo.uid, userInfo.userName)
break; break;
case 'shareScreenWindowTime':
setCurrentSeconds(shareScreenWindowTime)
break;
case 'shareScreenWindowfooterListsTitle': case 'shareScreenWindowfooterListsTitle':
switch (shareScreenWindowfooterListsTitle) { switch (shareScreenWindowfooterListsTitle) {
case '静音': case '静音':