@volcengine/veplayer 1.20.1-rc.1 → 1.20.1-rc.2

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 CHANGED
@@ -531,10 +531,10 @@ export interface ISubtitleCueStyle extends ISubtitleStyleConfig {
531
531
  wrapperStyle?: SubtitleCss;
532
532
  }
533
533
  /** {zh}
534
- * @brief 可编辑的外层定位容器和背景框,文字位于 `.prism-cue-inner`。
534
+ * @brief 可编辑的外层定位容器和背景框,文字位于 `.veplayer-webvtt-cue-text`。
535
535
  */
536
536
  /** {en}
537
- * @brief Editable positioning wrapper and background box containing `.prism-cue-inner`.
537
+ * @brief Editable positioning wrapper and background box containing `.veplayer-webvtt-cue-text`.
538
538
  */
539
539
  export interface ISubtitleStyleBox {
540
540
  div: HTMLElement;
@@ -578,10 +578,10 @@ export interface ISubtitleRegion {
578
578
  readonly scroll: "" | "up";
579
579
  }
580
580
  /** {zh}
581
- * @brief 按类名索引的 WebVTT 样式块。`prism-cue-inner` 表示默认 `::cue`。
581
+ * @brief 按类名索引的 WebVTT 样式块。`veplayer-webvtt-cue-text` 表示默认 `::cue`。
582
582
  */
583
583
  /** {en}
584
- * @brief A WebVTT style block keyed by class name. `prism-cue-inner` represents the default `::cue`.
584
+ * @brief A WebVTT style block keyed by class name. `veplayer-webvtt-cue-text` represents the default `::cue`.
585
585
  */
586
586
  export declare type SubtitleStyleBlock = Readonly<Record<string, SubtitleCss>>;
587
587
  /** {zh}
@@ -700,6 +700,37 @@ export interface ISubtitleConfig {
700
700
  * ```
701
701
  */
702
702
  label?: ISubtitleLabelOptions;
703
+ /** {zh}
704
+ * @brief Master M3U8 字幕轨的默认选择条件。配置的条件需唯一匹配;`language` 对应字幕轨的 `LANGUAGE`,`name` 对应 `NAME`。
705
+ * @list Options
706
+ * @kind property
707
+ * @notes 仅在未配置非空 `Subtitle.list` 时生效。未匹配或匹配到多条轨道时,回退到 Master M3U8 的默认轨;没有默认轨时回退到第一条。
708
+ * @example
709
+ * ``` javascript
710
+ * Subtitle: {
711
+ * defaultSubtitle: { language: 'zh' }
712
+ * }
713
+ * ```
714
+ */
715
+ /** {en}
716
+ * @brief Selection criteria for the default subtitle track in a Master M3U8. The criteria must match one track; `language` matches the track's `LANGUAGE` and `name` matches its `NAME`.
717
+ * @list Options
718
+ * @kind property
719
+ * @notes Applies only when `Subtitle.list` is not configured with a non-empty list. If no track or multiple tracks match, falls back to the Master M3U8 default track, then the first track.
720
+ * @example
721
+ * ``` javascript
722
+ * Subtitle: {
723
+ * defaultSubtitle: { language: 'zh' }
724
+ * }
725
+ * ```
726
+ */
727
+ defaultSubtitle?: {
728
+ language: string | number;
729
+ name?: string;
730
+ } | {
731
+ language?: string | number;
732
+ name: string;
733
+ };
703
734
  /** {zh}
704
735
  * @brief 是否默认打开字幕。
705
736
  * @default true