CALL-test
This commit is contained in:
@@ -10,8 +10,7 @@
|
||||
|
||||
<view class="status" v-if="!connected || mediaType == 0">
|
||||
<view class="remote">
|
||||
<u-avatar :src="contact(targetId).portraitUrl" shape="square" size="96"
|
||||
bgColor="#fff" />
|
||||
<u-avatar :src="contact(targetId).portraitUrl" shape="square" size="96" bgColor="#fff" />
|
||||
<view><text class="nickname">{{ contact(targetId).name }}</text></view>
|
||||
<view v-if="remoteRinging"><text class="mediaType">等待对方接听</text></view>
|
||||
<view v-if="connected"><text class="mediaType">已接通</text></view>
|
||||
@@ -68,10 +67,10 @@
|
||||
},
|
||||
onLoad(e) {
|
||||
this.targetId = e.targetId
|
||||
this.mediaType = e.mediaType
|
||||
// 进入页面开启外呼
|
||||
CallLib.startSingleCall(this.targetId, this.mediaType, '');
|
||||
|
||||
this.mediaType = e.mediaType
|
||||
// 进入页面开启外呼
|
||||
CallLib.startSingleCall(this.targetId, this.mediaType, '');
|
||||
// 响铃
|
||||
this.startRing()
|
||||
// 监听通话链接状态
|
||||
uni.$once('onCallConnected', this.onCallConnected)
|
||||
@@ -92,11 +91,11 @@
|
||||
},
|
||||
windowHeight() {
|
||||
return uni.getSystemInfoSync().windowHeight
|
||||
},
|
||||
contact() {
|
||||
return function(targetId) {
|
||||
return this.$store.getters.contactInfo(targetId)
|
||||
}
|
||||
},
|
||||
contact() {
|
||||
return function(targetId) {
|
||||
return this.$store.getters.contactInfo(targetId)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -120,10 +119,8 @@
|
||||
if (this.mediaType == 1) {
|
||||
const session = CallLib.getCurrentCallSession()
|
||||
setTimeout(() => {
|
||||
CallLib.setVideoView(session.targetId, this.$refs.bigVideoView.ref, 0,
|
||||
false)
|
||||
CallLib.setVideoView(session.mine.userId, this.$refs.smallVideoView.ref, 0,
|
||||
true)
|
||||
CallLib.setVideoView(session.targetId, this.$refs.bigVideoView.ref, 0, false)
|
||||
CallLib.setVideoView(session.mine.userId, this.$refs.smallVideoView.ref, 0, true)
|
||||
}, 200)
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user