Hls quality (#409)

* update docs
This commit is contained in:
Harvey Zack authored and GitHub committed 2022-10-27 15:30:47 +08:00
1 parent 431a8642f6
commit 97c73c1115
82 files changed
+711 -171

No files matched your search

+2 -2
View File
@@ -88,13 +88,13 @@ export default class Setting extends Component {
this.$parent.innerHTML = '';
this.option = makeRecursion(this.option);
this.init(this.option);
return this;
return this.option;
}
add(setting) {
this.option.push(setting);
this.update();
return this;
return setting;
}
creatHeader(item) {
+3 -3
View File
@@ -7,7 +7,7 @@ import { Subtitle } from './subtitle';
import { Icons } from './icons';
import { Template } from './template';
import { I18n } from './i18n';
import { Setting } from './setting';
import { Setting, SettingOption } from './setting';
import { Component } from './component';
export = Artplayer;
@@ -145,8 +145,8 @@ declare class Artplayer extends Player {
readonly setting: {
option: Setting[];
add(setting: Setting): Artplayer['setting'];
update(): Artplayer['setting'];
add(setting: Setting): SettingOption;
update(): SettingOption[];
} & Component;
readonly plugins: {
+6 -4
View File
@@ -13,6 +13,8 @@ type Props<T> = {
$parentList: Setting[];
} & Omit<T, 'html' | 'icon' | 'tooltip'>;
export type SettingOption = Props<Setting>;
export type Setting = {
/**
* Html string or html element of setting name
@@ -52,7 +54,7 @@ export type Setting = {
/**
* When selector item click
*/
onSelect?(this: Artplayer, item: Props<Setting>, element: HTMLDivElement, event: Event): void;
onSelect?(this: Artplayer, item: SettingOption, element: HTMLDivElement, event: Event): void;
/**
* Custom switch item
@@ -62,7 +64,7 @@ export type Setting = {
/**
* When switch item click
*/
onSwitch?(this: Artplayer, item: Props<Setting>, element: HTMLDivElement, event: Event): void;
onSwitch?(this: Artplayer, item: SettingOption, element: HTMLDivElement, event: Event): void;
/**
* Custom range item
@@ -72,12 +74,12 @@ export type Setting = {
/**
* When range item change
*/
onRange?(this: Artplayer, item: Props<Setting>, element: HTMLDivElement, event: Event): void;
onRange?(this: Artplayer, item: SettingOption, element: HTMLDivElement, event: Event): void;
/**
* When range item change in real time
*/
onChange?(this: Artplayer, item: Props<Setting>, element: HTMLDivElement, event: Event): void;
onChange?(this: Artplayer, item: SettingOption, element: HTMLDivElement, event: Event): void;
[key: string]: any;
};