小程序直播组件(1.0.14)调用直播失败?
发布于 5 年前 作者 qianwei 12087 次浏览 来自 问答

开发工具点击直播异常:

navigateTo:fail page “__plugin__/wx2b03c6e691cd7370/pages/live-player-plugin?room_id=5&custom_params=%257B%2522path%2522%253A%2522pages%252Fliveb%252Fliveb%2522%252C%2522pid%2522%253A1%257D” is not found

手机端开发版点击直播异常:

Uncaught (in promise) thirdScriptError

{“errMsg”:“navigateTo:fail page \”__plugin__/wx2b03c6e691cd7370/pages/live-player-plugin?room_id=5&custom_params=%257B%2522path%2522%253A%2522pages%252Fliveb%252Fliveb%2522%252C%2522pid%2522%253A1%257D\" is not found"}

代码:

1.liveb.wxml

  <button class="cu-btn bg-bluebindtap="zhibo">直播</button>

2.liveb.js

  zhibo:function(){

    let roomId = [5

    let customParams = encodeURIComponent(JSON.stringify({ path: 'pages/liveb/liveb', pid: 1 })) 

    wx.navigateTo({

        url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${roomId}&custom_params=${customParams}`

    })

  },

3.app.json

"plugins": {

      "live-player-plugin": {

        "version": "1.0.14",

        "provider": "wx2b03c6e691cd7370"

      }

    }

4.直播:


1 回复

请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

回到顶部