video组件 bindloadedmetadata 属性怎么调用?
bindloadedmetadata | eventhandle | 否 | 视频元数据加载完成时触发。event.detail = {width, height, duration} | 2.7.0 |
调试基础库2.92
wxml
< view class = "submain" wx:if = "{{item.video}}" > < video class = "myvideo" src = "{{item.video}}" object-fit = "cover" bindloadedmetadata = "videometa" binderror = "videoErrorCallback" show-center-play-btn = '{{true}}' show-play-btn = "{{false}}" controls></ video >
|
js
videometa: function (e) { console.log( '元素据' ,e) }, |
视频加载了 但怎么才可以触发这个事件 我想获取视频内容的宽高
3 回复
你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)