龚焕茏
2024-08-12 8e867f310b54fe94fe8914608ede9a06836937c3
feat:自带命令全体静音、关闭摄像头
1个文件已修改
8 ■■■■ 已修改文件
src/views/meet/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/meet/index.vue
@@ -26,8 +26,8 @@
                <el-dropdown trigger="click" @command="handleCommand">
                  <i class="el-icon-more-outline" id="more"></i>
                  <el-dropdown-menu slot="dropdown">
                    <el-dropdown-item :command="{ command: 'openCamera', id: scope.row.id }">打开摄像头</el-dropdown-item>
                    <el-dropdown-item :command="{ command: 'mute', id: scope.row.id }">静音</el-dropdown-item>
                    <el-dropdown-item :command="{ command: 'openCamera', id: scope.row.id }">打开/关闭摄像头</el-dropdown-item>
                    <el-dropdown-item :command="{ command: 'mute', id: scope.row.id }">静音/取消静音</el-dropdown-item>
                    <el-dropdown-item :command="{ command: 'kickOut', id: scope.row.id }">踢出</el-dropdown-item>
                  </el-dropdown-menu>
                </el-dropdown>
@@ -42,6 +42,7 @@
            </el-table-column>
          </el-table>
          <el-button class="link-left" type="primary" size="small" @click="muteEveryone">全体静音</el-button>
          <el-button class="link-left" type="primary" size="small" @click="videoEveryone">全体关闭摄像头</el-button>
        </el-row>
      </div>
    </div>
@@ -78,6 +79,9 @@
  },
  methods: {
    muteEveryone() {
      this.jitsiApi.executeCommand('muteEveryone', 'audio');
    },
    videoEveryone() {
      this.jitsiApi.executeCommand('muteEveryone', 'video');
    },
    handleCommand(command) {