mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-29 02:51:20 -08:00
Create mobile.js
This commit is contained in:
1 parent
87e7b87a1f
commit
b0a5c2df1c
1 file changed
+7
-1
@@ -18,7 +18,6 @@ var art = new Artplayer({
|
|||||||
fullscreenWeb: true,
|
fullscreenWeb: true,
|
||||||
miniProgressBar: true,
|
miniProgressBar: true,
|
||||||
moreVideoAttr: {
|
moreVideoAttr: {
|
||||||
preload: 'auto',
|
|
||||||
'x5-video-player-type': 'h5',
|
'x5-video-player-type': 'h5',
|
||||||
'x5-video-player-fullscreen': false,
|
'x5-video-player-fullscreen': false,
|
||||||
'x5-video-orientation': 'portraint',
|
'x5-video-orientation': 'portraint',
|
||||||
@@ -92,4 +91,11 @@ Artplayer.config.events.forEach(function (item) {
|
|||||||
|
|
||||||
if (Artplayer.utils.isWechat) {
|
if (Artplayer.utils.isWechat) {
|
||||||
document.querySelector('.tip').textContent = '微信环境需手动触发播放';
|
document.querySelector('.tip').textContent = '微信环境需手动触发播放';
|
||||||
|
let isClick = false;
|
||||||
|
document.body.addEventListener('click', () => {
|
||||||
|
if (!isClick) {
|
||||||
|
isClick = true;
|
||||||
|
art.play();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user