视频会议
This commit is contained in:
@@ -451,40 +451,70 @@ const swapPrimaryTile = () => {
|
||||
}
|
||||
|
||||
const onMicToggle = async () => {
|
||||
if (audioLoading.value || leaving.value) return
|
||||
console.log('[CloudLawVideoCall] onMicToggle clicked', {
|
||||
audioLoading: audioLoading.value,
|
||||
leaving: leaving.value,
|
||||
audioEnabled: audioEnabled.value,
|
||||
localAudioEnabled: meetingStore.localAudioEnabled,
|
||||
localProducerAudio: meetingStore.localProducers?.audio,
|
||||
isInMeeting: meetingStore.isInMeeting
|
||||
})
|
||||
if (audioLoading.value || leaving.value) {
|
||||
console.warn('[CloudLawVideoCall] onMicToggle short-circuited by loading/leaving flag')
|
||||
return
|
||||
}
|
||||
audioLoading.value = true
|
||||
try {
|
||||
if (audioEnabled.value) {
|
||||
console.log('[CloudLawVideoCall] -> stopLocalAudio')
|
||||
await meetingStore.stopLocalAudio()
|
||||
console.log('[CloudLawVideoCall] stopLocalAudio done')
|
||||
} else {
|
||||
console.log('[CloudLawVideoCall] -> startLocalAudio')
|
||||
await meetingStore.startLocalAudio()
|
||||
console.log('[CloudLawVideoCall] startLocalAudio done, localAudioEnabled =', meetingStore.localAudioEnabled)
|
||||
localMediaError.value = ''
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('[CloudLawVideoCall] mic toggle failed', err)
|
||||
const msg = err?.message || '麦克风操作失败'
|
||||
localMediaError.value = `麦克风:${msg}`
|
||||
uni.showModal({ title: '麦克风开启失败', content: msg, showCancel: false })
|
||||
uni.showModal({ title: '麦克风操作失败', content: msg, showCancel: false })
|
||||
} finally {
|
||||
audioLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const onCamToggle = async () => {
|
||||
if (videoLoading.value || leaving.value) return
|
||||
console.log('[CloudLawVideoCall] onCamToggle clicked', {
|
||||
videoLoading: videoLoading.value,
|
||||
leaving: leaving.value,
|
||||
videoEnabled: videoEnabled.value,
|
||||
localVideoEnabled: meetingStore.localVideoEnabled,
|
||||
localProducerVideo: meetingStore.localProducers?.video,
|
||||
isInMeeting: meetingStore.isInMeeting
|
||||
})
|
||||
if (videoLoading.value || leaving.value) {
|
||||
console.warn('[CloudLawVideoCall] onCamToggle short-circuited by loading/leaving flag')
|
||||
return
|
||||
}
|
||||
videoLoading.value = true
|
||||
try {
|
||||
if (videoEnabled.value) {
|
||||
console.log('[CloudLawVideoCall] -> stopLocalVideo')
|
||||
await meetingStore.stopLocalVideo()
|
||||
console.log('[CloudLawVideoCall] stopLocalVideo done')
|
||||
} else {
|
||||
console.log('[CloudLawVideoCall] -> startLocalVideo')
|
||||
await meetingStore.startLocalVideo()
|
||||
console.log('[CloudLawVideoCall] startLocalVideo done, localVideoEnabled =', meetingStore.localVideoEnabled)
|
||||
localMediaError.value = ''
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('[CloudLawVideoCall] cam toggle failed', err)
|
||||
const msg = err?.message || '摄像头操作失败'
|
||||
localMediaError.value = `摄像头:${msg}`
|
||||
uni.showModal({ title: '摄像头开启失败', content: msg, showCancel: false })
|
||||
uni.showModal({ title: '摄像头操作失败', content: msg, showCancel: false })
|
||||
} finally {
|
||||
videoLoading.value = false
|
||||
}
|
||||
@@ -868,4 +898,7 @@ onUnload(() => {
|
||||
.clean-video-tile :deep(.tag-self) {
|
||||
display: none;
|
||||
}
|
||||
.clean-video-tile :deep(.tag-host) {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user