优化音视频通话
This commit is contained in:
@@ -6,6 +6,11 @@
|
||||
import { computed, ref } from 'vue'
|
||||
import { type IConversationModel } from '@tencentcloud/chat-uikit-engine-lite'
|
||||
import { navigateTo } from '../../../../../utils/router'
|
||||
import TUIChatEngine, {
|
||||
TUIConversationService,
|
||||
TUIFriendService,
|
||||
TUIChatService
|
||||
} from '@tencentcloud/chat-uikit-engine-lite'
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
@@ -39,11 +44,34 @@
|
||||
emits('onDialogPopupShowOrHide', true)
|
||||
|
||||
if (isType.value) {
|
||||
navigateTo('/pages/room/incom', {
|
||||
type: 'call',
|
||||
userID: data.userID
|
||||
})
|
||||
let params ={
|
||||
to: props.currentConversation.conversationID,
|
||||
conversationType: TUIChatEngine.TYPES.CONV_C2C,
|
||||
payload: {
|
||||
text: "拨打语音"
|
||||
}
|
||||
}
|
||||
console.log('params: ',params);
|
||||
// TUIChatService.sendTextMessage(params)
|
||||
navigateTo('/pages/room/incom', {
|
||||
type: 'call',
|
||||
userID: data.userID
|
||||
})
|
||||
} else {
|
||||
let params ={
|
||||
to: props.currentConversation.conversationID,
|
||||
conversationType: TUIChatEngine.TYPES.CONV_C2C,
|
||||
payload: {
|
||||
text: "拨打视频"
|
||||
}
|
||||
}
|
||||
// TUIChatService.sendTextMessage(params)
|
||||
uni.setStorageSync('room-parameters', {
|
||||
callType: 'out',
|
||||
mediaType: 'video',
|
||||
targetId: data.userID,
|
||||
callSelect: 'single',
|
||||
});
|
||||
navigateTo('/pages/room/room')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user