安卓端bindtimeupdate值无法以变量形式
- 当前 Bug 的表现(可附上截图)
安卓端没办法把bindtimeupdate触发的函数名作为变量使用。IOS正常
- 提供一个最简复现 Demo
vxml:
< view class = "videView" > < video id = "polyvVideo" style = "width: 100vw;height: 57vw" src = "{{vsrc}}" autoplay = "true" bindtimeupdate = '{{bindtimeupdate}}' bindended = '{{bindended}}' > </ video > </ view > < view >设备:{{phone}}</ view > < view >bindtimeupdate触发{{a}}次</ view > < view >状态:{{endplay}}</ view > |
js:
Page({ data: { vsrc: "https://router.polyv.net/proxy/hls.videocc.net/c21c20bea1/c/c21c20bea134331cbb73da14dda3428c_3.m3u8" , bindtimeupdate: '' , bindended: '' , a:0, phone: '' , endplay: "播放中" }, onLoad: function () { this .setData({ bindtimeupdate: "play1" , bindended: "endplay1" }); console.log( this .data.bindtimeupdate); var that = this ; // 获取系统信息 wx.getSystemInfo({ success: function (res) { console.log( "系统信息" , res); that.setData({ phone: res.platform, }); } }) }, play1: function (){ var a= this .data.a; a++; console.log( this .data.a); this .setData({ bindtimeupdate: "" , a:a }); }, endplay1: function (){ this .setData({ endplay: "结束播放" }); } }) |
结果:
ios成功触发play1
3 回复