File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
packages/mip/src/components Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,14 @@ class MipVideo extends CustomElement {
9191 // 兼容qq浏览器
9292 videoEl . setAttribute ( 'x5-playsinline' , 'x5-playsinline' )
9393 videoEl . setAttribute ( 'webkit-playsinline' , 'webkit-playsinline' )
94- videoEl . setAttribute ( 't7-video-player-type' , 'inline' )
94+ // @2019.12.04 安卓手百在 t7-video-player-type=inline 的情况下,先锁屏再解锁之后,浏览器会自动播放。由于问题仅出现在安卓手百环境,因此仅针对安卓手百环境,将 t7-video-player-type 设置为 h5
95+ if ( util . platform . isAndroid ( ) && util . platform . isBaiduApp ( ) ) {
96+ videoEl . setAttribute ( 't7-video-player-type' , 'h5' )
97+
98+ }
99+ else {
100+ videoEl . setAttribute ( 't7-video-player-type' , 'inline' )
101+ }
95102 Array . prototype . slice . apply ( this . element . childNodes ) . forEach ( function ( node ) {
96103 // FIXME: mip layout related, remove this!
97104 if ( node . nodeName . toLowerCase ( ) === 'mip-i-space' ) {
You can’t perform that action at this time.
0 commit comments