vue-multi-split-player
Version:
A custom video player component
20 lines (16 loc) • 522 B
JavaScript
import { ref, computed, watch, getCurrentInstance, onMounted } from 'vue';
import { filterVoiceConfigId } from '@/utils/common'
export default function useVoiceChannel(classroomType, voiceConfig) {
let type = classroomType
type ??= ''
let voiceChannel = ref(new Set([]))
if (type !== '' && voiceConfig.length) {
let _v = String(voiceConfig.find(item => item.id === type)?.value)
if (_v) {
voiceChannel.value = filterVoiceConfigId(_v)
}
}
return {
voiceChannel
}
}