mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 08:01:20 -08:00
add settings
This commit is contained in:
1 parent
ddb3ff18bd
commit
550b3342a5
8 files changed
+124
-5
No files matched your search
@@ -138,6 +138,7 @@ export default class Artplayer extends Emitter {
|
||||
layers: [],
|
||||
contextmenu: [],
|
||||
controls: [],
|
||||
settings: [],
|
||||
quality: [],
|
||||
highlight: [],
|
||||
plugins: [],
|
||||
|
||||
@@ -65,6 +65,7 @@ export default {
|
||||
whitelist: [`${s}|${f}|${r}`],
|
||||
layers: [component],
|
||||
contextmenu: [component],
|
||||
settings: [component],
|
||||
controls: [
|
||||
{
|
||||
...component,
|
||||
|
||||
@@ -20,8 +20,8 @@ export default class Setting extends Component {
|
||||
|
||||
if (option.setting) {
|
||||
art.once('ready', () => {
|
||||
proxy($setting, 'click', e => {
|
||||
if (e.target === $setting) {
|
||||
proxy($setting, 'click', (event) => {
|
||||
if (event.target === $setting) {
|
||||
this.show = false;
|
||||
}
|
||||
});
|
||||
@@ -53,6 +53,10 @@ export default class Setting extends Component {
|
||||
name: 'playbackRate',
|
||||
}),
|
||||
);
|
||||
|
||||
option.settings.forEach((item) => {
|
||||
this.add(item);
|
||||
});
|
||||
});
|
||||
|
||||
art.on('blur', () => {
|
||||
|
||||
Reference in new issue
Block a user