@volcengine/veplayer 1.19.0-rc.1 → 1.19.0-rc.11

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
@@ -546,6 +546,45 @@ export interface ISubtitleConfig {
546
546
  * @default -
547
547
  */
548
548
  list?: Array<ISubTitleItem>;
549
+ /** {zh}
550
+ * @brief 字幕选择项的多语言映射与自定义格式化配置。
551
+ * @notes 同时作用于业务配置字幕、Vid/PlayAuth 或短剧自动字幕,以及 Master M3U8 字幕。仅改变 VePlayer 字幕菜单文案,不改变字幕 ID、切换和渲染行为。iOS 系统字幕菜单不受此配置影响。
552
+ * @default -
553
+ * @example
554
+ * ``` javascript
555
+ * Subtitle: {
556
+ * label: {
557
+ * map: {
558
+ * language: {
559
+ * en: { textKey: 'SUBTITLE_EN', text: 'English' }
560
+ * }
561
+ * },
562
+ * formatter: ({ defaultLabel, item }) =>
563
+ * item.forced ? `${defaultLabel} · Forced` : defaultLabel
564
+ * }
565
+ * }
566
+ * ```
567
+ */
568
+ /** {en}
569
+ * @brief Localization mapping and custom formatter for subtitle option labels.
570
+ * @notes Applies to business-configured subtitles, Vid/PlayAuth or short-drama automatic subtitles, and Master M3U8 subtitles. It only changes labels in VePlayer subtitle menus; subtitle IDs, switching, and rendering are unchanged. The iOS system subtitle menu is not affected.
571
+ * @default -
572
+ * @example
573
+ * ``` javascript
574
+ * Subtitle: {
575
+ * label: {
576
+ * map: {
577
+ * language: {
578
+ * en: { textKey: 'SUBTITLE_EN', text: 'English' }
579
+ * }
580
+ * },
581
+ * formatter: ({ defaultLabel, item }) =>
582
+ * item.forced ? `${defaultLabel} · Forced` : defaultLabel
583
+ * }
584
+ * }
585
+ * ```
586
+ */
587
+ label?: ISubtitleLabelOptions;
549
588
  /** {zh}
550
589
  * @brief 是否默认打开字幕。
551
590
  * @default true
@@ -844,7 +883,7 @@ export interface ISubTitleItem {
844
883
  * @brief Subtitle display name.
845
884
  * @default -
846
885
  */
847
- text?: string;
886
+ text?: ISubtitleLabelValue;
848
887
  /** {zh}
849
888
  * @brief 字幕名称。兼容 xgplayer-subtitles 的 label 字段。
850
889
  * @default -
@@ -853,7 +892,7 @@ export interface ISubTitleItem {
853
892
  * @brief 字幕名称。兼容 xgplayer-subtitles 的 label 字段。
854
893
  * @default -
855
894
  */
856
- label?: string | number;
895
+ label?: ISubtitleLabelValue;
857
896
  /** {zh}
858
897
  * @brief 外挂字幕 URL 地址。
859
898
  * @default -
@@ -883,6 +922,118 @@ export interface ISubTitleItem {
883
922
  */
884
923
  list?: IListItem[];
885
924
  }
925
+ /** {zh}
926
+ * @brief 字幕项名称,可为静态文案或按播放器语言配置的文案表。
927
+ * @detail ref
928
+ */
929
+ /** {en}
930
+ * @brief Subtitle item name as static text or a text map keyed by player language.
931
+ * @detail ref
932
+ */
933
+ export declare type ISubtitleLabelValue = string | number | Record<string, string | number>;
934
+ /** {zh}
935
+ * @brief 字幕标签映射项。
936
+ * @detail ref
937
+ */
938
+ /** {en}
939
+ * @brief Mapping item used to customize a subtitle label.
940
+ * @detail ref
941
+ */
942
+ export interface ISubtitleLabelItem {
943
+ /** {zh} @brief 多语言 key 无法解析时使用的回退文案。 */
944
+ /** {en} @brief Fallback text used when the i18n key cannot be resolved. */
945
+ text?: string;
946
+ /** {zh} @brief 从播放器当前多语言词典中读取文案的 key。 */
947
+ /** {en} @brief Key resolved from the player's active i18n dictionary. */
948
+ textKey?: string;
949
+ }
950
+ /** {zh}
951
+ * @brief 字幕标签映射表。匹配优先级为 `id`、完整 `language`、基础 `language`、原始 `text`。
952
+ * @detail ref
953
+ */
954
+ /** {en}
955
+ * @brief Subtitle label maps. Match order is `id`, full `language`, base `language`, then source `text`.
956
+ * @detail ref
957
+ */
958
+ export interface ISubtitleLabelMap {
959
+ /** {zh} @brief 按稳定字幕 ID 映射;不建议用于会话内生成 ID 的 Master M3U8 字幕。 */
960
+ /** {en} @brief Maps stable subtitle IDs; not recommended for session-scoped Master M3U8 IDs. */
961
+ id?: Record<string, ISubtitleLabelItem>;
962
+ /** {zh} @brief 按字幕语言映射,忽略大小写并兼容 `_` 与 `-`。 */
963
+ /** {en} @brief Maps subtitle languages case-insensitively, treating `_` and `-` as equivalent. */
964
+ language?: Record<string, ISubtitleLabelItem>;
965
+ /** {zh} @brief 按字幕原始名称映射。 */
966
+ /** {en} @brief Maps the source subtitle name. */
967
+ text?: Record<string, ISubtitleLabelItem>;
968
+ }
969
+ /** {zh}
970
+ * @brief 传给字幕标签 formatter 的只读安全字幕快照,不包含 URL 或字幕内容。
971
+ * @detail ref
972
+ */
973
+ /** {en}
974
+ * @brief Read-only safe subtitle snapshot passed to the label formatter, excluding URLs and subtitle content.
975
+ * @detail ref
976
+ */
977
+ export interface ISubtitleLabelTrack {
978
+ source?: "config" | "hls";
979
+ id?: string | number;
980
+ language?: string | number;
981
+ isDefault?: boolean;
982
+ forced?: boolean;
983
+ characteristics?: string;
984
+ text?: string | number;
985
+ label?: string | number;
986
+ }
987
+ /** {zh}
988
+ * @brief 字幕标签格式化上下文。
989
+ * @detail ref
990
+ */
991
+ /** {en}
992
+ * @brief Context passed to the subtitle label formatter.
993
+ * @detail ref
994
+ */
995
+ export interface ISubtitleLabelContext {
996
+ /** {zh} @brief 当前字幕项的只读安全快照。 */
997
+ /** {en} @brief Read-only safe snapshot of the current subtitle item. */
998
+ item: Readonly<ISubtitleLabelTrack>;
999
+ /** {zh} @brief 当前字幕列表的只读安全快照。 */
1000
+ /** {en} @brief Read-only safe snapshots of the current subtitle list. */
1001
+ items: ReadonlyArray<Readonly<ISubtitleLabelTrack>>;
1002
+ /** {zh} @brief 当前字幕项在列表中的位置。 */
1003
+ /** {en} @brief Position of the current subtitle item in the list. */
1004
+ index: number;
1005
+ /** {zh} @brief 应用标签映射前的原始回退文案。 */
1006
+ /** {en} @brief Source fallback text before applying label mappings. */
1007
+ canonicalLabel: string;
1008
+ /** {zh} @brief 应用 `textKey` 或 `text` 后的文案。 */
1009
+ /** {en} @brief Label after applying `textKey` or `text`. */
1010
+ localizedLabel: string;
1011
+ /** {zh} @brief formatter 返回空值或抛出异常时使用的文案。 */
1012
+ /** {en} @brief Label used when the formatter returns an empty value or throws. */
1013
+ defaultLabel: string;
1014
+ /** {zh} @brief 播放器当前语言。 */
1015
+ /** {en} @brief Current player language. */
1016
+ lang: string;
1017
+ /** {zh} @brief 本地化后的文案是否在当前字幕列表中重复。 */
1018
+ /** {en} @brief Whether the localized label is duplicated in the current subtitle list. */
1019
+ duplicated: boolean;
1020
+ }
1021
+ /** {zh}
1022
+ * @brief 字幕标签多语言映射与自定义格式化配置。
1023
+ * @detail ref
1024
+ */
1025
+ /** {en}
1026
+ * @brief Localization mapping and custom formatter for subtitle labels.
1027
+ * @detail ref
1028
+ */
1029
+ export interface ISubtitleLabelOptions {
1030
+ /** {zh} @brief 按字幕 ID、语言或原始名称配置展示文案。 */
1031
+ /** {en} @brief Display-label mappings keyed by subtitle ID, language, or source name. */
1032
+ map?: ISubtitleLabelMap;
1033
+ /** {zh} @brief 同步格式化最终标签;返回空值、Promise 或抛出异常时回退到 `defaultLabel`。 */
1034
+ /** {en} @brief Synchronously formats the final label; empty values, Promises, or exceptions fall back to `defaultLabel`. */
1035
+ formatter?: (context: ISubtitleLabelContext) => string | null | undefined;
1036
+ }
886
1037
  export declare type IAutoSubtitleSourceItem = Record<string, any> | string;
887
1038
  export declare type IAutoSubtitleFormatterResult = string | number | boolean | null | undefined | {
888
1039
  label?: string | number;
@@ -3671,6 +3822,92 @@ export interface IHlsLevel {
3671
3822
  /** {en} @brief Level name declared by the manifest. */
3672
3823
  name?: string;
3673
3824
  }
3825
+ /** {zh}
3826
+ * @brief HLS Level 标签映射项。
3827
+ * @detail ref
3828
+ */
3829
+ /** {en}
3830
+ * @brief Mapping item used to customize an HLS Level label.
3831
+ * @detail ref
3832
+ */
3833
+ export interface IHlsLevelLabelItem {
3834
+ /** {zh} @brief 当多语言 key 无法解析时使用的回退文案。 */
3835
+ /** {en} @brief Fallback text used when the i18n key cannot be resolved. */
3836
+ text?: string;
3837
+ /** {zh} @brief 从播放器当前多语言词典中读取文案的 key。 */
3838
+ /** {en} @brief Key resolved from the player's active i18n dictionary. */
3839
+ textKey?: string;
3840
+ }
3841
+ /** {zh}
3842
+ * @brief HLS Level 标签格式化上下文。
3843
+ * @detail ref
3844
+ */
3845
+ /** {en}
3846
+ * @brief Context passed to the HLS Level label formatter.
3847
+ * @detail ref
3848
+ */
3849
+ export interface IHlsLevelLabelContext {
3850
+ /** {zh} @brief 当前 Level 的只读安全快照。 */
3851
+ /** {en} @brief Read-only safe snapshot of the current Level. */
3852
+ level: Readonly<IHlsLevel>;
3853
+ /** {zh} @brief 当前播放会话全部 Level 的只读安全快照。 */
3854
+ /** {en} @brief Read-only safe snapshots of all Levels in the current playback session. */
3855
+ levels: ReadonlyArray<Readonly<IHlsLevel>>;
3856
+ /** {zh} @brief 视频短边像素值;Manifest 未提供分辨率时为空。 */
3857
+ /** {en} @brief Video short edge in pixels, or undefined when dimensions are unavailable. */
3858
+ shortEdge?: number;
3859
+ /** {zh} @brief 未本地化、未消歧的标准标签。 */
3860
+ /** {en} @brief Canonical label before localization and disambiguation. */
3861
+ canonicalLabel: string;
3862
+ /** {zh} @brief 应用 `textKey` 或 `text` 后的基础标签。 */
3863
+ /** {en} @brief Base label after applying `textKey` or `text`. */
3864
+ localizedLabel: string;
3865
+ /** {zh} @brief 完成 SDK 默认重名消歧后的标签。 */
3866
+ /** {en} @brief Label after the SDK's default duplicate disambiguation. */
3867
+ defaultLabel: string;
3868
+ /** {zh} @brief 播放器当前语言。 */
3869
+ /** {en} @brief Current player language. */
3870
+ lang: string;
3871
+ /** {zh} @brief 当前标准标签是否在 Level 列表中重复。 */
3872
+ /** {en} @brief Whether the canonical label is duplicated in the Level list. */
3873
+ duplicated: boolean;
3874
+ }
3875
+ /** {zh}
3876
+ * @brief HLS Level 标签的多语言映射与自定义格式化配置。
3877
+ * @detail ref
3878
+ * @example
3879
+ * ``` javascript
3880
+ * hlsLevelLabel: {
3881
+ * map: {
3882
+ * '720p': { textKey: 'HLS_LEVEL_HD', text: '720p' }
3883
+ * },
3884
+ * formatter: ({ defaultLabel, level }) =>
3885
+ * level.videoRange === 'PQ' ? `${defaultLabel} HDR` : defaultLabel
3886
+ * }
3887
+ * ```
3888
+ */
3889
+ /** {en}
3890
+ * @brief Localization mapping and custom formatter for HLS Level labels.
3891
+ * @detail ref
3892
+ * @example
3893
+ * ``` javascript
3894
+ * hlsLevelLabel: {
3895
+ * map: {
3896
+ * '720p': { textKey: 'HLS_LEVEL_HD', text: '720p' }
3897
+ * },
3898
+ * formatter: ({ defaultLabel, level }) =>
3899
+ * level.videoRange === 'PQ' ? `${defaultLabel} HDR` : defaultLabel
3900
+ * }
3901
+ * ```
3902
+ */
3903
+ export interface IHlsLevelLabelOptions {
3904
+ /** {zh} @brief 按标准标签(如 `720p`、`1080p`)配置展示文案。 */
3905
+ /** {en} @brief Display-label mappings keyed by canonical labels such as `720p` and `1080p`. */
3906
+ map?: Record<string, IHlsLevelLabelItem>;
3907
+ /** {zh} @brief 同步格式化最终标签;返回空值或抛出异常时回退到 `defaultLabel`。 */
3908
+ /** {en} @brief Synchronously formats the final label; empty returns or exceptions fall back to `defaultLabel`. */
3909
+ formatter?: (context: IHlsLevelLabelContext) => string | null | undefined;
3910
+ }
3674
3911
  /** {zh}
3675
3912
  * @brief 当前播放会话的 HLS Level 状态快照。
3676
3913
  * @detail ref
@@ -5136,6 +5373,51 @@ export interface IPlayerConfig extends IPlayerOptions {
5136
5373
  * ```
5137
5374
  */
5138
5375
  hlsLevelSwitchMode?: HlsLevelSwitchMode;
5376
+ /** {zh}
5377
+ * @brief Master M3U8 的 HLS Level 标签多语言映射与自定义格式化配置。
5378
+ * @notes 仅影响内置清晰度插件的展示文案,不改变 Level 索引、切档行为或 ABR 决策。映射 key 为视频短边生成的标准标签,例如 `720p`、`1080p`。
5379
+ * @default -
5380
+ * @example
5381
+ * ``` javascript
5382
+ * const playerSdkIns = new VePlayer({
5383
+ * lang: 'zh',
5384
+ * languages: {
5385
+ * zh: { HLS_LEVEL_HD: '高清' },
5386
+ * en: { HLS_LEVEL_HD: 'HD' }
5387
+ * },
5388
+ * hlsLevelLabel: {
5389
+ * map: {
5390
+ * '720p': { textKey: 'HLS_LEVEL_HD', text: '720p' }
5391
+ * },
5392
+ * formatter: ({ defaultLabel, level }) =>
5393
+ * level.videoRange === 'PQ' ? `${defaultLabel} HDR` : defaultLabel
5394
+ * }
5395
+ * });
5396
+ * ```
5397
+ */
5398
+ /** {en}
5399
+ * @brief Localization mapping and custom formatter for Master M3U8 HLS Level labels.
5400
+ * @notes Only changes labels rendered by the built-in quality plugin. It does not change Level indices, switching behavior, or ABR decisions. Mapping keys are canonical short-edge labels such as `720p` and `1080p`.
5401
+ * @default -
5402
+ * @example
5403
+ * ``` javascript
5404
+ * const playerSdkIns = new VePlayer({
5405
+ * lang: 'en',
5406
+ * languages: {
5407
+ * zh: { HLS_LEVEL_HD: '高清' },
5408
+ * en: { HLS_LEVEL_HD: 'HD' }
5409
+ * },
5410
+ * hlsLevelLabel: {
5411
+ * map: {
5412
+ * '720p': { textKey: 'HLS_LEVEL_HD', text: '720p' }
5413
+ * },
5414
+ * formatter: ({ defaultLabel, level }) =>
5415
+ * level.videoRange === 'PQ' ? `${defaultLabel} HDR` : defaultLabel
5416
+ * }
5417
+ * });
5418
+ * ```
5419
+ */
5420
+ hlsLevelLabel?: IHlsLevelLabelOptions;
5139
5421
  /** {zh}
5140
5422
  * @brief 是否启用 {@link https://hlsjs.video-dev.org/ hls.js} 插件播放HLS视频,默认为true,设置为false后,PC端播放HLS使用自研hls插件播放HLS视频
5141
5423
  * @default true
@@ -6908,6 +7190,7 @@ declare class AuthToken extends SdkPlugin {
6908
7190
  beforePlayerCreate(): Promise<void>;
6909
7191
  getVideoInfo(sourceConfigs?: IPlayerConfig): Promise<{
6910
7192
  vid: string;
7193
+ __mediaInfoCacheHit: boolean;
6911
7194
  playList: Stream[];
6912
7195
  codec: ICodecType;
6913
7196
  defaultDefinition: string;
@@ -7086,7 +7369,7 @@ export interface ISubTitleItem {
7086
7369
  * @brief Subtitle display name.
7087
7370
  * @default -
7088
7371
  */
7089
- text?: string;
7372
+ text?: ISubtitleLabelValue;
7090
7373
  /** {zh}
7091
7374
  * @brief 字幕名称。兼容 xgplayer-subtitles 的 label 字段。
7092
7375
  * @default -
@@ -7095,7 +7378,7 @@ export interface ISubTitleItem {
7095
7378
  * @brief 字幕名称。兼容 xgplayer-subtitles 的 label 字段。
7096
7379
  * @default -
7097
7380
  */
7098
- label?: string | number;
7381
+ label?: ISubtitleLabelValue;
7099
7382
  /** {zh}
7100
7383
  * @brief 外挂字幕 URL 地址。
7101
7384
  * @default -
@@ -7125,6 +7408,15 @@ export interface ISubTitleItem {
7125
7408
  */
7126
7409
  list?: IListItem[];
7127
7410
  }
7411
+ /** {zh}
7412
+ * @brief 字幕项名称,可为静态文案或按播放器语言配置的文案表。
7413
+ * @detail ref
7414
+ */
7415
+ /** {en}
7416
+ * @brief Subtitle item name as static text or a text map keyed by player language.
7417
+ * @detail ref
7418
+ */
7419
+ export type ISubtitleLabelValue = string | number | Record<string, string | number>;
7128
7420
  /** {zh}
7129
7421
  * @brief 字幕内容项。
7130
7422
  * @list Options
@@ -9954,6 +10246,7 @@ export declare class Subtitle extends Plugin {
9954
10246
  "zh-hk": string;
9955
10247
  };
9956
10248
  };
10249
+ updateLang(lang: string): void;
9957
10250
  creatOptionList(): void;
9958
10251
  getList(): any;
9959
10252
  renderOptionList(): void;
@@ -10422,348 +10715,55 @@ export declare const Events: {
10422
10715
  * @brief Triggered when mirror mode is enabled.
10423
10716
  */
10424
10717
  MIRROR_CHANGE: string;
10425
- /** {zh}
10426
- * @brief 播放器实例创建完成时触发。
10427
- */
10428
- /** {en}
10429
- * @brief Triggered when the player instance is created.
10430
- */
10431
- READY: string;
10432
- /** {zh}
10433
- * @brief 播放器创建 `video` 完成时触发,表示可以开始播放。
10434
- */
10435
- /** {en}
10436
- * @brief Triggered when the player has created the `video` element and playback can start.
10437
- */
10438
- COMPLETE: string;
10439
- /** {zh}
10440
- * @brief 播放资源发生变化。
10441
- */
10442
- /** {en}
10443
- * @brief Triggered when the playback resource changes.
10444
- */
10445
- URL_CHANGE: string;
10446
- /** {zh}
10447
- * @brief 播放器聚焦,同时会展示 Control 栏控件,包含播放按钮、进度条等。
10448
- */
10449
- /** {en}
10450
- * @brief Triggered when the player gains focus; the control bar is shown.
10451
- */
10452
- PLAYER_FOCUS: string;
10453
- /** {zh}
10454
- * @brief 播放器失焦,同时会隐藏 Control 栏控件,包含播放按钮、进度条等。
10455
- */
10456
- /** {en}
10457
- * @brief Triggered when the player loses focus; the control bar is hidden.
10458
- */
10459
- PLAYER_BLUR: string;
10460
- /** {zh}
10461
- * @brief 系统全屏状态切换。
10462
- */
10463
- /** {en}
10464
- * @brief Triggered when native fullscreen state changes.
10465
- */
10466
- FULLSCREEN_CHANGE: string;
10467
- /** {zh}
10468
- * @brief 网页全屏状态切换。
10469
- */
10470
- /** {en}
10471
- * @brief Triggered when CSS fullscreen state changes.
10472
- */
10473
- CSS_FULLSCREEN_CHANGE: string;
10474
- /** {zh}
10475
- * @brief 画中画模式切换。
10476
- */
10477
- /** {en}
10478
- * @brief Triggered when mini player (floating) mode changes.
10479
- */
10480
- MINI_STATE_CHANGE: string;
10481
- /** {zh}
10482
- * @brief 播放器销毁。
10483
- */
10484
- /** {en}
10485
- * @brief Triggered when the player is destroyed.
10486
- */
10487
- DESTROY: string;
10488
- /** {zh}
10489
- * @brief 播放器重新播放。
10490
- */
10491
- /** {en}
10492
- * @brief Triggered when replay starts.
10493
- */
10494
- REPLAY: string;
10495
- /** {zh}
10496
- * @brief 播放器重试。
10497
- */
10498
- /** {en}
10499
- * @brief Triggered when the player retries playback.
10500
- */
10501
- RETRY: string;
10502
- /** {zh}
10503
- * @brief 清晰度发生变化
10504
- */
10505
- /** {en}
10506
- * @brief Triggered when the definition (resolution) changes.
10507
- */
10508
- DEFINITION_CHANGE: string;
10509
- /** {zh}
10510
- * @hidden
10511
- */
10512
- /** {en}
10513
- * @hidden
10514
- */
10515
- Before_DEFINITION_CHANGE: string;
10516
- /** {zh}
10517
- * @hidden
10518
- */
10519
- /** {en}
10520
- * @hidden
10521
- */
10522
- AFTER_DEFINITION_CHANGE: string;
10523
- /** {zh}
10524
- * @brief 播放器容器尺寸发生变化。
10525
- */
10526
- /** {en}
10527
- * @brief Triggered when the player container size changes.
10528
- */
10529
- VIDEO_RESIZE: string;
10530
- /** {zh}
10531
- * @brief 画中画状态切换。
10532
- */
10533
- /** {en}
10534
- * @brief Triggered when Picture-in-Picture state changes.
10535
- */
10536
- PIP_CHANGE: string;
10537
- /** {zh}
10538
- * @brief 播放器发生旋转。
10539
- */
10540
- /** {en}
10541
- * @brief Triggered when the player is rotated.
10542
- */
10543
- ROTATE: string;
10544
- /** {zh}
10545
- * @brief 播放器内置快捷键事件被触发。
10546
- */
10547
- /** {en}
10548
- * @brief Triggered when a built-in keyboard shortcut is used.
10549
- */
10550
- SHORTCUT: string;
10551
- /** {zh}
10552
- * @deprecated
10553
- * @brief (已废弃)SEI 信息解析。
10554
- */
10555
- /** {en}
10556
- * @deprecated
10557
- * @brief (Deprecated) SEI information parsing.
10558
- */
10559
- SEI_PARSED: string;
10560
- /** {zh}
10561
- * @brief 内置插件用户行为触发。所有内置插件用户行为交互都会下发该事件,可用于用户行为埋点。
10562
- */
10563
- /** {en}
10564
- * @brief Triggered when user actions within plugins are performed. All plugin user actions will trigger this event, which can be used for user behavior tracking.
10565
- */
10566
- USER_ACTION: string;
10567
- /** {zh}
10568
- * @brief 自动播放成功时触发。
10569
- */
10570
- /** {en}
10571
- * @brief Triggered when autoplay succeeds.
10572
- */
10573
- AUTOPLAY_STARTED: string;
10574
- /** {zh}
10575
- * @brief 自动播放失败时触发。
10576
- */
10577
- /** {en}
10578
- * @brief Triggered when autoplay fails.
10579
- */
10580
- AUTOPLAY_PREVENTED: string;
10581
- /** {zh}
10582
- * @brief 播放器准备创建。
10583
- */
10584
- READY_CREATE_PLAYER: string;
10585
- /** {zh}
10586
- * @brief 播放器完成创建。
10587
- */
10588
- /** {en}
10589
- * @brief Triggered when player creation completes.
10590
- */
10591
- PLAYER_CREATED_FINISH: string;
10592
- /** {zh}
10593
- * @brief createPlayer 性能报告。与 `PLAYER_CREATED_FINISH` 几乎同时触发(略早)。
10594
- */
10595
- /** {en}
10596
- * @brief createPlayer performance report. Fired almost at the same time as `PLAYER_CREATED_FINISH` (slightly earlier).
10597
- */
10598
- CREATE_PLAYER_PERF: string;
10599
- /** {zh}
10600
- * @brief 播放器重建。
10601
- */
10602
- /** {en}
10603
- * @brief Triggered when the player is rebuilt.
10604
- */
10605
- PLAYER_REBUILD: string;
10606
- /** {zh}
10607
- * @brief 硬解不支持时触发。
10608
- */
10609
- /** {en}
10610
- * @brief Triggered when hardware decoding is not supported.
10611
- */
10612
- NOT_SUPPORT_HARDWARE_DECODER: string;
10613
- /** {zh}
10614
- * @brief 软解不支持时触发。
10615
- */
10616
- /** {en}
10617
- * @brief Triggered when software decoding is not supported.
10618
- */
10619
- NOT_SUPPORT_SOFT_DECODER: string;
10620
- /** {zh}
10621
- * @brief `playAuthToken` 过期。
10622
- */
10623
- /** {en}
10624
- * @brief Triggered when `playAuthToken` expires.
10625
- */
10626
- TOKEN_EXPIRED: string;
10627
- /** {zh}
10628
- * @brief UMD 加载失败。
10629
- */
10630
- /** {en}
10631
- * @brief Triggered when UMD loading fails.
10632
- */
10633
- UMD_LOAD_FAIL: string;
10634
- /** {zh}
10635
- * @brief 切换下一个视频。调用 `playNext` 后触发。
10636
- */
10637
- /** {en}
10638
- * @brief Triggered when switching to the next video, after calling `playNext`.
10639
- */
10640
- PLAYNEXT: string;
10641
- /** {zh}
10642
- * @brief 视频地址为空。
10643
- */
10644
- /** {en}
10645
- * @brief Triggered when the video URL is empty.
10646
- */
10647
- URL_NULL: string;
10648
- /** {zh}
10649
- * @brief 鼠标移出。
10650
- */
10651
- /** {en}
10652
- * @brief Triggered when the mouse leaves the player.
10653
- */
10654
- LEAVE_PLAYER: string;
10655
- /** {zh}
10656
- * @brief 鼠标移入。
10657
- */
10658
- /** {en}
10659
- * @brief Triggered when the mouse enters the player.
10660
- */
10661
- ENTER_PLAYER: string;
10662
- /** {zh}
10663
- * @brief 播放器状态重置。
10664
- */
10665
- /** {en}
10666
- * @brief Triggered when the player state is reset.
10667
- */
10668
- RESET: string;
10669
- /** {zh}
10670
- * @brief `<source>` 加载错误,表示 `<source>` 不支持或播放失败。
10671
- */
10672
- /** {en}
10673
- * @brief Triggered when a `<source>` fails to load (unsupported or playback failed).
10674
- */
10675
- SOURCE_ERROR: string;
10676
- /** {zh}
10677
- * @brief `<source>` 加载成功。
10678
- */
10679
- /** {en}
10680
- * @brief Triggered when a `<source>` loads successfully.
10681
- */
10682
- SOURCE_SUCCESS: string;
10683
- /** {zh}
10684
- * @brief license 提醒
10685
- */
10686
- /** {en}
10687
- * @brief License status warning.
10688
- */
10689
- LICENSE_STATUS_WARNING: string;
10690
- /** {zh}
10691
- * @brief HLS 音频轨道列表更新时触发。`data.audioTracks` 为完整轨道数组。
10692
- */
10693
- /** {en}
10694
- * @brief Triggered when the HLS audio track list updates. `data.audioTracks` is the full track array.
10695
- */
10696
- AUDIO_TRACKS_UPDATED: string;
10697
- /** {zh}
10698
- * @brief 音频轨道切换完成时触发。`data.id` 为新轨道 id,`data.audioTrack` 为完整轨道对象。
10699
- */
10700
- /** {en}
10701
- * @brief Triggered when audio track switching completes. `data.id` is the new track id; `data.audioTrack` is the full track object.
10702
- */
10703
- AUDIO_TRACK_CHANGE: string;
10704
- /** {zh}
10705
- * @brief 当前播放会话的 HLS Level 列表或状态更新。
10706
- */
10707
- /** {en}
10708
- * @brief Triggered when the HLS Level list or state updates for the current playback session.
10709
- */
10710
- HLS_LEVELS_UPDATED: string;
10711
- /** {zh}
10712
- * @brief HLS Level 切换请求已提交给播放内核;不表示画面已经切换。
10713
- */
10714
- /** {en}
10715
- * @brief Triggered after an HLS Level switch is submitted to the playback engine; the rendered Level may not have changed yet.
10716
- */
10717
- HLS_LEVEL_SWITCHING: string;
10718
- /** {zh}
10719
- * @brief HLS Level 已实际切换。
10720
- */
10721
- /** {en}
10722
- * @brief Triggered after the active HLS Level has actually switched.
10723
- */
10724
- HLS_LEVEL_SWITCHED: string;
10725
- /** {zh}
10726
- * @brief 当前播放会话的 HLS ABR 决策引擎解析完成。
10727
- */
10728
- /** {en}
10729
- * @brief Triggered after the HLS ABR decision engine is resolved for the current playback session.
10730
- */
10731
- HLS_ABR_ENGINE_RESOLVED: string;
10732
- /** {zh}
10733
- * @brief HLS ABR 的可用性、自动/手动模式或激活状态发生变化。
10734
- */
10735
- /** {en}
10736
- * @brief Triggered when HLS ABR availability, auto/manual mode, or active state changes.
10737
- */
10738
- HLS_ABR_STATE_CHANGE: string;
10739
- /** {zh}
10740
- * @brief HLS ABR 上限发生变化。
10741
- */
10742
- /** {en}
10743
- * @brief Triggered when the HLS ABR cap changes.
10744
- */
10745
- HLS_ABR_LIMIT_CHANGE: string;
10746
- /** {zh}
10747
- * @brief 当前播放会话从 Master M3U8 或原生 TextTrack 获得的字幕列表更新。
10748
- */
10749
- /** {en}
10750
- * @brief Triggered when the subtitle list sourced from a Master M3U8 or native TextTracks updates for the current playback session.
10751
- */
10752
- HLS_SUBTITLE_TRACKS_UPDATED: string;
10753
- /** {zh}
10754
- * @brief HLS 字幕轨切换请求已提交;不表示字幕轨已经生效。
10755
- */
10756
- /** {en}
10757
- * @brief Triggered after an HLS subtitle-track switch is submitted; the track may not be active yet.
10758
- */
10759
- HLS_SUBTITLE_TRACK_SWITCHING: string;
10760
- /** {zh}
10761
- * @brief HLS 字幕轨切换已经生效。
10762
- */
10763
- /** {en}
10764
- * @brief Triggered after an HLS subtitle-track switch takes effect.
10765
- */
10766
- HLS_SUBTITLE_TRACK_SWITCHED: string;
10718
+ READY: "ready";
10719
+ COMPLETE: "complete";
10720
+ URL_CHANGE: "urlchange";
10721
+ PLAYER_FOCUS: "focus";
10722
+ PLAYER_BLUR: "blur";
10723
+ FULLSCREEN_CHANGE: "fullscreen_change";
10724
+ CSS_FULLSCREEN_CHANGE: "cssFullscreen_change";
10725
+ MINI_STATE_CHANGE: "mini_state_change";
10726
+ DESTROY: "destroy";
10727
+ REPLAY: "replay";
10728
+ RETRY: "retry";
10729
+ DEFINITION_CHANGE: "definition_change";
10730
+ Before_DEFINITION_CHANGE: "before_definition_change";
10731
+ AFTER_DEFINITION_CHANGE: "after_definition_change";
10732
+ VIDEO_RESIZE: "video_resize";
10733
+ PIP_CHANGE: "pip_change";
10734
+ ROTATE: "rotate";
10735
+ SHORTCUT: "shortcut";
10736
+ SEI_PARSED: "SEI_PARSED";
10737
+ USER_ACTION: "user_action";
10738
+ AUTOPLAY_STARTED: "autoplay_started";
10739
+ AUTOPLAY_PREVENTED: "autoplay_was_prevented";
10740
+ READY_CREATE_PLAYER: "ready_create_player";
10741
+ PLAYER_CREATED_FINISH: "player_create_finish";
10742
+ CREATE_PLAYER_PERF: "create_player_perf";
10743
+ PLAYER_REBUILD: "player_rebuild";
10744
+ NOT_SUPPORT_HARDWARE_DECODER: "not_support_hardware_decoder";
10745
+ NOT_SUPPORT_SOFT_DECODER: "not_support_soft_decoder";
10746
+ TOKEN_EXPIRED: "playAuthToken_expired";
10747
+ UMD_LOAD_FAIL: "umd_load_fail";
10748
+ PLAYNEXT: "playnext";
10749
+ URL_NULL: "urlNull";
10750
+ LEAVE_PLAYER: "leaveplayer";
10751
+ ENTER_PLAYER: "enterplayer";
10752
+ RESET: "reset";
10753
+ SOURCE_ERROR: "source_error";
10754
+ SOURCE_SUCCESS: "source_success";
10755
+ LICENSE_STATUS_WARNING: "license_status_warning";
10756
+ AUDIO_TRACKS_UPDATED: "audio_tracks_updated";
10757
+ AUDIO_TRACK_CHANGE: "audio_track_change";
10758
+ HLS_LEVELS_UPDATED: "hls_levels_updated";
10759
+ HLS_LEVEL_SWITCHING: "hls_level_switching";
10760
+ HLS_LEVEL_SWITCHED: "hls_level_switched";
10761
+ HLS_ABR_ENGINE_RESOLVED: "hls_abr_engine_resolved";
10762
+ HLS_ABR_STATE_CHANGE: "hls_abr_state_change";
10763
+ HLS_ABR_LIMIT_CHANGE: "hls_abr_limit_change";
10764
+ HLS_SUBTITLE_TRACKS_UPDATED: "hls_subtitle_tracks_updated";
10765
+ HLS_SUBTITLE_TRACK_SWITCHING: "hls_subtitle_track_switching";
10766
+ HLS_SUBTITLE_TRACK_SWITCHED: "hls_subtitle_track_switched";
10767
10767
  /** {zh}
10768
10768
  * @brief 在播放被终止时触发。例如当播放中的视频重新开始播放。
10769
10769
  */
@@ -10936,126 +10936,126 @@ export declare const Event: {
10936
10936
  /** {en}
10937
10937
  * @brief Triggered when the player instance is created.
10938
10938
  */
10939
- READY: string;
10939
+ readonly READY: "ready";
10940
10940
  /** {zh}
10941
10941
  * @brief 播放器创建 `video` 完成时触发,表示可以开始播放。
10942
10942
  */
10943
10943
  /** {en}
10944
10944
  * @brief Triggered when the player has created the `video` element and playback can start.
10945
10945
  */
10946
- COMPLETE: string;
10946
+ readonly COMPLETE: "complete";
10947
10947
  /** {zh}
10948
10948
  * @brief 播放资源发生变化。
10949
10949
  */
10950
10950
  /** {en}
10951
10951
  * @brief Triggered when the playback resource changes.
10952
10952
  */
10953
- URL_CHANGE: string;
10953
+ readonly URL_CHANGE: "urlchange";
10954
10954
  /** {zh}
10955
10955
  * @brief 播放器聚焦,同时会展示 Control 栏控件,包含播放按钮、进度条等。
10956
10956
  */
10957
10957
  /** {en}
10958
10958
  * @brief Triggered when the player gains focus; the control bar is shown.
10959
10959
  */
10960
- PLAYER_FOCUS: string;
10960
+ readonly PLAYER_FOCUS: "focus";
10961
10961
  /** {zh}
10962
10962
  * @brief 播放器失焦,同时会隐藏 Control 栏控件,包含播放按钮、进度条等。
10963
10963
  */
10964
10964
  /** {en}
10965
10965
  * @brief Triggered when the player loses focus; the control bar is hidden.
10966
10966
  */
10967
- PLAYER_BLUR: string;
10967
+ readonly PLAYER_BLUR: "blur";
10968
10968
  /** {zh}
10969
10969
  * @brief 系统全屏状态切换。
10970
10970
  */
10971
10971
  /** {en}
10972
10972
  * @brief Triggered when native fullscreen state changes.
10973
10973
  */
10974
- FULLSCREEN_CHANGE: string;
10974
+ readonly FULLSCREEN_CHANGE: "fullscreen_change";
10975
10975
  /** {zh}
10976
10976
  * @brief 网页全屏状态切换。
10977
10977
  */
10978
10978
  /** {en}
10979
10979
  * @brief Triggered when CSS fullscreen state changes.
10980
10980
  */
10981
- CSS_FULLSCREEN_CHANGE: string;
10981
+ readonly CSS_FULLSCREEN_CHANGE: "cssFullscreen_change";
10982
10982
  /** {zh}
10983
10983
  * @brief 画中画模式切换。
10984
10984
  */
10985
10985
  /** {en}
10986
10986
  * @brief Triggered when mini player (floating) mode changes.
10987
10987
  */
10988
- MINI_STATE_CHANGE: string;
10988
+ readonly MINI_STATE_CHANGE: "mini_state_change";
10989
10989
  /** {zh}
10990
10990
  * @brief 播放器销毁。
10991
10991
  */
10992
10992
  /** {en}
10993
10993
  * @brief Triggered when the player is destroyed.
10994
10994
  */
10995
- DESTROY: string;
10995
+ readonly DESTROY: "destroy";
10996
10996
  /** {zh}
10997
10997
  * @brief 播放器重新播放。
10998
10998
  */
10999
10999
  /** {en}
11000
11000
  * @brief Triggered when replay starts.
11001
11001
  */
11002
- REPLAY: string;
11002
+ readonly REPLAY: "replay";
11003
11003
  /** {zh}
11004
11004
  * @brief 播放器重试。
11005
11005
  */
11006
11006
  /** {en}
11007
11007
  * @brief Triggered when the player retries playback.
11008
11008
  */
11009
- RETRY: string;
11009
+ readonly RETRY: "retry";
11010
11010
  /** {zh}
11011
11011
  * @brief 清晰度发生变化
11012
11012
  */
11013
11013
  /** {en}
11014
11014
  * @brief Triggered when the definition (resolution) changes.
11015
11015
  */
11016
- DEFINITION_CHANGE: string;
11016
+ readonly DEFINITION_CHANGE: "definition_change";
11017
11017
  /** {zh}
11018
11018
  * @hidden
11019
11019
  */
11020
11020
  /** {en}
11021
11021
  * @hidden
11022
11022
  */
11023
- Before_DEFINITION_CHANGE: string;
11023
+ readonly Before_DEFINITION_CHANGE: "before_definition_change";
11024
11024
  /** {zh}
11025
11025
  * @hidden
11026
11026
  */
11027
11027
  /** {en}
11028
11028
  * @hidden
11029
11029
  */
11030
- AFTER_DEFINITION_CHANGE: string;
11030
+ readonly AFTER_DEFINITION_CHANGE: "after_definition_change";
11031
11031
  /** {zh}
11032
11032
  * @brief 播放器容器尺寸发生变化。
11033
11033
  */
11034
11034
  /** {en}
11035
11035
  * @brief Triggered when the player container size changes.
11036
11036
  */
11037
- VIDEO_RESIZE: string;
11037
+ readonly VIDEO_RESIZE: "video_resize";
11038
11038
  /** {zh}
11039
11039
  * @brief 画中画状态切换。
11040
11040
  */
11041
11041
  /** {en}
11042
11042
  * @brief Triggered when Picture-in-Picture state changes.
11043
11043
  */
11044
- PIP_CHANGE: string;
11044
+ readonly PIP_CHANGE: "pip_change";
11045
11045
  /** {zh}
11046
11046
  * @brief 播放器发生旋转。
11047
11047
  */
11048
11048
  /** {en}
11049
11049
  * @brief Triggered when the player is rotated.
11050
11050
  */
11051
- ROTATE: string;
11051
+ readonly ROTATE: "rotate";
11052
11052
  /** {zh}
11053
11053
  * @brief 播放器内置快捷键事件被触发。
11054
11054
  */
11055
11055
  /** {en}
11056
11056
  * @brief Triggered when a built-in keyboard shortcut is used.
11057
11057
  */
11058
- SHORTCUT: string;
11058
+ readonly SHORTCUT: "shortcut";
11059
11059
  /** {zh}
11060
11060
  * @deprecated
11061
11061
  * @brief (已废弃)SEI 信息解析。
@@ -11064,214 +11064,214 @@ export declare const Event: {
11064
11064
  * @deprecated
11065
11065
  * @brief (Deprecated) SEI information parsing.
11066
11066
  */
11067
- SEI_PARSED: string;
11067
+ readonly SEI_PARSED: "SEI_PARSED";
11068
11068
  /** {zh}
11069
11069
  * @brief 内置插件用户行为触发。所有内置插件用户行为交互都会下发该事件,可用于用户行为埋点。
11070
11070
  */
11071
11071
  /** {en}
11072
11072
  * @brief Triggered when user actions within plugins are performed. All plugin user actions will trigger this event, which can be used for user behavior tracking.
11073
11073
  */
11074
- USER_ACTION: string;
11074
+ readonly USER_ACTION: "user_action";
11075
11075
  /** {zh}
11076
11076
  * @brief 自动播放成功时触发。
11077
11077
  */
11078
11078
  /** {en}
11079
11079
  * @brief Triggered when autoplay succeeds.
11080
11080
  */
11081
- AUTOPLAY_STARTED: string;
11081
+ readonly AUTOPLAY_STARTED: "autoplay_started";
11082
11082
  /** {zh}
11083
11083
  * @brief 自动播放失败时触发。
11084
11084
  */
11085
11085
  /** {en}
11086
11086
  * @brief Triggered when autoplay fails.
11087
11087
  */
11088
- AUTOPLAY_PREVENTED: string;
11088
+ readonly AUTOPLAY_PREVENTED: "autoplay_was_prevented";
11089
11089
  /** {zh}
11090
11090
  * @brief 播放器准备创建。
11091
11091
  */
11092
- READY_CREATE_PLAYER: string;
11092
+ readonly READY_CREATE_PLAYER: "ready_create_player";
11093
11093
  /** {zh}
11094
11094
  * @brief 播放器完成创建。
11095
11095
  */
11096
11096
  /** {en}
11097
11097
  * @brief Triggered when player creation completes.
11098
11098
  */
11099
- PLAYER_CREATED_FINISH: string;
11099
+ readonly PLAYER_CREATED_FINISH: "player_create_finish";
11100
11100
  /** {zh}
11101
11101
  * @brief createPlayer 性能报告。与 `PLAYER_CREATED_FINISH` 几乎同时触发(略早)。
11102
11102
  */
11103
11103
  /** {en}
11104
11104
  * @brief createPlayer performance report. Fired almost at the same time as `PLAYER_CREATED_FINISH` (slightly earlier).
11105
11105
  */
11106
- CREATE_PLAYER_PERF: string;
11106
+ readonly CREATE_PLAYER_PERF: "create_player_perf";
11107
11107
  /** {zh}
11108
11108
  * @brief 播放器重建。
11109
11109
  */
11110
11110
  /** {en}
11111
11111
  * @brief Triggered when the player is rebuilt.
11112
11112
  */
11113
- PLAYER_REBUILD: string;
11113
+ readonly PLAYER_REBUILD: "player_rebuild";
11114
11114
  /** {zh}
11115
11115
  * @brief 硬解不支持时触发。
11116
11116
  */
11117
11117
  /** {en}
11118
11118
  * @brief Triggered when hardware decoding is not supported.
11119
11119
  */
11120
- NOT_SUPPORT_HARDWARE_DECODER: string;
11120
+ readonly NOT_SUPPORT_HARDWARE_DECODER: "not_support_hardware_decoder";
11121
11121
  /** {zh}
11122
11122
  * @brief 软解不支持时触发。
11123
11123
  */
11124
11124
  /** {en}
11125
11125
  * @brief Triggered when software decoding is not supported.
11126
11126
  */
11127
- NOT_SUPPORT_SOFT_DECODER: string;
11127
+ readonly NOT_SUPPORT_SOFT_DECODER: "not_support_soft_decoder";
11128
11128
  /** {zh}
11129
11129
  * @brief `playAuthToken` 过期。
11130
11130
  */
11131
11131
  /** {en}
11132
11132
  * @brief Triggered when `playAuthToken` expires.
11133
11133
  */
11134
- TOKEN_EXPIRED: string;
11134
+ readonly TOKEN_EXPIRED: "playAuthToken_expired";
11135
11135
  /** {zh}
11136
11136
  * @brief UMD 加载失败。
11137
11137
  */
11138
11138
  /** {en}
11139
11139
  * @brief Triggered when UMD loading fails.
11140
11140
  */
11141
- UMD_LOAD_FAIL: string;
11141
+ readonly UMD_LOAD_FAIL: "umd_load_fail";
11142
11142
  /** {zh}
11143
11143
  * @brief 切换下一个视频。调用 `playNext` 后触发。
11144
11144
  */
11145
11145
  /** {en}
11146
11146
  * @brief Triggered when switching to the next video, after calling `playNext`.
11147
11147
  */
11148
- PLAYNEXT: string;
11148
+ readonly PLAYNEXT: "playnext";
11149
11149
  /** {zh}
11150
11150
  * @brief 视频地址为空。
11151
11151
  */
11152
11152
  /** {en}
11153
11153
  * @brief Triggered when the video URL is empty.
11154
11154
  */
11155
- URL_NULL: string;
11155
+ readonly URL_NULL: "urlNull";
11156
11156
  /** {zh}
11157
11157
  * @brief 鼠标移出。
11158
11158
  */
11159
11159
  /** {en}
11160
11160
  * @brief Triggered when the mouse leaves the player.
11161
11161
  */
11162
- LEAVE_PLAYER: string;
11162
+ readonly LEAVE_PLAYER: "leaveplayer";
11163
11163
  /** {zh}
11164
11164
  * @brief 鼠标移入。
11165
11165
  */
11166
11166
  /** {en}
11167
11167
  * @brief Triggered when the mouse enters the player.
11168
11168
  */
11169
- ENTER_PLAYER: string;
11169
+ readonly ENTER_PLAYER: "enterplayer";
11170
11170
  /** {zh}
11171
11171
  * @brief 播放器状态重置。
11172
11172
  */
11173
11173
  /** {en}
11174
11174
  * @brief Triggered when the player state is reset.
11175
11175
  */
11176
- RESET: string;
11176
+ readonly RESET: "reset";
11177
11177
  /** {zh}
11178
11178
  * @brief `<source>` 加载错误,表示 `<source>` 不支持或播放失败。
11179
11179
  */
11180
11180
  /** {en}
11181
11181
  * @brief Triggered when a `<source>` fails to load (unsupported or playback failed).
11182
11182
  */
11183
- SOURCE_ERROR: string;
11183
+ readonly SOURCE_ERROR: "source_error";
11184
11184
  /** {zh}
11185
11185
  * @brief `<source>` 加载成功。
11186
11186
  */
11187
11187
  /** {en}
11188
11188
  * @brief Triggered when a `<source>` loads successfully.
11189
11189
  */
11190
- SOURCE_SUCCESS: string;
11190
+ readonly SOURCE_SUCCESS: "source_success";
11191
11191
  /** {zh}
11192
11192
  * @brief license 提醒
11193
11193
  */
11194
11194
  /** {en}
11195
11195
  * @brief License status warning.
11196
11196
  */
11197
- LICENSE_STATUS_WARNING: string;
11197
+ readonly LICENSE_STATUS_WARNING: "license_status_warning";
11198
11198
  /** {zh}
11199
11199
  * @brief HLS 音频轨道列表更新时触发。`data.audioTracks` 为完整轨道数组。
11200
11200
  */
11201
11201
  /** {en}
11202
11202
  * @brief Triggered when the HLS audio track list updates. `data.audioTracks` is the full track array.
11203
11203
  */
11204
- AUDIO_TRACKS_UPDATED: string;
11204
+ readonly AUDIO_TRACKS_UPDATED: "audio_tracks_updated";
11205
11205
  /** {zh}
11206
11206
  * @brief 音频轨道切换完成时触发。`data.id` 为新轨道 id,`data.audioTrack` 为完整轨道对象。
11207
11207
  */
11208
11208
  /** {en}
11209
11209
  * @brief Triggered when audio track switching completes. `data.id` is the new track id; `data.audioTrack` is the full track object.
11210
11210
  */
11211
- AUDIO_TRACK_CHANGE: string;
11211
+ readonly AUDIO_TRACK_CHANGE: "audio_track_change";
11212
11212
  /** {zh}
11213
11213
  * @brief 当前播放会话的 HLS Level 列表或状态更新。
11214
11214
  */
11215
11215
  /** {en}
11216
11216
  * @brief Triggered when the HLS Level list or state updates for the current playback session.
11217
11217
  */
11218
- HLS_LEVELS_UPDATED: string;
11218
+ readonly HLS_LEVELS_UPDATED: "hls_levels_updated";
11219
11219
  /** {zh}
11220
11220
  * @brief HLS Level 切换请求已提交给播放内核;不表示画面已经切换。
11221
11221
  */
11222
11222
  /** {en}
11223
11223
  * @brief Triggered after an HLS Level switch is submitted to the playback engine; the rendered Level may not have changed yet.
11224
11224
  */
11225
- HLS_LEVEL_SWITCHING: string;
11225
+ readonly HLS_LEVEL_SWITCHING: "hls_level_switching";
11226
11226
  /** {zh}
11227
11227
  * @brief HLS Level 已实际切换。
11228
11228
  */
11229
11229
  /** {en}
11230
11230
  * @brief Triggered after the active HLS Level has actually switched.
11231
11231
  */
11232
- HLS_LEVEL_SWITCHED: string;
11232
+ readonly HLS_LEVEL_SWITCHED: "hls_level_switched";
11233
11233
  /** {zh}
11234
11234
  * @brief 当前播放会话的 HLS ABR 决策引擎解析完成。
11235
11235
  */
11236
11236
  /** {en}
11237
11237
  * @brief Triggered after the HLS ABR decision engine is resolved for the current playback session.
11238
11238
  */
11239
- HLS_ABR_ENGINE_RESOLVED: string;
11239
+ readonly HLS_ABR_ENGINE_RESOLVED: "hls_abr_engine_resolved";
11240
11240
  /** {zh}
11241
11241
  * @brief HLS ABR 的可用性、自动/手动模式或激活状态发生变化。
11242
11242
  */
11243
11243
  /** {en}
11244
11244
  * @brief Triggered when HLS ABR availability, auto/manual mode, or active state changes.
11245
11245
  */
11246
- HLS_ABR_STATE_CHANGE: string;
11246
+ readonly HLS_ABR_STATE_CHANGE: "hls_abr_state_change";
11247
11247
  /** {zh}
11248
11248
  * @brief HLS ABR 上限发生变化。
11249
11249
  */
11250
11250
  /** {en}
11251
11251
  * @brief Triggered when the HLS ABR cap changes.
11252
11252
  */
11253
- HLS_ABR_LIMIT_CHANGE: string;
11253
+ readonly HLS_ABR_LIMIT_CHANGE: "hls_abr_limit_change";
11254
11254
  /** {zh}
11255
11255
  * @brief 当前播放会话从 Master M3U8 或原生 TextTrack 获得的字幕列表更新。
11256
11256
  */
11257
11257
  /** {en}
11258
11258
  * @brief Triggered when the subtitle list sourced from a Master M3U8 or native TextTracks updates for the current playback session.
11259
11259
  */
11260
- HLS_SUBTITLE_TRACKS_UPDATED: string;
11260
+ readonly HLS_SUBTITLE_TRACKS_UPDATED: "hls_subtitle_tracks_updated";
11261
11261
  /** {zh}
11262
11262
  * @brief HLS 字幕轨切换请求已提交;不表示字幕轨已经生效。
11263
11263
  */
11264
11264
  /** {en}
11265
11265
  * @brief Triggered after an HLS subtitle-track switch is submitted; the track may not be active yet.
11266
11266
  */
11267
- HLS_SUBTITLE_TRACK_SWITCHING: string;
11267
+ readonly HLS_SUBTITLE_TRACK_SWITCHING: "hls_subtitle_track_switching";
11268
11268
  /** {zh}
11269
11269
  * @brief HLS 字幕轨切换已经生效。
11270
11270
  */
11271
11271
  /** {en}
11272
11272
  * @brief Triggered after an HLS subtitle-track switch takes effect.
11273
11273
  */
11274
- HLS_SUBTITLE_TRACK_SWITCHED: string;
11274
+ readonly HLS_SUBTITLE_TRACK_SWITCHED: "hls_subtitle_track_switched";
11275
11275
  };
11276
11276
  PluginEvents: {
11277
11277
  /** {zh}