收藏
回答

video组件播放云存储视频无法播放?

onLoad: function (options) {
    var _this = this
    wx.cloud.init()
    var data = JSON.parse(options.data)
     console.log(options.data)
    this.setData({
      name: data.personname,
      imgurl:data.imgurl
    })
    wx.cloud.getTempFileURL({
      fileList: ['cloud://demo-7rsv6.6465-demo-7rsv6-1301216878/video/' + data.personname + '.mp4'],
      success: res => {
        // get temp file URL
        _this.setData({
          videourl: res.fileList[0].tempFileURL
        })
        console.log(res.fileList[0].tempFileURL)
      },
      fail: err => {
        // handle error
      }
<video id="myVideo" src="{{videourl}}" custom-cache="{{false}}" style="width:{{currentWidth}}px;height:{{currentHeight}}px"
 binderror="videoErrorCallback"  direction="0" 
bindended="playend" >

根据传入的名称加载视频,但是在开发者工具可以正常播放,在手机上的体验版就无法播放。把视频地址拷贝到浏览器也可以正常播放。

调试基础库是2.10.3

微信版本:7.0.11

IOS XR

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

1 个回答

  • 纪墨
    纪墨
    2020-03-07

    已解决,把视频名称改成英文的就可以了

    2020-03-07
    有用
    回复
登录 后发表内容
问题标签