mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 19:06:15 -08:00
docs update
This commit is contained in:
1 parent
02c45caa38
commit
bfcfc449aa
2 files changed
+17
-2
No files matched your search
+14
-2
@@ -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]
|
||||
|
||||
@@ -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]
|
||||
});
|
||||
Reference in new issue
Block a user