优化音视频通话
This commit is contained in:
@@ -78,7 +78,7 @@ import { TUIUserService } from '@tencentcloud/chat-uikit-engine-lite'
|
||||
import { useUI } from '../../utils/use-ui'
|
||||
import { navigateBack } from '../../utils/router'
|
||||
|
||||
CallLib.init({})
|
||||
|
||||
const { showLoading, hideLoading } = useUI()
|
||||
const callBackground = ref('/static/images/public/random2.png')
|
||||
/** 呼叫用户信息 */
|
||||
@@ -132,7 +132,7 @@ const cutFn = show => {
|
||||
} else {
|
||||
//取消接听,返回上一页
|
||||
CallLib.hangup()
|
||||
navigateBack()
|
||||
// navigateBack()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,22 +160,6 @@ onLoad(async e => {
|
||||
console.log('===好友信息', res)
|
||||
})
|
||||
|
||||
// onUnload( ()=>{
|
||||
// removeAllListeners()
|
||||
// })
|
||||
|
||||
// onHide( ()=>{
|
||||
// removeAllListeners()
|
||||
// })
|
||||
|
||||
function removeAllListeners(){
|
||||
//移除监听-接收到通话呼入
|
||||
CallLib.removeRemoteUserJoinedListener();
|
||||
// 移除监听-通话已结束
|
||||
CallLib.removeCallDisconnectedListener();
|
||||
// 移除监听-通话出现错误的回调
|
||||
CallLib.removeErrorListener();
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user