添加画质选项

This commit is contained in:
Harvey Zack committed 2018-10-31 16:32:41 +08:00
1 parent e9b0ff101b
commit 504d5b3954
7 files changed
+78 -9

No files matched your search

+11 -4
View File
@@ -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);
});
+9
View File
@@ -0,0 +1,9 @@
export default class Quality {
constructor(option) {
this.option = option;
}
apply(art) {
this.art = art;
}
}
+1
View File
@@ -63,6 +63,7 @@ class Artplayer extends Emitter {
mimeCodec: '',
layers: [],
contextmenu: [],
quality: [],
loading: '',
theme: '#f00',
hotkey: true,
+8
View File
@@ -50,6 +50,14 @@ export default {
click: 'function'
}
},
quality: {
type: 'array',
child: {
default: 'boolean',
name: 'string',
url: 'string'
}
},
loading: 'string',
theme: 'string',
hotkey: 'boolean',