docs update

This commit is contained in:
Harvey Zack committed 2018-11-28 19:33:49 +08:00
1 parent 02c45caa38
commit bfcfc449aa
2 files changed
+17 -2

No files matched your search

+14 -2
View File
@@ -141,13 +141,25 @@ var art = new Artplayer({
The current player uses the simplest native components on mobile devices, but you can filter this feature through whitelist. `whitelist` accept `String`, `function`, and `regular` expressions, contrast information comes from `window.navigator.userAgent`
[Run Code](/)
By default, non-whitelisted devices only set video native properties and third-party dependencies.
[Open with mobile](https://artplayer.org/lab/mobile.html)
```js
var url = 'https://blog.zhw-island.com/assets-cdn';
var art = new Artplayer({
container: '.artplayer-app',
url: url + '/video/one-more-time-one-more-chance-480p.mp4',
url: url + '/video/one-more-time-one-more-chance-480p.flv',
customType: {
flv: function(video, url) {
const flvPlayer = flvjs.createPlayer({
type: 'flv',
url: url,
});
flvPlayer.attachMediaElement(video);
flvPlayer.load();
},
},
whitelist: ['iPhone OS 9'],
// whitelist: [(ua)=>{ return /iPhone OS 9/gi.test(ua); }],
// whitelist: [/iPhone OS 9/gi]
+3
View File
@@ -12,4 +12,7 @@ var art = new Artplayer({
flvPlayer.load();
},
},
whitelist: ['iPhone OS 11'],
// whitelist: [(ua)=>{ return /iPhone OS 11/gi.test(ua); }],
// whitelist: [/iPhone OS 11/gi]
});