fuliqi
2024-10-25 0a36c1e7503bafa76c93f065f7bbca651180163b
会议没声音
1个文件已修改
46 ■■■■ 已修改文件
src/views/meet/index.vue 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/meet/index.vue
@@ -21,7 +21,7 @@
onMounted(() => {
  const width = window.innerWidth;
  const height = window.innerHeight;
  const domain = 'ycl.easyblog.vip:82/' + id;
  const domain = 'ycl.easyblog.vip:8443/' + id;
  const options = {
    roomName: meetName,
    width: width,
@@ -55,7 +55,7 @@
        ]
      },
      ModeratorIndicator: true,
      startSilent: true,
      // startSilent: true,
      //禁用改名
      readOnlyName: true,
      //参会者名单
@@ -107,7 +107,7 @@
      // 禁用邀请
      disableInviteFunctions: true,
      //禁用全部静音
      disableRemoteMute: true,
      disableRemoteMute: false,
      //主持人选项
      participantsPane: {
        enabled: false,
@@ -130,7 +130,7 @@
  jitsiInit();
  // 连接webscoket
  connect();
  // connect();
});
const jitsiInit = () => {
@@ -139,26 +139,26 @@
  });
}
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: 'wss://ycl.easyblog.vip:82/websocket/' + userInfo._rawValue.id,
//   heartBeatData: 'ping'
// });
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');
      }
    }
);
// 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>