mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-13 15:56:15 -08:00
update artplayer.d.ts
This commit is contained in:
1 parent
6098c7f7ba
commit
6440f5f1cf
5 files changed
+383
-50
No files matched your search
Vendored
+43
-28
@@ -112,6 +112,33 @@ type WhitelistFunction = (ua: string) => Boolean;
|
||||
type CustomType = (video: HTMLVideoElement, url: string, art: Artplayer) => any;
|
||||
type EventCallback = (event: Event) => any;
|
||||
|
||||
interface SubtitleOption {
|
||||
/**
|
||||
* The subtitle url
|
||||
*/
|
||||
url: string;
|
||||
|
||||
/**
|
||||
* The subtitle type
|
||||
*/
|
||||
type: 'vtt' | 'srt' | 'ass';
|
||||
|
||||
/**
|
||||
* The subtitle style object
|
||||
*/
|
||||
style: CSSStyleDeclaration;
|
||||
|
||||
/**
|
||||
* The subtitle encoding, default utf-8
|
||||
*/
|
||||
encoding: string;
|
||||
|
||||
/**
|
||||
* Whether bilingual subtitle
|
||||
*/
|
||||
bilingual: boolean;
|
||||
}
|
||||
|
||||
interface Option {
|
||||
/**
|
||||
* The container mounted by the player
|
||||
@@ -366,32 +393,7 @@ interface Option {
|
||||
/**
|
||||
* Custom subtitle option
|
||||
*/
|
||||
subtitle?: {
|
||||
/**
|
||||
* The subtitle url
|
||||
*/
|
||||
url: string;
|
||||
|
||||
/**
|
||||
* The subtitle type
|
||||
*/
|
||||
type: 'vtt' | 'srt' | 'ass';
|
||||
|
||||
/**
|
||||
* The subtitle style object
|
||||
*/
|
||||
style: CSSStyleDeclaration;
|
||||
|
||||
/**
|
||||
* The subtitle encoding
|
||||
*/
|
||||
encoding: string;
|
||||
|
||||
/**
|
||||
* Whether bilingual subtitle
|
||||
*/
|
||||
bilingual: boolean;
|
||||
};
|
||||
subtitle?: SubtitleOption;
|
||||
|
||||
/**
|
||||
* Other video attribute
|
||||
@@ -402,7 +404,19 @@ interface Option {
|
||||
* Custom default icons
|
||||
*/
|
||||
icons?: {
|
||||
[propName: string]: string | HTMLElement;
|
||||
loading: HTMLElement | string;
|
||||
state: HTMLElement | string;
|
||||
play: HTMLElement | string;
|
||||
pause: HTMLElement | string;
|
||||
volume: HTMLElement | string;
|
||||
volumeClose: HTMLElement | string;
|
||||
subtitle: HTMLElement | string;
|
||||
screenshot: HTMLElement | string;
|
||||
setting: HTMLElement | string;
|
||||
fullscreen: HTMLElement | string;
|
||||
fullscreenWeb: HTMLElement | string;
|
||||
pip: HTMLElement | string;
|
||||
indicator: HTMLElement | string;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -573,6 +587,7 @@ declare class Artplayer extends Player {
|
||||
readonly fullscreen: HTMLElement;
|
||||
readonly fullscreenWeb: HTMLElement;
|
||||
readonly pip: HTMLElement;
|
||||
readonly indicator: HTMLElement;
|
||||
};
|
||||
|
||||
readonly hotkey: {
|
||||
@@ -601,7 +616,7 @@ declare class Artplayer extends Player {
|
||||
set toggle(state: boolean);
|
||||
get url(): string;
|
||||
style(name: string | CSSStyleDeclaration, value?: string): HTMLElement;
|
||||
switch(url: string, option?: object): Promise<string>;
|
||||
switch(url: string, option?: SubtitleOption): Promise<string>;
|
||||
};
|
||||
|
||||
readonly mobile: object;
|
||||
|
||||
@@ -1095,10 +1095,7 @@
|
||||
if (typeName && typeCallback) {
|
||||
sleep().then(function () {
|
||||
art.loading.show = true;
|
||||
var result = typeCallback.call(art, $video, url, art);
|
||||
def(art, typeName, {
|
||||
value: result
|
||||
});
|
||||
typeCallback.call(art, $video, url, art);
|
||||
});
|
||||
} else {
|
||||
$video.src = url;
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"artplayer.js","sources":["../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/classCallCheck.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/createClass.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/assertThisInitialized.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/setPrototypeOf.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/inherits.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/typeof.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/possibleConstructorReturn.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/getPrototypeOf.js","../../node_modules/_style-inject@0.3.0@style-inject/dist/style-inject.es.js","../../packages/artplayer/node_modules/_option-validator@2.0.6@option-validator/dist/option-validator.js","../../packages/artplayer/src/utils/emitter.js","../../packages/artplayer/src/utils/compatibility.js","../../packages/artplayer/src/utils/dom.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/isNativeFunction.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/isNativeReflectConstruct.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/construct.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/wrapNativeSuper.js","../../packages/artplayer/src/utils/error.js","../../packages/artplayer/src/utils/subtitle.js","../../packages/artplayer/src/utils/file.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/arrayLikeToArray.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/arrayWithoutHoles.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/iterableToArray.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/unsupportedIterableToArray.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/nonIterableSpread.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/toConsumableArray.js","../../packages/artplayer/src/utils/property.js","../../packages/artplayer/src/utils/time.js","../../packages/artplayer/src/utils/format.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/defineProperty.js","../../packages/artplayer/src/scheme/index.js","../../packages/artplayer/src/config/index.js","../../packages/artplayer/src/whitelist.js","../../packages/artplayer/src/template.js","../../packages/artplayer/src/i18n/index.js","../../packages/artplayer/src/player/urlMix.js","../../packages/artplayer/src/player/attrInit.js","../../packages/artplayer/src/player/eventInit.js","../../packages/artplayer/src/player/exclusiveInit.js","../../packages/artplayer/src/player/playMix.js","../../packages/artplayer/src/player/pauseMix.js","../../packages/artplayer/src/player/toggleMix.js","../../packages/artplayer/src/player/seekMix.js","../../packages/artplayer/src/player/volumeMix.js","../../packages/artplayer/src/player/currentTimeMix.js","../../packages/artplayer/src/player/durationMix.js","../../packages/artplayer/src/player/switchMix.js","../../packages/artplayer/src/player/playbackRateMix.js","../../packages/artplayer/src/player/aspectRatioMix.js","../../packages/artplayer/src/player/screenshotMix.js","../../packages/artplayer/node_modules/screenfull/dist/screenfull.js","../../packages/artplayer/src/player/fullscreenMix.js","../../packages/artplayer/src/player/fullscreenWebMix.js","../../packages/artplayer/src/player/pipMix.js","../../packages/artplayer/src/player/loadedMix.js","../../packages/artplayer/src/player/playedMix.js","../../packages/artplayer/src/player/playingMix.js","../../packages/artplayer/src/player/autoSizeMix.js","../../packages/artplayer/src/player/rectMix.js","../../packages/artplayer/src/player/flipMix.js","../../packages/artplayer/src/player/miniMix.js","../../packages/artplayer/src/player/loopMin.js","../../packages/artplayer/src/player/rotateMix.js","../../packages/artplayer/src/player/posterMix.js","../../packages/artplayer/src/player/index.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/superPropBase.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/get.js","../../packages/artplayer/src/utils/component.js","../../packages/artplayer/src/control/fullscreen.js","../../packages/artplayer/src/control/fullscreenWeb.js","../../packages/artplayer/src/control/pip.js","../../packages/artplayer/src/control/playAndPause.js","../../packages/artplayer/src/control/progress.js","../../packages/artplayer/src/control/subtitle.js","../../packages/artplayer/src/control/time.js","../../packages/artplayer/src/control/volume.js","../../packages/artplayer/src/control/setting.js","../../packages/artplayer/src/control/thumbnails.js","../../packages/artplayer/src/control/screenshot.js","../../packages/artplayer/src/control/quality.jLine truncated
|
||||
{"version":3,"file":"artplayer.js","sources":["../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/classCallCheck.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/createClass.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/assertThisInitialized.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/setPrototypeOf.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/inherits.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/typeof.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/possibleConstructorReturn.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/getPrototypeOf.js","../../node_modules/_style-inject@0.3.0@style-inject/dist/style-inject.es.js","../../packages/artplayer/node_modules/_option-validator@2.0.6@option-validator/dist/option-validator.js","../../packages/artplayer/src/utils/emitter.js","../../packages/artplayer/src/utils/compatibility.js","../../packages/artplayer/src/utils/dom.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/isNativeFunction.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/isNativeReflectConstruct.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/construct.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/wrapNativeSuper.js","../../packages/artplayer/src/utils/error.js","../../packages/artplayer/src/utils/subtitle.js","../../packages/artplayer/src/utils/file.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/arrayLikeToArray.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/arrayWithoutHoles.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/iterableToArray.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/unsupportedIterableToArray.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/nonIterableSpread.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/toConsumableArray.js","../../packages/artplayer/src/utils/property.js","../../packages/artplayer/src/utils/time.js","../../packages/artplayer/src/utils/format.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/defineProperty.js","../../packages/artplayer/src/scheme/index.js","../../packages/artplayer/src/config/index.js","../../packages/artplayer/src/whitelist.js","../../packages/artplayer/src/template.js","../../packages/artplayer/src/i18n/index.js","../../packages/artplayer/src/player/urlMix.js","../../packages/artplayer/src/player/attrInit.js","../../packages/artplayer/src/player/eventInit.js","../../packages/artplayer/src/player/exclusiveInit.js","../../packages/artplayer/src/player/playMix.js","../../packages/artplayer/src/player/pauseMix.js","../../packages/artplayer/src/player/toggleMix.js","../../packages/artplayer/src/player/seekMix.js","../../packages/artplayer/src/player/volumeMix.js","../../packages/artplayer/src/player/currentTimeMix.js","../../packages/artplayer/src/player/durationMix.js","../../packages/artplayer/src/player/switchMix.js","../../packages/artplayer/src/player/playbackRateMix.js","../../packages/artplayer/src/player/aspectRatioMix.js","../../packages/artplayer/src/player/screenshotMix.js","../../packages/artplayer/node_modules/screenfull/dist/screenfull.js","../../packages/artplayer/src/player/fullscreenMix.js","../../packages/artplayer/src/player/fullscreenWebMix.js","../../packages/artplayer/src/player/pipMix.js","../../packages/artplayer/src/player/loadedMix.js","../../packages/artplayer/src/player/playedMix.js","../../packages/artplayer/src/player/playingMix.js","../../packages/artplayer/src/player/autoSizeMix.js","../../packages/artplayer/src/player/rectMix.js","../../packages/artplayer/src/player/flipMix.js","../../packages/artplayer/src/player/miniMix.js","../../packages/artplayer/src/player/loopMin.js","../../packages/artplayer/src/player/rotateMix.js","../../packages/artplayer/src/player/posterMix.js","../../packages/artplayer/src/player/index.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/superPropBase.js","../../node_modules/_@babel_runtime@7.16.3@@babel/runtime/helpers/esm/get.js","../../packages/artplayer/src/utils/component.js","../../packages/artplayer/src/control/fullscreen.js","../../packages/artplayer/src/control/fullscreenWeb.js","../../packages/artplayer/src/control/pip.js","../../packages/artplayer/src/control/playAndPause.js","../../packages/artplayer/src/control/progress.js","../../packages/artplayer/src/control/subtitle.js","../../packages/artplayer/src/control/time.js","../../packages/artplayer/src/control/volume.js","../../packages/artplayer/src/control/setting.js","../../packages/artplayer/src/control/thumbnails.js","../../packages/artplayer/src/control/screenshot.js","../../packages/artplayer/src/control/quality.jLine truncated
|
||||
@@ -16,10 +16,7 @@ export default function urlMix(art, player) {
|
||||
if (typeName && typeCallback) {
|
||||
sleep().then(() => {
|
||||
art.loading.show = true;
|
||||
const result = typeCallback.call(art, $video, url, art);
|
||||
def(art, typeName, {
|
||||
value: result,
|
||||
});
|
||||
typeCallback.call(art, $video, url, art);
|
||||
});
|
||||
} else {
|
||||
$video.src = url;
|
||||
|
||||
+337
-13
@@ -2,31 +2,108 @@ export = Artplayer;
|
||||
export as namespace Artplayer;
|
||||
|
||||
interface Selector {
|
||||
/**
|
||||
* Whether the default is selected
|
||||
*/
|
||||
default?: boolean;
|
||||
|
||||
/**
|
||||
* Html string of selector
|
||||
*/
|
||||
html: string;
|
||||
}
|
||||
|
||||
interface ComponentOption {
|
||||
/**
|
||||
* Html string or html element of component
|
||||
*/
|
||||
html: string | HTMLElement;
|
||||
|
||||
/**
|
||||
* Whether to disable component
|
||||
*/
|
||||
disable?: boolean;
|
||||
|
||||
/**
|
||||
* Unique name for component
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* Component sort index
|
||||
*/
|
||||
index?: number;
|
||||
style?: ElementCSSInlineStyle['style'];
|
||||
|
||||
/**
|
||||
* Component style object
|
||||
*/
|
||||
style?: CSSStyleDeclaration;
|
||||
|
||||
/**
|
||||
* Component click event
|
||||
*/
|
||||
click?(component: Component, event: Event): void;
|
||||
|
||||
/**
|
||||
* Wnen the component was mounted
|
||||
*/
|
||||
mounted?(element: HTMLElement): void;
|
||||
|
||||
/**
|
||||
* Component tooltip, use in controls
|
||||
*/
|
||||
tooltip?: string;
|
||||
|
||||
/**
|
||||
* Component position, use in controls
|
||||
*/
|
||||
position?: 'top' | 'left' | 'right';
|
||||
|
||||
/**
|
||||
* Custom selector list, use in controls
|
||||
*/
|
||||
selector?: Selector[];
|
||||
|
||||
/**
|
||||
* When selector item click, use in controls
|
||||
*/
|
||||
onSelect?(selector: Selector, element: HTMLElement): void;
|
||||
}
|
||||
|
||||
interface Component {
|
||||
/**
|
||||
* Component ID
|
||||
*/
|
||||
readonly id: number;
|
||||
|
||||
/**
|
||||
* Component name
|
||||
*/
|
||||
readonly name: string | void;
|
||||
|
||||
/**
|
||||
* Component parent element
|
||||
*/
|
||||
readonly $parent: HTMLElement | void;
|
||||
|
||||
/**
|
||||
* Whether to show component parent
|
||||
*/
|
||||
get show(): boolean;
|
||||
|
||||
/**
|
||||
* Whether to show component parent
|
||||
*/
|
||||
set show(state: boolean);
|
||||
|
||||
/**
|
||||
* Toggle the component parent
|
||||
*/
|
||||
set toggle(state: boolean);
|
||||
|
||||
/**
|
||||
* Dynamic adding component
|
||||
*/
|
||||
add(option: ComponentOption): HTMLElement;
|
||||
}
|
||||
|
||||
@@ -35,70 +112,316 @@ type WhitelistFunction = (ua: string) => Boolean;
|
||||
type CustomType = (video: HTMLVideoElement, url: string, art: Artplayer) => any;
|
||||
type EventCallback = (event: Event) => any;
|
||||
|
||||
interface Option {
|
||||
container: string | HTMLElement;
|
||||
interface SubtitleOption {
|
||||
/**
|
||||
* The subtitle url
|
||||
*/
|
||||
url: string;
|
||||
|
||||
/**
|
||||
* The subtitle type
|
||||
*/
|
||||
type: 'vtt' | 'srt' | 'ass';
|
||||
|
||||
/**
|
||||
* The subtitle style object
|
||||
*/
|
||||
style: CSSStyleDeclaration;
|
||||
|
||||
/**
|
||||
* The subtitle encoding, default utf-8
|
||||
*/
|
||||
encoding: string;
|
||||
|
||||
/**
|
||||
* Whether bilingual subtitle
|
||||
*/
|
||||
bilingual: boolean;
|
||||
}
|
||||
|
||||
interface Option {
|
||||
/**
|
||||
* The container mounted by the player
|
||||
*/
|
||||
container: string | HTMLElement;
|
||||
|
||||
/**
|
||||
* Video url
|
||||
*/
|
||||
url: string;
|
||||
|
||||
/**
|
||||
* Video poster image url
|
||||
*/
|
||||
poster?: string;
|
||||
|
||||
/**
|
||||
* Video title
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* Video url type
|
||||
*/
|
||||
type?: string;
|
||||
|
||||
/**
|
||||
* Player color theme
|
||||
*/
|
||||
theme?: string;
|
||||
|
||||
/**
|
||||
* Player language
|
||||
*/
|
||||
lang?: 'en' | 'zh-cn' | 'zh-tw';
|
||||
|
||||
/**
|
||||
* Player default volume
|
||||
*/
|
||||
volume?: number;
|
||||
|
||||
/**
|
||||
* Whether live broadcast mode
|
||||
*/
|
||||
isLive?: boolean;
|
||||
|
||||
/**
|
||||
* Whether video muted
|
||||
*/
|
||||
muted?: boolean;
|
||||
|
||||
/**
|
||||
* Whether video auto play
|
||||
*/
|
||||
autoplay?: boolean;
|
||||
|
||||
/**
|
||||
* Whether player auto resize
|
||||
*/
|
||||
autoSize?: boolean;
|
||||
|
||||
/**
|
||||
* Whether player auto run mini mode
|
||||
*/
|
||||
autoMini?: boolean;
|
||||
|
||||
/**
|
||||
* Whether video auto loop
|
||||
*/
|
||||
loop?: boolean;
|
||||
|
||||
/**
|
||||
* Whether show video flip button
|
||||
*/
|
||||
flip?: boolean;
|
||||
|
||||
/**
|
||||
* Whether show video rotate button
|
||||
*/
|
||||
rotate?: boolean;
|
||||
|
||||
/**
|
||||
* Whether show video playback rate button
|
||||
*/
|
||||
playbackRate?: boolean;
|
||||
|
||||
/**
|
||||
* Whether show video aspect ratio button
|
||||
*/
|
||||
aspectRatio?: boolean;
|
||||
|
||||
/**
|
||||
* Whether show video screenshot button
|
||||
*/
|
||||
screenshot?: boolean;
|
||||
|
||||
/**
|
||||
* Whether show video setting button
|
||||
*/
|
||||
setting?: boolean;
|
||||
|
||||
/**
|
||||
* Whether to enable player hotkey
|
||||
*/
|
||||
hotkey?: boolean;
|
||||
|
||||
/**
|
||||
* Whether show video pip button
|
||||
*/
|
||||
pip?: boolean;
|
||||
|
||||
/**
|
||||
* Do you want to run only one player at a time
|
||||
*/
|
||||
mutex?: boolean;
|
||||
|
||||
/**
|
||||
* Whether use backdrop in UI
|
||||
*/
|
||||
backdrop?: boolean;
|
||||
|
||||
/**
|
||||
* Whether show video window fullscreen button
|
||||
*/
|
||||
fullscreen?: boolean;
|
||||
|
||||
/**
|
||||
* Whether show video web fullscreen button
|
||||
*/
|
||||
fullscreenWeb?: boolean;
|
||||
|
||||
/**
|
||||
* Whether to enable player subtitle offset
|
||||
*/
|
||||
subtitleOffset?: boolean;
|
||||
|
||||
/**
|
||||
* Whether to enable player mini progress bar
|
||||
*/
|
||||
miniProgressBar?: boolean;
|
||||
|
||||
/**
|
||||
* Whether use local video function
|
||||
*/
|
||||
localVideo?: boolean;
|
||||
|
||||
/**
|
||||
* Whether use local subtitle function
|
||||
*/
|
||||
localSubtitle?: boolean;
|
||||
|
||||
/**
|
||||
* Whether use SSR function
|
||||
*/
|
||||
useSSR?: boolean;
|
||||
|
||||
/**
|
||||
* Custom plugin list
|
||||
*/
|
||||
plugins?: PluginFunction[];
|
||||
|
||||
/**
|
||||
* Custom mobile whitelist
|
||||
*/
|
||||
whitelist?: (string | WhitelistFunction | RegExp)[];
|
||||
|
||||
/**
|
||||
* Custom layer list
|
||||
*/
|
||||
layers?: ComponentOption[];
|
||||
|
||||
/**
|
||||
* Custom contextmenu list
|
||||
*/
|
||||
contextmenu?: ComponentOption[];
|
||||
|
||||
/**
|
||||
* Custom control list
|
||||
*/
|
||||
controls?: ComponentOption[];
|
||||
|
||||
/**
|
||||
* Custom setting list
|
||||
*/
|
||||
settings?: ComponentOption[];
|
||||
|
||||
/**
|
||||
* Custom video quality list
|
||||
*/
|
||||
quality?: {
|
||||
/**
|
||||
* Whether the default is selected
|
||||
*/
|
||||
default?: boolean;
|
||||
|
||||
/**
|
||||
* Html string of quality
|
||||
*/
|
||||
html: string;
|
||||
|
||||
/**
|
||||
* Video quality url
|
||||
*/
|
||||
url: string;
|
||||
}[];
|
||||
|
||||
/**
|
||||
* Custom highlight list
|
||||
*/
|
||||
highlight?: {
|
||||
/**
|
||||
* The highlight time
|
||||
*/
|
||||
time: number;
|
||||
|
||||
/**
|
||||
* The highlight text
|
||||
*/
|
||||
text: string;
|
||||
}[];
|
||||
|
||||
/**
|
||||
* Custom thumbnail
|
||||
*/
|
||||
thumbnails?: {
|
||||
/**
|
||||
* The thumbnail image url
|
||||
*/
|
||||
url: string;
|
||||
|
||||
/**
|
||||
* The thumbnail item number
|
||||
*/
|
||||
number?: number;
|
||||
|
||||
/**
|
||||
* The thumbnail item width
|
||||
*/
|
||||
width?: number;
|
||||
|
||||
/**
|
||||
* The thumbnail item height
|
||||
*/
|
||||
height?: number;
|
||||
|
||||
/**
|
||||
* The thumbnail column size
|
||||
*/
|
||||
column?: number;
|
||||
};
|
||||
subtitle?: {
|
||||
url: string;
|
||||
style: ElementCSSInlineStyle['style'];
|
||||
encoding: string;
|
||||
bilingual: boolean;
|
||||
};
|
||||
moreVideoAttr?: object;
|
||||
|
||||
/**
|
||||
* Custom subtitle option
|
||||
*/
|
||||
subtitle?: SubtitleOption;
|
||||
|
||||
/**
|
||||
* Other video attribute
|
||||
*/
|
||||
moreVideoAttr?: HTMLVideoElement;
|
||||
|
||||
/**
|
||||
* Custom default icons
|
||||
*/
|
||||
icons?: {
|
||||
[propName: string]: string | HTMLElement;
|
||||
loading: HTMLElement | string;
|
||||
state: HTMLElement | string;
|
||||
play: HTMLElement | string;
|
||||
pause: HTMLElement | string;
|
||||
volume: HTMLElement | string;
|
||||
volumeClose: HTMLElement | string;
|
||||
subtitle: HTMLElement | string;
|
||||
screenshot: HTMLElement | string;
|
||||
setting: HTMLElement | string;
|
||||
fullscreen: HTMLElement | string;
|
||||
fullscreenWeb: HTMLElement | string;
|
||||
pip: HTMLElement | string;
|
||||
indicator: HTMLElement | string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Custom video type function
|
||||
*/
|
||||
customType?: {
|
||||
[propName: string]: CustomType;
|
||||
};
|
||||
@@ -264,6 +587,7 @@ declare class Artplayer extends Player {
|
||||
readonly fullscreen: HTMLElement;
|
||||
readonly fullscreenWeb: HTMLElement;
|
||||
readonly pip: HTMLElement;
|
||||
readonly indicator: HTMLElement;
|
||||
};
|
||||
|
||||
readonly hotkey: {
|
||||
@@ -291,8 +615,8 @@ declare class Artplayer extends Player {
|
||||
set show(state: boolean);
|
||||
set toggle(state: boolean);
|
||||
get url(): string;
|
||||
style(name: string | ElementCSSInlineStyle['style'], value?: string): HTMLElement;
|
||||
switch(url: string, option?: object): Promise<string>;
|
||||
style(name: string | CSSStyleDeclaration, value?: string): HTMLElement;
|
||||
switch(url: string, option?: SubtitleOption): Promise<string>;
|
||||
};
|
||||
|
||||
readonly mobile: object;
|
||||
|
||||
Reference in new issue
Block a user