mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 05:41:20 -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`
|
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
|
```js
|
||||||
var url = 'https://blog.zhw-island.com/assets-cdn';
|
var url = 'https://blog.zhw-island.com/assets-cdn';
|
||||||
var art = new Artplayer({
|
var art = new Artplayer({
|
||||||
container: '.artplayer-app',
|
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: ['iPhone OS 9'],
|
||||||
// whitelist: [(ua)=>{ return /iPhone OS 9/gi.test(ua); }],
|
// whitelist: [(ua)=>{ return /iPhone OS 9/gi.test(ua); }],
|
||||||
// whitelist: [/iPhone OS 9/gi]
|
// whitelist: [/iPhone OS 9/gi]
|
||||||
|
|||||||
@@ -12,4 +12,7 @@ var art = new Artplayer({
|
|||||||
flvPlayer.load();
|
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