askbot-dragon 1.7.87-beta → 1.7.88-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/askVideo.vue +14 -0
package/package.json
CHANGED
|
@@ -61,6 +61,20 @@
|
|
|
61
61
|
console.debug('newVideoSrc',this.videoSrc,videoSrc)
|
|
62
62
|
this.poster = this.videoSrc+'?spm=qipa250&x-oss-process=video/snapshot,t_1000,f_jpg,w_0,h_0,m_fast'
|
|
63
63
|
console.debug('poster',this.poster)
|
|
64
|
+
/* 安卓手机播放视频默认全屏设置 ios默认就是全屏 */
|
|
65
|
+
let id = this.msg.id + 'key'
|
|
66
|
+
const video = document.getElementById(id);
|
|
67
|
+
// 仅在 Android 设备尝试自动全屏
|
|
68
|
+
const isAndroid = /Android/i.test(navigator.userAgent);
|
|
69
|
+
if (isAndroid){
|
|
70
|
+
video.addEventListener('play', () => {
|
|
71
|
+
// 仅在全屏请求由用户触发时有效(如点击播放按钮后)
|
|
72
|
+
if (video.requestFullscreen) {
|
|
73
|
+
video.requestFullscreen().catch(console.error);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
|
|
64
78
|
})
|
|
65
79
|
|
|
66
80
|
},
|