From ab0e808d99312422b4d88de2c5f0ecd91776c35b Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期二, 29 十月 2024 14:44:27 +0800 Subject: [PATCH] 正式环境 --- src/views/meet/index.vue | 107 +++++++++++++++++++++++++++++++---------------------- 1 files changed, 62 insertions(+), 45 deletions(-) diff --git a/src/views/meet/index.vue b/src/views/meet/index.vue index 36c5d42..c28f8ea 100644 --- a/src/views/meet/index.vue +++ b/src/views/meet/index.vue @@ -5,18 +5,23 @@ </template> <script setup> -import { ref, watch, onMounted } from 'vue'; -import { useRoute } from 'vue-router'; +import {ref, watch, onMounted} from 'vue'; +import {useRoute} from 'vue-router'; import useWebScoket from "@/hooks/useWebScoket.js"; +import {storeToRefs} from 'pinia'; +import {useUserStore} from '@/store/index.js'; + const route = useRoute(); const meet = ref(null); -const { meetName, id, userName, userCode } = route.query; +const userStore = useUserStore(); +const {userInfo} = storeToRefs(userStore); +const {meetName, id, userName, userCode} = route.query; let jitsiApi = null; onMounted(() => { const width = window.innerWidth; const height = window.innerHeight; - const domain = 'ycl.easyblog.vip:8443/' + id; + const domain = 'www.kgmeet.com:8443/' + id; const options = { roomName: meetName, width: width, @@ -31,6 +36,26 @@ gravatar: { disabled: true }, + // 鎺у埗椤堕儴鏍囬浼氳淇℃伅鏍囩鐨勫彲瑙佹�у拰琛屼负銆� + // 濡傛灉鏍囩鐨� ID 涓嶅湪涓婅堪涓や釜鏁扮粍涓殑浠讳綍涓�涓腑锛屽垯瀹冨湪鏍囬涓婃牴鏈笉鍙銆� + conferenceInfo: { + // 杩欎簺鏍囩涓嶄細涓庡伐鍏风涓�璧烽殣钘忋�� + alwaysVisible: ['recording'], + // 杩欎簺鏍囩灏嗕笌宸ュ叿绠辨寜閽竴璧疯嚜鍔ㄩ殣钘忋�� + autoHide: [ + // 'raised-hands-count', + 'subject', + 'conference-timer', + 'participants-count', + 'e2ee', + 'video-quality', + 'insecure-room', + 'highlight-moment', + 'top-panel-toggle', + ] + }, + ModeratorIndicator: true, + // startSilent: true, //绂佺敤鏀瑰悕 readOnlyName: true, //鍙備細鑰呭悕鍗� @@ -41,34 +66,23 @@ disabledDemote: false }, // 鑷畾涔夋寜閽� - // 鑷畾涔夋寜閽� toolbarButtons: [ // 鎽勫儚澶� 'camera', // 鑱婂ぉ 'chat', - // 'closedcaptions', // 鍏变韩 'desktop', 'download', - // 'embedmeeting', - // 'etherpad', - // 'feedback', - // 'filmstrip', 'fullscreen', 'hangup', - // 'help', 'highlight', - // 'invite', 'linktosalesforce', 'livestreaming', 'microphone', 'noisesuppression', - // 'participants-pane', - // 'profile', - // 'raisehand', + 'raisehand', 'recording', - // 'security', 'select-background', 'settings', 'shareaudio', @@ -77,13 +91,23 @@ 'stats', 'tileview', 'toggle-camera', - // 'videoquality', + // 'closedcaptions', + // 'embedmeeting', + // 'etherpad', + // 'feedback', + // 'filmstrip', + // 'help', + // 'invite', + // 'participants-pane', + // 'profile', + // 'security', + 'videoquality', 'whiteboard' ], // 绂佺敤閭�璇� disableInviteFunctions: true, //绂佺敤鍏ㄩ儴闈欓煶 - disableRemoteMute: true, + disableRemoteMute: false, //涓绘寔浜洪�夐」 participantsPane: { enabled: false, @@ -106,7 +130,7 @@ jitsiInit(); // 杩炴帴webscoket - connect(); + // connect(); }); const jitsiInit = () => { @@ -115,33 +139,26 @@ }); } -const mute = () => { - jitsiApi.executeCommand('toggleAudio'); -} -const kickOut = () => { - jitsiApi.executeCommand('hangup'); -} +// const {status, message, error, connect, disconnect, sendMessage} = useWebScoket({ +// url: 'wss://ycl.easyblog.vip:82/websocket/' + userInfo._rawValue.id, +// heartBeatData: 'ping' +// }); -const { status, message, error, connect, disconnect, sendMessage } = useWebScoket({ - url: 'ws://127.0.0.1:8000/websocket/' + 1, - heartBeatData: 'ping' -}); - -watch( - () => message.value, - (msg) => { - console.log('msg', msg.commend); - if (msg.commend === 'kickOut') { - kickOut(); - } - if (msg.commend === 'mute') { - mute(); - } - if (msg.commend === 'openCamera') { - alert("鍒囨崲鎽勫儚澶�") - } - } -); +// watch( +// () => message.value, +// (msg) => { +// console.log('msg', msg.commend); +// if (msg.commend === 'kickOut') { +// jitsiApi.executeCommand('hangup'); +// } +// if (msg.commend === 'mute') { +// jitsiApi.executeCommand('toggleAudio'); +// } +// if (msg.commend === 'openCamera') { +// jitsiApi.executeCommand('toggleVideo'); +// } +// } +// ); </script> -- Gitblit v1.8.0