适配微信小程序

This commit is contained in:
2025-12-16 10:21:36 +08:00
parent 538070cce0
commit ecd12b809e
3 changed files with 7 additions and 5 deletions

View File

@@ -76,8 +76,9 @@ onMounted(() => {
// #ifdef MP-WEIXIN
// 初始化小程序通话信令监听器
// 注意initPusherContext 不在这里调用,因为此时 live-pusher 组件还未渲染
// live-pusher 的 Context 初始化由 MiniProgramCallWindow.vue 在 pushUrl 设置后处理
mpCall.initListener()
mpCall.initPusherContext()
console.log('✅ [GlobalCallProvider] 微信小程序通话监听器已初始化')
// #endif

View File

@@ -28,7 +28,7 @@ const { initListener: initWebRTCListener } = useWebRTC()
import MiniProgramCallWindow from './MiniProgramCallWindow.vue'
import { useMiniProgramCall } from '@/composables/useMiniProgramCall'
const { initListener: initMPListener, initPusherContext } = useMiniProgramCall()
const { initListener: initMPListener } = useMiniProgramCall()
// #endif
onMounted(() => {
@@ -37,8 +37,9 @@ onMounted(() => {
// #endif
// #ifdef MP-WEIXIN
// 注意initPusherContext 不在这里调用,因为此时 live-pusher 组件还未渲染
// live-pusher 的 Context 初始化由 MiniProgramCallWindow.vue 在 pushUrl 设置后处理
initMPListener()
initPusherContext()
// #endif
})
</script>