mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 06:31:20 -08:00
优化移动端UI
This commit is contained in:
1 parent
beea013daf
commit
7b3913e318
13 files changed
+96
-55
No files matched your search
@@ -11,4 +11,8 @@ html, body {
|
||||
.artplayer-app {
|
||||
width: 100%;
|
||||
height: 50%;
|
||||
}
|
||||
|
||||
.tip {
|
||||
text-align: center;
|
||||
}
|
||||
@@ -8,13 +8,13 @@ var art = new Artplayer({
|
||||
loop: true,
|
||||
mutex: true,
|
||||
theme: '#ffad00',
|
||||
fullscreenWeb: true,
|
||||
miniProgressBar: true,
|
||||
lang: navigator.language.toLowerCase(),
|
||||
moreVideoAttr: {
|
||||
'webkit-playsinline': true,
|
||||
playsInline: true,
|
||||
crossOrigin: 'anonymous',
|
||||
'webkit-playsinline': true,
|
||||
'x5-video-player-type': 'h5',
|
||||
'x5-video-player-fullscreen': false,
|
||||
'x5-video-orientation': 'portraint',
|
||||
},
|
||||
subtitle: {
|
||||
url: url + '/subtitle/one-more-time-one-more-chance.srt',
|
||||
@@ -42,9 +42,6 @@ var art = new Artplayer({
|
||||
state: '<img src="./assets/img/state.png">',
|
||||
},
|
||||
whitelist: ['*'],
|
||||
// whitelist: ['iPhone'],
|
||||
// whitelist: [(ua)=>{ return /iPhone OS 11/gi.test(ua); }],
|
||||
// whitelist: [/iPhone OS 11/gi]
|
||||
});
|
||||
|
||||
Artplayer.config.events.forEach(function (item) {
|
||||
@@ -52,3 +49,7 @@ Artplayer.config.events.forEach(function (item) {
|
||||
console.log('video: ' + event.type);
|
||||
});
|
||||
});
|
||||
|
||||
if (art.isWechat) {
|
||||
document.querySelector('.tip').textContent = '微信环境需手动触发播放';
|
||||
}
|
||||
Reference in new issue
Block a user