* chore: Bump artplayer-plugin-danmuku version to 5.1.0

* chore: Update danmuku plugin with new mount option

* chore: Update danmuku plugin with new mount option

* chore: Update danmuku plugin with new mount option

* chore: Update danmuku plugin with new mount option

* chore: Update danmuku plugin with new mount option

* chore: Update danmuku plugin with new mount option

* chore: Refactor getDanmuTop function to handle additional cases

* chore: Refactor getDanmuTop function to handle additional cases

* chore: Update danmuku plugin with new mount option

* chore: Update danmuku plugin with new mount option

* chore: Refactor danmuku plugin to always create a new Setting instance

* Refactor danmuku plugin to always create a new Setting instance

* Refactor danmuku plugin to always create a new Setting instance

* Update danmuku.js

* Update danmuku.js

* Refactor danmuku plugin to include a new Setting instance

* Refactor danmuku plugin to include a new Setting instance

* Refactor danmuku plugin styles for better alignment and spacing

* Refactor danmuku plugin styles for better alignment and spacing

* Refactor danmuku plugin styles for better alignment and spacing

* Refactor danmuku plugin styles for better alignment and spacing

* Refactor danmuku plugin styles for better alignment and spacing

* chore: Update package.json files

* Refactor danmuku plugin to remove unnecessary whitespace in the setting template

* chore: Remove ESLint configuration files and update npm dependencies

* chore: Update ESLint configuration to disable console warnings and fix unused variable warnings

* chore: Update ESLint configuration to fix quotes rule

* Update package.json

* Update package.json

* Update setting.js

* chore: Compress CSS code in build script

* chore: Update build script to compress JavaScript code

* chore: Update build script to compress JavaScript code

* chore: Refactor setting.js to improve code organization and remove unused variables

* chore: Add isHover flag to Control component for better control hiding behavior

* chore: Update Control component to use $bottom instead of $controls for better control hiding behavior

* Update package.json

* Update package.json

* Update package.json

* chore: Update lerna.json to use independent versioning and yarn as npm client

* refactor: Update Danmuku class to support configurable modes and visibility

* refactor: Update Danmuku styles for better visibility and configurability

* feat: Update font weight in Danmuku styles for better readability

* refactor: Update Danmuku class to support configurable modes and visibility

* refactor: Add opacity, area, font, and speed sliders to Danmuku settings

* refactor: Initialize sliders for opacity, area, font, and speed in Danmuku settings

* feat: Add slider UI for opacity, area, and speed in Danmuku settings

* feat: Update slider styles in Danmuku settings for better visibility and configurability

* refactor: Improve Danmuku settings UI for better visibility and configurability

* refactor: Improve Danmuku settings UI for better visibility and configurability

* refactor: Update slider styles in Danmuku settings for better visibility and configurability

* refactor: Update margin slider initialization in Danmuku settings

* refactor: Update slider styles and initialization in Danmuku settings

* refactor: Update Danmuku class to support configurable visibility

* refactor: Update Danmuku class to support configurable visibility

* refactor: Update Danmuku class to support configurable visibility

* refactor: Update Danmuku class to support configurable visibility

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Improve Danmuku settings UI for better visibility and configurability

* add lock

* refactor: Add lock and unlock methods to Danmuku settings

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings UI for better visibility and configurability

* Update artplayer-plugin-danmuku.d.ts

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings event listeners

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings UI for better visibility and configurability
This commit is contained in:
Harvey Zack authored and GitHub committed 2024-05-26 14:57:22 +08:00
1 parent dfd1cf968d
commit 699135afcf
402 files changed
+20804 -17005

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
import type Artplayer from 'artplayer';
export = artplayerPluginChromecast;
export as namespace artplayerPluginChromecast;
type Option = {
url?: string;
sdk?: string;
icon?: string;
mimeType?: string;
};
type Chromecast = {
name: 'artplayerPluginChromecast';
};
declare const artplayerPluginChromecast: (option: Option) => (art: Artplayer) => Chromecast;
+82 -50
View File
@@ -3,6 +3,8 @@ import type Artplayer from 'artplayer';
export = artplayerPluginDanmuku;
export as namespace artplayerPluginDanmuku;
type Mode = 0 | 1 | 2;
type Danmu = {
/**
* 弹幕文本
@@ -10,9 +12,9 @@ type Danmu = {
text: string;
/**
* 弹幕发送模式,0为滚动,1为静止
* 弹幕发送模式: 0: 滚动,1: 顶部,2: 底部
*/
mode?: 0 | 1;
mode?: Mode;
/**
* 弹幕颜色
@@ -25,24 +27,34 @@ type Danmu = {
time?: number;
/**
* 弹幕是否有描边
* 弹幕是否有描边, 默认为 false
*/
border?: boolean;
/**
* 弹幕自定义样式
*/
style?: Partial<CSSStyleDeclaration>;
/**
* 弹幕文本是否转义, 默认为 true
*/
escape?: boolean;
};
type Option = {
/**
* 弹幕源,可以是弹幕数组,xml 地址或者一个返回 Promise 的函数
* 弹幕数据: 函数,数组,Promise,URL
*/
danmuku: Danmu[] | string | (() => Promise<Danmu[]>) | Promise<Danmu[]>;
/**
* 弹幕持续时间,单位秒,范围在[1 ~ 10]
* 弹幕持续时间,范围在[1 ~ 10]
*/
speed?: number;
/**
* 弹幕上下边距,支持数字和高度的百分比
* 弹幕上下边距,支持像素数字和百分比
*/
margin?: [number | `${number}%`, number | `${number}%`];
@@ -52,70 +64,40 @@ type Option = {
opacity?: number;
/**
* 默认字体颜色
* 默认弹幕颜色,可以被单独弹幕项覆盖
*/
color?: string;
/**
* 默认弹幕发送模式,0为滚动,1为静止
* 弹幕模式: 0: 滚动,1: 顶部,2: 底部
*/
mode?: 0 | 1;
mode?: Mode;
/**
* 字体大小,支持数字和高度的百分比
* 幕可见的模式
*/
modes?: Mode[];
/**
* 弹幕字体大小,支持像素数字和百分比
*/
fontSize?: number | `${number}%`;
/**
* 弹幕过滤函数,返回 true 则可以发送
*/
filter?: (danmu: Danmu) => boolean;
/**
* 是否防重叠
* 弹幕是否防重叠
*/
antiOverlap?: boolean;
/**
* 是否使用 web worker
*/
useWorker?: boolean;
/**
* 是否同步到播放速度
* 是否同步播放速度
*/
synchronousPlayback?: boolean;
/**
* 输入框锁定时间,单位秒,范围在[1 ~ 60]
*/
lockTime?: number;
/**
* 输入框最大可输入的字数,范围在[0 ~ 500]
*/
maxLength?: number;
/**
* 输入框最小宽度,范围在[0 ~ 500],填 0 则为无限制
*/
minWidth?: number;
/**
* 输入框最大宽度,范围在[0 ~ Infinity],填 0 则为 100% 宽度
*/
maxWidth?: number;
/**
* 通过 mount 选项可以自定义输入框挂载的位置,默认挂载于播放器底部,仅在当宽度小于最小值时生效
* 弹幕发射器挂载点, 默认为播放器控制栏中部
*/
mount?: Element;
/**
* 输入框自定义挂载时的主题色,默认为 dark,可以选填亮色 light
*/
theme?: 'dark' | 'light';
/**
* 是否开启弹幕热度图
*/
@@ -135,9 +117,44 @@ type Option = {
};
/**
* 发送弹幕前的自定义校验,返回 true 则可以发送
* 热力图数据
*/
beforeEmit?: (danmu: Danmu) => boolean;
points?: any[];
/**
* 弹幕载入前的过滤器,只支持返回布尔值
*/
filter?: (danmu: Danmu) => boolean;
/**
* 弹幕发送前的过滤器,支持返回 Promise
*/
beforeEmit?: (danmu: Danmu) => boolean | (() => Promise<boolean>);
/**
* 弹幕显示前的过滤器,支持返回 Promise
*/
beforeVisible?: (danmu: Danmu) => boolean | (() => Promise<boolean>);
/**
* 弹幕是否可见
*/
visible?: boolean;
/**
* 弹幕输入框最大长度, 范围在[1 ~ 1000]
*/
maxLength?: number;
/**
* 输入框锁定时间,范围在[1 ~ 60]
*/
lockTime?: number;
/**
* 弹幕主题,只在自定义挂载时生效
*/
theme?: 'light' | 'dark';
};
type Danmuku = {
@@ -168,6 +185,21 @@ type Danmuku = {
*/
show: () => Danmuku;
/**
* 挂载弹幕输入框
*/
mount: (el?: Element) => void;
/**
* 重置弹幕
*/
reset: () => void;
/**
* 弹幕配置
*/
option: Option;
/**
* 是否隐藏弹幕层
*/
+4 -4
View File
@@ -1,9 +1,9 @@
import type Artplayer from 'artplayer';
import type SubtitlesOctopus from "@hrgui/libass-wasm-ts"
import { type Options } from "libass-wasm"
import type SubtitlesOctopus from '@hrgui/libass-wasm-ts';
import { type Options } from 'libass-wasm';
export = artplayerPluginAss
export as namespace artplayerPluginAss
export = artplayerPluginAss;
export as namespace artplayerPluginAss;
declare const artplayerPluginAss: (options: Options) => (art: Artplayer) => {
name: 'artplayerPluginLibass';