mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-27 17:51: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
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "artplayer",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.1",
|
||||
"expose": "Artplayer",
|
||||
"description": "ArtPlayer.js is a modern and full featured HTML5 video player",
|
||||
"main": "dist/artplayer.js",
|
||||
|
||||
@@ -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', () => {
|
||||
|
||||
+1
@@ -53,6 +53,7 @@ export default class Artplayer {
|
||||
layers?: Component[];
|
||||
contextmenu?: Component[];
|
||||
controls?: Component[];
|
||||
settings?: Component[];
|
||||
quality?: {
|
||||
default?: boolean;
|
||||
html: string;
|
||||
|
||||
Reference in new issue
Block a user