|
|
|
@ -207,7 +207,7 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
initVideo() {
|
|
|
|
|
if (this.$route.query.type === 1) {
|
|
|
|
|
if (this.$route.query.type == 1) {
|
|
|
|
|
this.isBtnVideo = false // 语音状态隐藏2个按钮和对方画面
|
|
|
|
|
this.nickName = this.$route.query.name
|
|
|
|
|
} else {
|
|
|
|
@ -400,7 +400,7 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getLocalAudioStats() {
|
|
|
|
|
setInterval(async() => {
|
|
|
|
|
setInterval(async () => {
|
|
|
|
|
try {
|
|
|
|
|
const localAudioStats = await this.client.getLocalAudioStats()
|
|
|
|
|
if (!localAudioStats[0]) {
|
|
|
|
@ -413,7 +413,7 @@ export default {
|
|
|
|
|
}, 1000)
|
|
|
|
|
},
|
|
|
|
|
getLocalVideoStats() {
|
|
|
|
|
setInterval(async() => {
|
|
|
|
|
setInterval(async () => {
|
|
|
|
|
try {
|
|
|
|
|
const localVideoStats = await this.client.getLocalVideoStats('video')
|
|
|
|
|
if (!localVideoStats[0]) {
|
|
|
|
@ -523,7 +523,7 @@ export default {
|
|
|
|
|
this.localStream = NERTC.createStream({
|
|
|
|
|
uid: this.localUid,
|
|
|
|
|
audio: true, // 是否启动mic
|
|
|
|
|
video: this.$route.query.type === 2, // 是否启动camera
|
|
|
|
|
video: this.$route.query.type == 2, // 是否启动camera
|
|
|
|
|
screen: false // 是否启动屏幕共享
|
|
|
|
|
// facingMode: 'user' // 前置摄像头
|
|
|
|
|
})
|
|
|
|
|