mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-15 09:06:16 -08:00
添加白名单功能
This commit is contained in:
1 parent
970e7e3b89
commit
02c45caa38
11 files changed
+253
-43
No files matched your search
@@ -134,6 +134,26 @@ var art = new Artplayer({
|
||||
});
|
||||
```
|
||||
|
||||
## whitelist
|
||||
|
||||
- Type: `Array`
|
||||
- Default: `[]`
|
||||
|
||||
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](/)
|
||||
|
||||
```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',
|
||||
whitelist: ['iPhone OS 9'],
|
||||
// whitelist: [(ua)=>{ return /iPhone OS 9/gi.test(ua); }],
|
||||
// whitelist: [/iPhone OS 9/gi]
|
||||
});
|
||||
```
|
||||
|
||||
## poster
|
||||
|
||||
- Type: `String`
|
||||
|
||||
Reference in new issue
Block a user