收藏
回答

live-player组件真机调试和运行均黑屏

框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
小程序 Bug live-player 工具 8.0.1.1841 2.16.0

wxml:

<live-player id="livePlayerclass="videoautoplay="truemode="livemax-cache="0.8muted="{{sound}}src="https://flvopen.ys7.com:9188/openlive/*************.hd.flvbindstatechange="statechangebinderror="errorbindnetstatus="netstatus"></live-player>


js:

statechange(e) {

    console.log('live-player code:', e.detail.code);

  },


  error(e) {

    console.error('live-player error:', e.detail.errMsg)

  },


  netstatus(e){

    console.error('live-player netInfo:', e.detail.info)

  },

打开页面后live-player一直黑屏,不论是真机调试还是安卓体验版均是,bindstatechange也无法抓取到任何信息,也没有报错

推流地址rtmp与flv都测试过,其中flv为公网ip且在浏览器上播放正常

回答关注问题邀请回答
收藏

3 个回答

  • 林夕一梦丶凯
    林夕一梦丶凯
    2021-11-12

    楼主解决了么,我现在也是遇到了这个问题, src="ws://39.104.204.151:10800/ws-flv/hls/stream_1.flv” ,结果发现也播放不了,控制太打印也没有东西

    statechange(e){

    console.log('播放状态变化事件:', e)

    },

    netstatus(e){

    console.log('网络状态:', e)

    },

    error(e){

    console.error('错误信息:', e)

    }


    三个函数一个都没有打印

    2021-11-12
    有用
    回复
  • 😶
    😶
    2021-03-12

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

    2021-03-12
    有用
    回复 2
    • Nietononoshana
      Nietononoshana
      2021-03-12
      https://developers.weixin.qq.com/s/10oqaKmo7Xog
      具体流程为将rtmp或flv格式的流地址直接填入live-player组件,不论在真机调试还是手机上运行组件均为黑屏,且绑定的函数均抓取不到返回值
      2021-03-12
      回复
    • Jack
      Jack
      2022-04-19
      现在解决了嘛?
      2022-04-19
      回复
  • Nietononoshana
    Nietononoshana
    2021-03-12

    更换了网络上一些可用rtmp地址还是不行,接口权限已经正常开通

    2021-03-12
    有用
    回复 1
登录 后发表内容
问题标签