Skip to content

Commit

Permalink
Deploy to GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 21, 2024
1 parent 11d89b5 commit 37449c0
Show file tree
Hide file tree
Showing 178 changed files with 2,484 additions and 4,321 deletions.
20 changes: 20 additions & 0 deletions assets/ts/artplayer-plugin-ambilight.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type Artplayer from 'artplayer';

export = artplayerPluginAmbilight;
export as namespace artplayerPluginAmbilight;

type Option = {
blur: string;
opacity: number;
frequency: number;
zIndex: number;
duration: number;
};

type Result = {
name: 'artplayerPluginAmbilight';
start: () => void;
stop: () => void;
};

declare const artplayerPluginAmbilight: (option: Option) => (art: Artplayer) => Result;
17 changes: 17 additions & 0 deletions assets/ts/artplayer-plugin-auto-thumbnail.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type Artplayer from 'artplayer';

export = artplayerPluginAutoThumbnail;
export as namespace artplayerPluginAutoThumbnail;

type Option = {
url?: string;
width?: number;
height?: number;
scale?: number;
};

type Result = {
name: 'artplayerPluginAutoThumbnail';
};

declare const artplayerPluginAutoThumbnail: (option: Option) => (art: Artplayer) => Result;
21 changes: 21 additions & 0 deletions assets/ts/artplayer-plugin-chapter.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import type Artplayer from 'artplayer';

export = artplayerPluginChapter;
export as namespace artplayerPluginChapter;

type Chapters = {
start: number;
end: number;
title: string;
}[];

type Option = {
chapters?: Chapters;
};

type Result = {
name: 'artplayerPluginChapter';
update: (option: Option) => void;
};

declare const artplayerPluginChapter: (option: Option) => (art: Artplayer) => Result;
25 changes: 25 additions & 0 deletions assets/ts/artplayer-plugin-danmuku-mask.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import type Artplayer from 'artplayer';

export = artplayerPluginDanmukuMask;
export as namespace artplayerPluginDanmukuMask;

type Option = {
solutionPath?: string;
modelSelection?: number;
smoothSegmentation?: boolean;
minDetectionConfidence?: number;
minTrackingConfidence?: number;
selfieMode?: boolean;
drawContour?: boolean;
foregroundThreshold?: number;
opacity?: number;
maskBlurAmount?: number;
};

type Result = {
name: 'artplayerPluginDanmukuMask';
start: () => Promise<void>;
stop: () => void;
};

declare const artplayerPluginDanmukuMask: (option?: Option) => (art: Artplayer) => Result;
69 changes: 55 additions & 14 deletions assets/ts/artplayer-plugin-danmuku.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ export = artplayerPluginDanmuku;
export as namespace artplayerPluginDanmuku;

type Mode = 0 | 1 | 2;
type Danmuku = Danmu[] | string | (() => Promise<Danmu[]>) | Promise<Danmu[]>;

type Slider = {
min: number;
max: number;
steps: {
name?: string;
value?: any;
show?: boolean;
}[];
};

type Danmu = {
/**
Expand Down Expand Up @@ -35,18 +46,13 @@ type Danmu = {
* 弹幕自定义样式
*/
style?: Partial<CSSStyleDeclaration>;

/**
* 弹幕文本是否转义, 默认为 true
*/
escape?: boolean;
};

type Option = {
/**
* 弹幕数据: 函数,数组,Promise,URL
*/
danmuku: Danmu[] | string | (() => Promise<Danmu[]>) | Promise<Danmu[]>;
danmuku: Danmuku;

/**
* 弹幕持续时间,范围在[1 ~ 10]
Expand Down Expand Up @@ -116,6 +122,11 @@ type Option = {
flattening?: number;
};

/**
* 当播放器宽度小于此值时,弹幕发射器置于播放器底部
*/
width?: number;

/**
* 热力图数据
*/
Expand All @@ -141,6 +152,11 @@ type Option = {
*/
visible?: boolean;

/**
* 是否开启弹幕发射器
*/
emitter?: boolean;

/**
* 弹幕输入框最大长度, 范围在[1 ~ 1000]
*/
Expand All @@ -155,35 +171,60 @@ type Option = {
* 弹幕主题,只在自定义挂载时生效
*/
theme?: 'light' | 'dark';

/**
* 不透明度配置项
*/
OPACITY?: Slider;

/**
* 弹幕速度配置项
*/
SPEED?: Slider;

/**
* 显示区域配置项
*/
MARGIN?: Slider;

/**
* 弹幕字号配置项
*/
FONT_SIZE?: Slider;

/**
* 颜色列表配置项
*/
COLOR?: string[];
};

type Danmuku = {
type Result = {
name: 'artplayerPluginDanmuku';

/**
* 发送一条实时弹幕
*/
emit: (danmu: Danmu) => Danmuku;
emit: (danmu: Danmu) => Result;

/**
* 重载弹幕源,或者切换新弹幕
*/
load: () => Promise<Danmuku>;
load: (danmuku?: Danmuku) => Promise<Result>;

/**
* 实时改变弹幕配置
*/
config: (option: Option) => Danmuku;
config: (option: Option) => Result;

/**
* 隐藏弹幕层
*/
hide: () => Danmuku;
hide: () => Result;

/**
* 显示弹幕层
*/
show: () => Danmuku;
show: () => Result;

/**
* 挂载弹幕输入框
Expand All @@ -193,7 +234,7 @@ type Danmuku = {
/**
* 重置弹幕
*/
reset: () => Danmuku;
reset: () => Result;

/**
* 弹幕配置
Expand All @@ -211,4 +252,4 @@ type Danmuku = {
isStop: boolean;
};

declare const artplayerPluginDanmuku: (option: Option) => (art: Artplayer) => Danmuku;
declare const artplayerPluginDanmuku: (option: Option) => (art: Artplayer) => Result;
17 changes: 17 additions & 0 deletions assets/ts/artplayer-plugin-hls-control.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type Artplayer from 'artplayer';

export = artplayerPluginHlsControl;
export as namespace artplayerPluginHlsControl;

type Config = {
control?: boolean;
setting?: boolean;
title?: string;
auto?: string;
getName?(level: object): String;
};

declare const artplayerPluginHlsControl: (option: { quality?: Config; audio?: Config }) => (art: Artplayer) => {
name: 'artplayerPluginHlsControl';
update: () => void;
};
20 changes: 20 additions & 0 deletions assets/ts/artplayer-plugin-vast.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type Artplayer from 'artplayer';

export = artplayerPluginVast;
export as namespace artplayerPluginVast;

type Option = (params: {
art: Artplayer;
id: string;
ima: any;
imaPlayer: any;
$container: HTMLDivElement;
playUrl: (url: string) => void;
playRes: (res: string) => void;
}) => void;

type Result = {
name: 'artplayerPluginVast';
};

declare const artplayerPluginVast: (option: Option) => (art: Artplayer) => Result;
Loading

0 comments on commit 37449c0

Please sign in to comment.