Commit f647ec63 by qlintonger xeno

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

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