html52.com
我爱小程序-开发者交流社区

video 组件播放结束(bindended)事件无效

问题模块 框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
API和组件 小程序 Bug video 工具 6.6.6 2.0.0

控件代码:

<view class="video">
  <video id="myVideo"
  autoplay="true"
  show-fullscreen-btn="false"
  controls loop="true"
  src="http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400"
  binderror="videoErrorCallback"
  bindplay="bindPlay"
  bindended="funended"></video>
</view>

JS代码:

bindPlay: function () {
    console.log("播放")
  },
  bindPause: function () {
    this.videoContext.pause()
  },
  videoErrorCallback: function (e) {
    console.log('视频错误信息:')
    console.log(e.detail.errMsg)
  },
  funended: function () {//播放结束按钮函数
    console.log("播放结束")
  }

bindPlay事件是有效的!

求帮助....

网友回复

荒野大键客:

在真机上测试使用 bind:ended 有问题,但使用 bindended 没有问题

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付