使用live-player组件时,发生insertXWebLivePlayer:fail:acce?
发布于 7 年前 作者 mingliang 11948 次浏览 来自 官方Issues

使用live-player组件时,属性中绑定了binderror,程序调试的时候直接执行绑定的事件

wxml文件

<live-player class='video_live' mode="live" id="livePlayer" autoplay="true" src="rtmp://格式"  auto-pause-if-navigate="true" auto-pause-if-open-native="true" bindstatechange="stateChange" bindfullscreenchange="fullScreenChange" binderror="error">
</live-player>

js文件

onLoad: function (options) {
    console.log(options);
    var that = this;
    var livePlayer = wx.createLivePlayerContext('livePlayer');//创建一个上下文
    that.setData({
      livePlayer: livePlayer,
    })
  },

执行js文件之后,直接报错insertXWebLivePlayer:fail:access denied

1 回复

你好,你的小程序开通了直播组件的权限吗?如果开通了麻烦提供下你的小程序appid,我们查下

回到顶部