Skip to content

Commit 1b5a78a

Browse files
authored
仅针对安卓手百将播放器的播放模式切换回 h5 (#730)
* 仅针对安卓手百将播放器的播放模式切换回 h5 * 修改判断条件
1 parent fc6e901 commit 1b5a78a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/mip/src/components/mip-video.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff 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') {

0 commit comments

Comments
 (0)