语音通话展示
This commit is contained in:
@@ -73,7 +73,9 @@
|
||||
// 关闭麦克风
|
||||
micOff: false,
|
||||
// 关闭扬声器
|
||||
volumeOff: false
|
||||
volumeOff: false,
|
||||
// 通话时长
|
||||
duration: 0
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
@@ -84,7 +86,7 @@
|
||||
// 进入页面开启外呼
|
||||
if (this.isCall) {
|
||||
CallLib.startSingleCall(this.targetId, this.mediaType, '');
|
||||
if (this.mediaType == 1) {
|
||||
if (this.mediaType == '1') {
|
||||
const session = CallLib.getCurrentCallSession()
|
||||
setTimeout(() => {
|
||||
CallLib.setVideoView(session.mine.userId, this.$refs.bigVideoView.ref, 0, false)
|
||||
@@ -136,8 +138,11 @@
|
||||
const messageContent = {
|
||||
objectName: 'RC:InfoNtf',
|
||||
userInfo: this.$store.getters.sender,
|
||||
message: String(this.mediaType),
|
||||
extra: '这里传接通和时长信息',
|
||||
message: JSON.stringify({
|
||||
mediaType: this.mediaType,
|
||||
connected: this.connected,
|
||||
duration: this.duration
|
||||
})
|
||||
}
|
||||
const sentTime = 0 // 消息的发送时间
|
||||
IMLib.insertOutgoingMessage(conversationType, targetId, sentStatus, messageContent, sentTime,
|
||||
@@ -175,7 +180,7 @@
|
||||
// 设置链接状态
|
||||
this.connected = true
|
||||
// 视频通话,才开摄像头
|
||||
if (this.mediaType == 1) {
|
||||
if (this.mediaType == '1') {
|
||||
const session = CallLib.getCurrentCallSession()
|
||||
setTimeout(() => {
|
||||
CallLib.setVideoView(session.targetId, this.$refs.bigVideoView.ref, 0, false)
|
||||
|
||||
Reference in New Issue
Block a user