diff --git a/docs/assets/css/mobile.css b/docs/assets/css/mobile.css
index 58ad6518d..79178e8ac 100644
--- a/docs/assets/css/mobile.css
+++ b/docs/assets/css/mobile.css
@@ -11,4 +11,8 @@ html, body {
.artplayer-app {
width: 100%;
height: 50%;
+}
+
+.tip {
+ text-align: center;
}
\ No newline at end of file
diff --git a/docs/assets/js/mobile.js b/docs/assets/js/mobile.js
index 1ee6658eb..fac8b14e3 100644
--- a/docs/assets/js/mobile.js
+++ b/docs/assets/js/mobile.js
@@ -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: '
',
},
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 = '微信环境需手动触发播放';
+}
diff --git a/docs/document/README.md b/docs/document/README.md
index 8743deb45..3117c62e6 100644
--- a/docs/document/README.md
+++ b/docs/document/README.md
@@ -141,6 +141,8 @@ The current player uses the simplest native components on mobile devices, but yo
By default, non-whitelisted devices only set video native properties and third-party dependencies.
+`*` is a special value indicating that all mobile devices have the Artplayer UI enabled
+
[Open with mobile](https://artplayer.org/mobile.html)
```js
@@ -149,7 +151,8 @@ var art = new Artplayer({
container: '.artplayer-app',
url: url + '/video/one-more-time-one-more-chance-480p.mp4',
whitelist: ['iPhone OS 11'],
- // whitelist: [(ua)=>{ return /iPhone OS 11/gi.test(ua); }],
+ // whitelist: ['*'],
+ // whitelist: [(ua) => /iPhone OS 11/gi.test(ua)],
// whitelist: [/iPhone OS 11/gi]
});
```
@@ -1011,7 +1014,7 @@ art.plugins.myPlugin.doSomething();
| propertie | type | Description |
| ----------- | ---------- | ------------------------------------------------ |
| `isFocus` | `Boolean` | Return the focus state |
-| `ua` | `String` | The user agent |
+| `userAgent` | `String` | The user agent |
| `isMobile` | `boolean` | Whether mobile access |
| `isDestroy` | `Boolean` | Return the destroy state |
| `option` | `Object` | Return the merge option |
@@ -1075,6 +1078,8 @@ art.seek === art.player.seek;
| `play` | `Boolean` | Start playback |
| `screenshot` | `Function` | Download a screenshot of current time |
| `seek` | `Number` | Set the current time |
+| `forward` | `Number` | Video fast forward |
+| `backward` | `Number` | Video fast backward |
| `switchQuality` | `Function` | Switch video quality |
| `switchUrl` | `Function` | Switch video url |
| `toggle` | `Boolean` | Toggle play and pause |
diff --git a/docs/mobile.html b/docs/mobile.html
index f178ae6a3..73b8da508 100644
--- a/docs/mobile.html
+++ b/docs/mobile.html
@@ -4,7 +4,8 @@