Commit f647ec63 by qlintonger xeno

通话数据问题准备修复+2

parent 1e93dd2f
......@@ -65,6 +65,9 @@ export class AgoraHandle {
if (!chatChannelState.value.voiceChatOnlySet.includes(fromID)) {
chatChannelState.value.voiceChatOnlySet.push(fromID)
}
if (fromID === userStates.value.currentUserId) {
this.agoraApp.currentUserToggleVoiceChatOnly(true)
}
break
}
case "NotVoiceChatOnly": {
......@@ -72,6 +75,9 @@ export class AgoraHandle {
if (chatChannelState.value.voiceChatOnlySet.includes(fromID)) {
chatChannelState.value.voiceChatOnlySet.splice(chatChannelState.value.voiceChatOnlySet.indexOf(fromID), 1)
}
if (fromID === userStates.value.currentUserId) {
this.agoraApp.currentUserToggleVoiceChatOnly(false);
}
break
}
case 'Recording': {
......
......@@ -24,7 +24,7 @@ function convertTypeLocally(data) {
return 'video'
if (data.msgType === 'ChatAudio')
return 'audio'
if (data.msgType.endsWith('.pdf')) {
if (data.msgData.tip?.fileName?.endsWith('.pdf')) {
return 'pdf'
}
return 'file'
......
......@@ -32,7 +32,6 @@ import { computed } from 'vue'
const AnyR = useAnyR()
const chattersName = computed(function () {
console.log("all other chatters", allOtherChattersIdSet.value, userStates.value.onlineContacts);
return allOtherChattersIdSet.value.map(function (a: any) {
// @ts-ignore
return userStates.value.onlineContacts.find((q: any) => q.fromID === a)?.fromName || '未知用户'
......
......@@ -25,7 +25,7 @@
</div>
</template>
<template v-else>
<slot></slot>
<video width="100%" controls :height="160" :src="data.src"></video>
</template>
</div>
</div>
......@@ -42,5 +42,6 @@ const ps = withDefaults(defineProps<Props>(), {
type: 'txt',
data: () => {}
})
console.log('pass-in-p', ps);
</script>
<style lang="less" scoped></style>
......@@ -41,7 +41,7 @@
</div>
</template>
</a-upload>
<a-upload :custom-request="(option) => uploadMuFile(option, 'file')" :show-file-list="false" accept=".pdf">
<a-upload :custom-request="(option) => uploadMuFile(option, 'pdf')" :show-file-list="false" accept=".pdf">
<template #upload-button>
<div class="flex-center px-3 py-1 rounded cursor-pointer bg-fill-bg1">
<global-icon :size="15" icon="pdf"></global-icon>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment