Skip to content

Commit

Permalink
perf: 优化会议
Browse files Browse the repository at this point in the history
  • Loading branch information
kuaifan committed Dec 19, 2024
1 parent 90558d5 commit 7849460
Show file tree
Hide file tree
Showing 4 changed files with 575 additions and 8 deletions.
22 changes: 22 additions & 0 deletions electron/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,28 @@ function createMainWindow() {
}
})

mainWindow.webContents.session.setPermissionRequestHandler((webContents, permission, callback) => {
const allowedPermissions = [
'cookies', // cookies
'media', // 摄像头和麦克风
'notifications', // 通知
'clipboard-read', // 剪贴板读取
'clipboard-write' // 剪贴板写入
];
callback(allowedPermissions.includes(permission));
});

mainWindow.webContents.session.setPermissionCheckHandler((webContents, permission) => {
const allowedPermissions = [
'cookies',
'media',
'notifications',
'clipboard-read',
'clipboard-write'
];
return allowedPermissions.includes(permission);
});

mainWindow.on('page-title-updated', (event, title) => {
if (title == "index.html") {
event.preventDefault()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
fullscreen>
<ul>
<li v-if="localUser.uid">
<MeetingPlayer :player="localUser" isLocal/>
<Player :player="localUser" isLocal/>
</li>
<li v-for="user in remoteUsers">
<MeetingPlayer :player="user"/>
<Player :player="user"/>
</li>
</ul>
<div slot="footer" class="adaption meeting-button-group">
Expand Down Expand Up @@ -123,14 +123,16 @@

<script>
import {mapState} from 'vuex'
import MeetingPlayer from "./MeetingPlayer.vue";
import DragBallComponent from "../../../components/DragBallComponent";
import UserSelect from "../../../components/UserSelect.vue";
import emitter from "../../../store/events";
import Player from "./player.vue";
import DragBallComponent from "../../../../components/DragBallComponent";
import UserSelect from "../../../../components/UserSelect.vue";
import emitter from "../../../../store/events";
import {getErrorMessage} from "./utils";
import {getLanguage} from "../../../../language";
export default {
name: "MeetingManager",
components: {UserSelect, DragBallComponent, MeetingPlayer},
components: {UserSelect, DragBallComponent, Player},
props: {
id: {
type: String,
Expand Down Expand Up @@ -576,7 +578,10 @@ export default {
this.meetingShow = true;
} catch (error) {
console.error(error)
$A.modalError("会议组件加载失败!");
$A.modalError({
language: false,
content: getErrorMessage(error.code, getLanguage()) || this.$L("会议组件加载失败!"),
});
}
} catch (e) { }
this.addShow = false;
Expand Down
Loading

0 comments on commit 7849460

Please sign in to comment.