@volcengine/veplayer 1.20.1-rc.1 → 1.20.1-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +0 -175
- package/index.min.js +2 -2
- package/lite.cjs +2 -2
- package/lite.d.ts +0 -292
- package/lite.esm.mjs +2 -2
- package/lite.min.js +2 -2
- package/package.json +1 -1
- package/plugin/modules/DashAbralgo.mjs +1 -1
- package/plugin/modules/XGVideo.mjs +1 -1
- package/plugin/modules/danmuMask.mjs +1 -1
- package/plugin/modules/danmujs.mjs +1 -1
- package/plugin/modules/dash.mjs +1 -1
- package/plugin/modules/flv.mjs +1 -1
- package/plugin/modules/hls.mjs +1 -1
- package/plugin/modules/hlsEncrypt.mjs +1 -1
- package/plugin/modules/hlsjs.mjs +1 -1
- package/plugin/modules/hlsjsPro.mjs +1 -1
- package/plugin/modules/mp4Encrypt.mjs +1 -1
- package/plugin/modules/preloader.mjs +1 -1
- package/plugin/modules/streamprobe.mjs +1 -1
- package/plugin/modules/vestrategy.mjs +1 -1
- package/plugin/modules/vestrategy_adapt_range.mjs +1 -1
- package/plugin/modules/vestrategy_h265.mjs +1 -1
- package/plugin/modules/vestrategy_preload.mjs +1 -1
package/index.d.ts
CHANGED
|
@@ -504,121 +504,6 @@ export interface ExternalItem {
|
|
|
504
504
|
value: boolean;
|
|
505
505
|
lang?: Lang;
|
|
506
506
|
}
|
|
507
|
-
/** {zh}
|
|
508
|
-
* @brief CSS 声明,支持驼峰、短横线属性名和 CSS 自定义属性。长度应包含单位。
|
|
509
|
-
*/
|
|
510
|
-
/** {en}
|
|
511
|
-
* @brief CSS declarations accepting camelCase, hyphenated names, and custom properties. Include units for lengths.
|
|
512
|
-
*/
|
|
513
|
-
export declare type SubtitleCss = Readonly<Record<string, string | number>>;
|
|
514
|
-
/** {zh}
|
|
515
|
-
* @brief 字幕背景框和文字的统一样式。
|
|
516
|
-
*/
|
|
517
|
-
/** {en}
|
|
518
|
-
* @brief Shared styles for the subtitle background box and text.
|
|
519
|
-
*/
|
|
520
|
-
export interface ISubtitleStyleConfig {
|
|
521
|
-
cueBoxStyle?: SubtitleCss;
|
|
522
|
-
textStyle?: SubtitleCss;
|
|
523
|
-
}
|
|
524
|
-
/** {zh}
|
|
525
|
-
* @brief 单条字幕的样式,可覆盖全局配置。
|
|
526
|
-
*/
|
|
527
|
-
/** {en}
|
|
528
|
-
* @brief Styles for a single cue, overriding shared configuration.
|
|
529
|
-
*/
|
|
530
|
-
export interface ISubtitleCueStyle extends ISubtitleStyleConfig {
|
|
531
|
-
wrapperStyle?: SubtitleCss;
|
|
532
|
-
}
|
|
533
|
-
/** {zh}
|
|
534
|
-
* @brief 可编辑的外层定位容器和背景框,文字位于 `.prism-cue-inner`。
|
|
535
|
-
*/
|
|
536
|
-
/** {en}
|
|
537
|
-
* @brief Editable positioning wrapper and background box containing `.prism-cue-inner`.
|
|
538
|
-
*/
|
|
539
|
-
export interface ISubtitleStyleBox {
|
|
540
|
-
div: HTMLElement;
|
|
541
|
-
cueDiv: HTMLElement;
|
|
542
|
-
}
|
|
543
|
-
/** {zh}
|
|
544
|
-
* @brief WebVTT 字幕及定位设置。起止时间以秒为单位。
|
|
545
|
-
*/
|
|
546
|
-
/** {en}
|
|
547
|
-
* @brief A WebVTT cue and its layout settings. Times are in seconds.
|
|
548
|
-
*/
|
|
549
|
-
export interface ISubtitleCue {
|
|
550
|
-
readonly id: string;
|
|
551
|
-
readonly text: string;
|
|
552
|
-
readonly classes: readonly string[];
|
|
553
|
-
readonly startTime: number;
|
|
554
|
-
readonly endTime: number;
|
|
555
|
-
readonly region_id?: string;
|
|
556
|
-
readonly line?: number;
|
|
557
|
-
readonly snapToLines: boolean;
|
|
558
|
-
readonly lineAlign?: "start" | "center" | "end";
|
|
559
|
-
readonly position?: number;
|
|
560
|
-
readonly positionAlign?: "line-left" | "center" | "line-right";
|
|
561
|
-
readonly size?: number;
|
|
562
|
-
readonly align: "start" | "center" | "end" | "left" | "right";
|
|
563
|
-
readonly vertical?: "rl" | "lr";
|
|
564
|
-
}
|
|
565
|
-
/** {zh}
|
|
566
|
-
* @brief WebVTT 区域的尺寸和锚点。
|
|
567
|
-
*/
|
|
568
|
-
/** {en}
|
|
569
|
-
* @brief WebVTT region dimensions and anchors.
|
|
570
|
-
*/
|
|
571
|
-
export interface ISubtitleRegion {
|
|
572
|
-
readonly width: number;
|
|
573
|
-
readonly lines: number;
|
|
574
|
-
readonly regionAnchorX: number;
|
|
575
|
-
readonly regionAnchorY: number;
|
|
576
|
-
readonly viewportAnchorX: number;
|
|
577
|
-
readonly viewportAnchorY: number;
|
|
578
|
-
readonly scroll: "" | "up";
|
|
579
|
-
}
|
|
580
|
-
/** {zh}
|
|
581
|
-
* @brief 按类名索引的 WebVTT 样式块。`prism-cue-inner` 表示默认 `::cue`。
|
|
582
|
-
*/
|
|
583
|
-
/** {en}
|
|
584
|
-
* @brief A WebVTT style block keyed by class name. `prism-cue-inner` represents the default `::cue`.
|
|
585
|
-
*/
|
|
586
|
-
export declare type SubtitleStyleBlock = Readonly<Record<string, SubtitleCss>>;
|
|
587
|
-
/** {zh}
|
|
588
|
-
* @brief 字幕编辑回调的上下文。索引和总数以当前渲染批次为准。
|
|
589
|
-
*/
|
|
590
|
-
/** {en}
|
|
591
|
-
* @brief Subtitle editor context. Cue indexes and counts refer to the current render batch.
|
|
592
|
-
*/
|
|
593
|
-
export declare type SubtitleEditorContext = {
|
|
594
|
-
type: "cue";
|
|
595
|
-
cue: ISubtitleCue;
|
|
596
|
-
cueIndex: number;
|
|
597
|
-
totalCues: number;
|
|
598
|
-
containerBox: DOMRectReadOnly;
|
|
599
|
-
paddedOverlay: HTMLElement;
|
|
600
|
-
} | {
|
|
601
|
-
type: "region";
|
|
602
|
-
regionContainer: HTMLElement;
|
|
603
|
-
regionData: Readonly<{
|
|
604
|
-
id: string;
|
|
605
|
-
region: ISubtitleRegion;
|
|
606
|
-
}>;
|
|
607
|
-
overlayEl: HTMLElement;
|
|
608
|
-
} | {
|
|
609
|
-
type: "style";
|
|
610
|
-
styles: readonly SubtitleStyleBlock[];
|
|
611
|
-
overlayEl: HTMLElement;
|
|
612
|
-
};
|
|
613
|
-
/** {zh}
|
|
614
|
-
* @brief WebVTT 编辑回调。仅 cue 回调提供 styleBox。
|
|
615
|
-
* @notes cue 和 region 可直接改 DOM 或返回样式。style 返回对象按类名及属性合并,返回数组替换全部样式。
|
|
616
|
-
*/
|
|
617
|
-
/** {en}
|
|
618
|
-
* @brief WebVTT editor. Only the cue callback receives a style box.
|
|
619
|
-
* @notes Cue and region callbacks may edit DOM or return styles. Return an object from style to merge declarations by class, or an array to replace all styles.
|
|
620
|
-
*/
|
|
621
|
-
export declare type SubtitleEditor = (styleBox: ISubtitleStyleBox | undefined, context: SubtitleEditorContext) => ISubtitleCueStyle | SubtitleCss | SubtitleStyleBlock | readonly SubtitleStyleBlock[] | void;
|
|
622
507
|
/** {zh}
|
|
623
508
|
* @brief 外挂字幕配置。
|
|
624
509
|
* @list Options
|
|
@@ -759,30 +644,6 @@ export interface ISubtitleConfig {
|
|
|
759
644
|
* @default -
|
|
760
645
|
*/
|
|
761
646
|
style?: ISubtitleStyle;
|
|
762
|
-
/** {zh}
|
|
763
|
-
* @brief 点播外挂 WebVTT 样式的兼容入口。
|
|
764
|
-
* @notes 按 CSS 属性与 style 合并,同名属性以 style 为准。空对象仍可启用 WebVTT 渲染。
|
|
765
|
-
* @deprecated 请使用 style.cueBoxStyle 和 style.textStyle。
|
|
766
|
-
*/
|
|
767
|
-
/** {en}
|
|
768
|
-
* @brief Compatibility option for external VOD WebVTT styles.
|
|
769
|
-
* @notes Merges with style by CSS property. Values in style take precedence. An empty object still enables WebVTT rendering.
|
|
770
|
-
* @deprecated Use style.cueBoxStyle and style.textStyle.
|
|
771
|
-
*/
|
|
772
|
-
subtitleStyleConfig?: ISubtitleStyleConfig;
|
|
773
|
-
/** {zh}
|
|
774
|
-
* @brief 编辑 WebVTT 字幕、区域和样式块。字幕编辑可覆盖全局样式。
|
|
775
|
-
* @example
|
|
776
|
-
* Subtitle: { subtitleEditor: (_, context) =>
|
|
777
|
-
* context.type === 'cue' ? { textStyle: { fontWeight: 'bold' } } : undefined }
|
|
778
|
-
*/
|
|
779
|
-
/** {en}
|
|
780
|
-
* @brief Edit WebVTT cues, regions, and style blocks. Cue edits can override shared styles.
|
|
781
|
-
* @example
|
|
782
|
-
* Subtitle: { subtitleEditor: (_, context) =>
|
|
783
|
-
* context.type === 'cue' ? { textStyle: { fontWeight: 'bold' } } : undefined }
|
|
784
|
-
*/
|
|
785
|
-
subtitleEditor?: SubtitleEditor;
|
|
786
647
|
}
|
|
787
648
|
/** {zh}
|
|
788
649
|
* @list Options
|
|
@@ -795,24 +656,6 @@ export interface ISubtitleConfig {
|
|
|
795
656
|
* @kind property
|
|
796
657
|
*/
|
|
797
658
|
export interface ISubtitleStyle {
|
|
798
|
-
/** {zh}
|
|
799
|
-
* @brief 点播外挂 WebVTT 字幕的背景框样式。传入空对象可启用 WebVTT 渲染。
|
|
800
|
-
* @example Subtitle: { style: { cueBoxStyle: { borderRadius: '8px' } } }
|
|
801
|
-
*/
|
|
802
|
-
/** {en}
|
|
803
|
-
* @brief Styles the external VOD WebVTT cue background box. An empty object enables WebVTT rendering.
|
|
804
|
-
* @example Subtitle: { style: { cueBoxStyle: { borderRadius: '8px' } } }
|
|
805
|
-
*/
|
|
806
|
-
cueBoxStyle?: SubtitleCss;
|
|
807
|
-
/** {zh}
|
|
808
|
-
* @brief 点播外挂 WebVTT 字幕的文字样式。传入空对象可启用 WebVTT 渲染。
|
|
809
|
-
* @example Subtitle: { style: { textStyle: { display: 'block', lineHeight: 'normal' } } }
|
|
810
|
-
*/
|
|
811
|
-
/** {en}
|
|
812
|
-
* @brief Styles external VOD WebVTT cue text. An empty object enables WebVTT rendering.
|
|
813
|
-
* @example Subtitle: { style: { textStyle: { display: 'block', lineHeight: 'normal' } } }
|
|
814
|
-
*/
|
|
815
|
-
textStyle?: SubtitleCss;
|
|
816
659
|
/** {zh}
|
|
817
660
|
* @brief 是否跟随控制栏调整位置。
|
|
818
661
|
* @default false
|
|
@@ -10711,20 +10554,6 @@ declare class NativeSubTitle extends EventEmitter {
|
|
|
10711
10554
|
refresh(): void;
|
|
10712
10555
|
setPlaybackSessionId(playbackSessionId: string): void;
|
|
10713
10556
|
}
|
|
10714
|
-
export interface HlsRuntimeLike {
|
|
10715
|
-
levels: Array<Record<string, unknown>>;
|
|
10716
|
-
subtitleTracks?: Array<Record<string, unknown>>;
|
|
10717
|
-
subtitleTrack?: number;
|
|
10718
|
-
subtitleDisplay?: boolean;
|
|
10719
|
-
currentLevel: number;
|
|
10720
|
-
loadLevel: number;
|
|
10721
|
-
nextLevel: number;
|
|
10722
|
-
manualLevel: number;
|
|
10723
|
-
autoLevelEnabled: boolean;
|
|
10724
|
-
autoLevelCapping: number;
|
|
10725
|
-
on(event: string, listener: (...args: any[]) => void): void;
|
|
10726
|
-
off(event: string, listener: (...args: any[]) => void): void;
|
|
10727
|
-
}
|
|
10728
10557
|
export interface IPanelItem {
|
|
10729
10558
|
showText: string;
|
|
10730
10559
|
selected: boolean;
|
|
@@ -10771,8 +10600,6 @@ export declare class Subtitle extends Plugin {
|
|
|
10771
10600
|
private _hideListTimer;
|
|
10772
10601
|
private _optionListEnterHandler?;
|
|
10773
10602
|
private _optionListLeaveHandler?;
|
|
10774
|
-
private webVttPlayback?;
|
|
10775
|
-
private webVttHls?;
|
|
10776
10603
|
private _runtimeSubtitleSource;
|
|
10777
10604
|
private _runtimeSubtitleBridge?;
|
|
10778
10605
|
afterCreate(): void;
|
|
@@ -10806,8 +10633,6 @@ export declare class Subtitle extends Plugin {
|
|
|
10806
10633
|
openSubtitle(): Promise<any>;
|
|
10807
10634
|
getSubTitleIndex(list: ISubTitleItem[], subtitle?: Pick<ISubTitleItem, "id" | "language">): number;
|
|
10808
10635
|
setRuntimeSubtitleSource(source: "config" | "hls"): void;
|
|
10809
|
-
/** @hidden Connect the custom renderer to the current hls.js instance. */
|
|
10810
|
-
setWebVttHls(hls?: HlsRuntimeLike): void;
|
|
10811
10636
|
setRuntimeSubtitleBridge(bridge?: {
|
|
10812
10637
|
switchSubtitle: (subtitle: {
|
|
10813
10638
|
id?: string | number;
|