- 当前 Bug 的表现
当一个页面video较多时:
1、离屏的video自动播放
2、display:none的video自动播放
- 预期表现
在默认情况下,video不自动播放
- 复现路径
https://developers.weixin.qq.com/s/BnnwMKmQ7F7T
- 提供一个最简复现 Demo
< video class = 'video none' src = "http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400" > </ video > < video class = 'video none' src = "http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400" > </ video > < video class = 'video none' src = "http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400" > </ video > < video class = 'video none' src = "http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400" > </ video > < video class = 'video none' src = "http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400" > </ video > |
.video { width : 100% ; } . none { display : none ; } |
不建议同个页面使用多个video组件,建议不超过3个video,如果要实现video列表功能,请进行优化(image列表,选中时将image替换成video)
那两个video就自动播放也是正常的?我粗略的试了试如果只放两个video还是有10%左右的几率自动播放。
官方大大看一下我的问题啊ios 和安卓视频播放的时候出现缓冲的loading后 正常播放会先黑屏闪一下然后才会正常播放
官方大佬的方案。。。。😓 我们有点不行啊