mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-13 15:56:15 -08:00
添加画质选项
This commit is contained in:
1 parent
e9b0ff101b
commit
504d5b3954
7 files changed
+78
-9
No files matched your search
+11
-4
@@ -10,6 +10,7 @@ import Volume from './volume';
|
||||
import Setting from './setting';
|
||||
import Thumbnails from './thumbnails';
|
||||
import Screenshot from './screenshot';
|
||||
import Quality from './quality';
|
||||
|
||||
let id = 0;
|
||||
export default class Controls {
|
||||
@@ -71,24 +72,30 @@ export default class Controls {
|
||||
index: 30
|
||||
}));
|
||||
|
||||
this.add(new Setting({
|
||||
disable: false,
|
||||
this.add(new Quality({
|
||||
disable: this.art.option.quality.length === 0,
|
||||
position: 'right',
|
||||
index: 40
|
||||
}));
|
||||
|
||||
this.add(new Pip({
|
||||
this.add(new Setting({
|
||||
disable: false,
|
||||
position: 'right',
|
||||
index: 50
|
||||
}));
|
||||
|
||||
this.add(new Fullscreen({
|
||||
this.add(new Pip({
|
||||
disable: false,
|
||||
position: 'right',
|
||||
index: 60
|
||||
}));
|
||||
|
||||
this.add(new Fullscreen({
|
||||
disable: false,
|
||||
position: 'right',
|
||||
index: 70
|
||||
}));
|
||||
|
||||
this.art.option.controls.forEach(item => {
|
||||
this.add(item);
|
||||
});
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
export default class Quality {
|
||||
constructor(option) {
|
||||
this.option = option;
|
||||
}
|
||||
|
||||
apply(art) {
|
||||
this.art = art;
|
||||
}
|
||||
}
|
||||
@@ -63,6 +63,7 @@ class Artplayer extends Emitter {
|
||||
mimeCodec: '',
|
||||
layers: [],
|
||||
contextmenu: [],
|
||||
quality: [],
|
||||
loading: '',
|
||||
theme: '#f00',
|
||||
hotkey: true,
|
||||
|
||||
@@ -50,6 +50,14 @@ export default {
|
||||
click: 'function'
|
||||
}
|
||||
},
|
||||
quality: {
|
||||
type: 'array',
|
||||
child: {
|
||||
default: 'boolean',
|
||||
name: 'string',
|
||||
url: 'string'
|
||||
}
|
||||
},
|
||||
loading: 'string',
|
||||
theme: 'string',
|
||||
hotkey: 'boolean',
|
||||
|
||||
Reference in new issue
Block a user