@byteplus/veplayer 1.20.1-rc.5 → 1.20.1-rc.7
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 +36 -6
- package/index.min.js +2 -2
- package/lite.cjs +2 -2
- package/lite.d.ts +12 -4
- 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/lite.d.ts
CHANGED
|
@@ -115,6 +115,11 @@ export type SubtitleEditorContext = {
|
|
|
115
115
|
totalCues: number;
|
|
116
116
|
containerBox: DOMRectReadOnly;
|
|
117
117
|
paddedOverlay: HTMLElement;
|
|
118
|
+
} | {
|
|
119
|
+
type: "cue-final";
|
|
120
|
+
cue: ISubtitleCue;
|
|
121
|
+
cueIndex: number;
|
|
122
|
+
totalCues: number;
|
|
118
123
|
} | {
|
|
119
124
|
type: "region";
|
|
120
125
|
regionContainer: HTMLElement;
|
|
@@ -129,12 +134,12 @@ export type SubtitleEditorContext = {
|
|
|
129
134
|
overlayEl: HTMLElement;
|
|
130
135
|
};
|
|
131
136
|
/** {zh}
|
|
132
|
-
* @brief WebVTT
|
|
133
|
-
* @notes cue 和 region 可直接改 DOM 或返回样式。style 返回对象按类名及属性合并,返回数组替换全部样式。
|
|
137
|
+
* @brief WebVTT 编辑回调。cue 和 cue-final 回调提供 styleBox。
|
|
138
|
+
* @notes cue、cue-final 和 region 可直接改 DOM 或返回样式。cue-final 的样式在 cue 阶段之后生效。style 返回对象按类名及属性合并,返回数组替换全部样式。
|
|
134
139
|
*/
|
|
135
140
|
/** {en}
|
|
136
|
-
* @brief WebVTT editor.
|
|
137
|
-
* @notes
|
|
141
|
+
* @brief WebVTT editor. The cue and cue-final callbacks receive a style box.
|
|
142
|
+
* @notes The cue, cue-final, and region callbacks may edit DOM or return styles. Cue-final styles apply after cue edits. Return an object from style to merge declarations by class, or an array to replace all styles.
|
|
138
143
|
*/
|
|
139
144
|
export type SubtitleEditor = (styleBox: ISubtitleStyleBox | undefined, context: SubtitleEditorContext) => ISubtitleCueStyle | SubtitleCss | SubtitleStyleBlock | readonly SubtitleStyleBlock[] | void;
|
|
140
145
|
interface ISubtitleStyle {
|
|
@@ -1619,6 +1624,9 @@ export interface LiteSubtitleConfig {
|
|
|
1619
1624
|
/** @deprecated Use style.cueBoxStyle and style.textStyle. */
|
|
1620
1625
|
subtitleStyleConfig?: ISubtitleStyleConfig;
|
|
1621
1626
|
subtitleEditor?: SubtitleEditor;
|
|
1627
|
+
/** {zh} @brief 启用布局后的 cue-final 字幕编辑回调,默认关闭。 */
|
|
1628
|
+
/** {en} @brief Enable the cue-final subtitle editor after layout. Defaults to false. */
|
|
1629
|
+
enableSubtitleCueFinal?: boolean;
|
|
1622
1630
|
defaultSubtitleId?: string | number;
|
|
1623
1631
|
defaultSubtitleLanguage?: string | number;
|
|
1624
1632
|
mode?: "external" | "native";
|