@volcengine/veplayer 2.8.0-rc.2 → 2.8.0

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/esm/veplayer.d.ts CHANGED
@@ -9,7 +9,7 @@ import XG_EN from "xgplayer/es/lang/en";
9
9
  import XG_ZH_CN from "xgplayer/es/lang/zh-cn";
10
10
  import OptionList from "xgplayer/es/plugins/common/optionList";
11
11
  import { default as XGPlayer } from "xgplayer/es/player";
12
- import Poster from "xgplayer/es/plugins/poster";
12
+ import Poster$0 from "xgplayer/es/plugins/poster";
13
13
  import Start from "xgplayer/es/plugins/start";
14
14
  import Enter from "xgplayer/es/plugins/enter";
15
15
  import PC from "xgplayer/es/plugins/pc";
@@ -40,6 +40,15 @@ declare const EN: {
40
40
  MEDIA_ERR_URL_EMPTY: string;
41
41
  DRM: string;
42
42
  DRM_LICENSE: string;
43
+ DRM_UNSUPPORTED: string;
44
+ DRM_NO_MEDIA_KEY: string;
45
+ DRM_NO_KEY_SESSION: string;
46
+ DRM_GENERATE_QUEST_FAIL: string;
47
+ DRM_LACK_SERVER_CERTIFICATE_PATH: string;
48
+ DRM_LACK_SERVER_PROCESS_SPC_PATH: string;
49
+ DRM_LICENSE_FAIL: string;
50
+ DRM_KEY_ERROR: string;
51
+ DRM_CERT_FAIL: string;
43
52
  OTHER: string;
44
53
  RUNTIME: string;
45
54
  MODULE_LOAD_ERROR: string;
@@ -100,6 +109,15 @@ declare const ZH_CN: {
100
109
  MEDIA_ERR_URL_EMPTY: string;
101
110
  DRM: string;
102
111
  DRM_LICENSE: string;
112
+ DRM_UNSUPPORTED: string;
113
+ DRM_NO_MEDIA_KEY: string;
114
+ DRM_NO_KEY_SESSION: string;
115
+ DRM_GENERATE_QUEST_FAIL: string;
116
+ DRM_LACK_SERVER_CERTIFICATE_PATH: string;
117
+ DRM_LACK_SERVER_PROCESS_SPC_PATH: string;
118
+ DRM_LICENSE_FAIL: string;
119
+ DRM_KEY_ERROR: string;
120
+ DRM_CERT_FAIL: string;
103
121
  OTHER: string;
104
122
  RUNTIME: string;
105
123
  MODULE_LOAD_ERROR: string;
@@ -498,12 +516,6 @@ declare enum Level {
498
516
  */
499
517
  Warn = "Warn"
500
518
  }
501
- /** {zh}
502
- * @id ErrorCodeRaw
503
- */
504
- /** {en}
505
- * @id ErrorCodeRaw
506
- */
507
519
  declare enum ErrorCode {
508
520
  /** {zh}
509
521
  * @brief 视频解析错误
@@ -770,6 +782,69 @@ declare enum ErrorCode {
770
782
  * @solution Verify the authentication and ensure proper playback permissions.
771
783
  */
772
784
  DRM_LICENSE = 7100,
785
+ /** {zh}
786
+ * @brief 不支持 DRM 加密播放
787
+ */
788
+ /** {en}
789
+ * @brief DRM encrypted playback is not supported
790
+ */
791
+ DRM_UNSUPPORTED = 7101,
792
+ /** {zh}
793
+ * @brief 视频数据缺少相应 MediaKey
794
+ */
795
+ /** {en}
796
+ * @brief Video data lacks the corresponding MediaKey
797
+ */
798
+ DRM_NO_MEDIA_KEY = 7103,
799
+ /** {zh}
800
+ * @brief 浏览器不支持相应 DRM KeySession
801
+ */
802
+ /** {en}
803
+ * @brief Browser does not support the corresponding DRM KeySession
804
+ */
805
+ DRM_NO_KEY_SESSION = 7104,
806
+ /** {zh}
807
+ * @brief 解密播放错误
808
+ */
809
+ /** {en}
810
+ * @brief Decryption playback error
811
+ */
812
+ DRM_GENERATE_QUEST_FAIL = 7105,
813
+ /** {zh}
814
+ * @brief 缺少 DRM 证书请求链接
815
+ */
816
+ /** {en}
817
+ * @brief Missing DRM certificate request link
818
+ */
819
+ DRM_LACK_SERVER_CERTIFICATE_PATH = 7106,
820
+ /** {zh}
821
+ * @brief 缺少 DRM License 请求链接
822
+ */
823
+ /** {en}
824
+ * @brief Missing DRM License request link
825
+ */
826
+ DRM_LACK_SERVER_PROCESS_SPC_PATH = 7107,
827
+ /** {zh}
828
+ * @brief 请求或更新 License 失败
829
+ */
830
+ /** {en}
831
+ * @brief Request or update License failed
832
+ */
833
+ DRM_LICENSE_FAIL = 7108,
834
+ /** {zh}
835
+ * @brief 解密错误
836
+ */
837
+ /** {en}
838
+ * @brief Decryption error
839
+ */
840
+ DRM_KEY_ERROR = 7109,
841
+ /** {zh}
842
+ * @brief 请求 DRM 证书失败'
843
+ */
844
+ /** {en}
845
+ * @brief Request for DRM certificate failed'
846
+ */
847
+ DRM_CERT_FAIL = 7110,
773
848
  /** {zh}
774
849
  * @brief DRM 权限校验失败
775
850
  * @hidden
@@ -816,7 +891,7 @@ declare enum ErrorCode {
816
891
  * @brief A playback issue occurred.
817
892
  * @solution Check the live stream source or [contact support](https://console.byteplus.com/auth/login?redirectURI=%2Fworkorder%2Fcreate).
818
893
  */
819
- RUNTIME_BWAITING_TIMEOUT_ERROR = 9002,
894
+ RUNTIME_WAITING_TIMEOUT_ERROR = 9003,
820
895
  // veplayer 报错
821
896
  /** {zh}
822
897
  * @brief CDN 异步获取失败
@@ -1013,10 +1088,12 @@ declare class Error extends Plugin {
1013
1088
  /** {zh}
1014
1089
  * @list option
1015
1090
  * @kind property
1091
+ * @hidden
1016
1092
  */
1017
1093
  /** {en}
1018
1094
  * @list option
1019
1095
  * @kind property
1096
+ * @hidden
1020
1097
  */
1021
1098
  interface DefinitionConfig {
1022
1099
  /** {zh}
@@ -1228,7 +1305,7 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
1228
1305
  /** {en}
1229
1306
  * @brief The URL of the player's cover image.
1230
1307
  */
1231
- poster?: string;
1308
+ poster?: string | Poster;
1232
1309
  /** {zh}
1233
1310
  * @brief 为播放器设置初始显示语言,语言包不存在的情况下默认显示 'en' 语言包 。默认值为 `document.documentElement.getAttribute('lang') || navigator.language || 'zh-cn'`
1234
1311
  */
@@ -1622,6 +1699,73 @@ interface CommonStyle {
1622
1699
  */
1623
1700
  volumeColor?: string;
1624
1701
  }
1702
+ /** {zh}
1703
+ * @list option
1704
+ * @kind property
1705
+ */
1706
+ /** {en}
1707
+ * @list option
1708
+ * @kind property
1709
+ */
1710
+ interface Poster {
1711
+ /** {zh}
1712
+ * @brief 封面图 URL 地址。
1713
+ */
1714
+ /** {en}
1715
+ * @brief The URL of the player's cover image.
1716
+ */
1717
+ poster: string;
1718
+ /** {zh}
1719
+ * @brief 是否在播放结束之后显示封面图。
1720
+ * - `true`:播放结束之后显示封面图。
1721
+ * - `false`:播放结束之后不显示封面图。
1722
+ * @default true
1723
+ */
1724
+ /** {en}
1725
+ * @brief Whether to display the cover image after playback ends.
1726
+ * - `true`:display the cover image after playback ends.
1727
+ * - `false`:not display the cover image after playback ends.
1728
+ * @default true
1729
+ */
1730
+ isEndedShow?: boolean;
1731
+ /** {zh}
1732
+ * @brief 是否播放后再隐藏封面图。
1733
+ * - `true`:播放后隐藏,未启播时一直显示封面图。
1734
+ * - `false`:在 `play` 事件触发后隐藏封面图。
1735
+ * @default false
1736
+ */
1737
+ /** {en}
1738
+ * @brief Whether to hide the cover image after `canplay` event.
1739
+ * - `true`:hide the cover image after `canplay` event.
1740
+ * - `false`:hide the cover image after `play` event.
1741
+ * @default false
1742
+ */
1743
+ hideCanplay?: boolean;
1744
+ /** {zh}
1745
+ * @brief 是否一直显示封面图。
1746
+ * @default false
1747
+ * @hidden
1748
+ */
1749
+ /** {}
1750
+ * @hidden
1751
+ */
1752
+ notHidden?: boolean;
1753
+ /** {zh}
1754
+ * @brief 封面图填充方式。取值如下:
1755
+ * - `fixWidth`:宽度方向填充,不会被拉伸压缩。
1756
+ * - `fixHeight`:高度方向填充,不会被拉伸压缩。
1757
+ * - `cover`:完全覆盖容器,多余部分会被裁剪。
1758
+ * - `contain`:完全覆盖,与容器不匹配时会被拉伸压缩。
1759
+ */
1760
+ /** {en}
1761
+ * @brief Cover image fill mode.
1762
+ * - `fixWidth`:Fill the width of the container and crop the height if necessary.
1763
+ * - `fixHeight`:Fill the height of the container and crop the width if necessary.
1764
+ * - `cover`:Fill the entire container while keeping the original aspect ratio.
1765
+ * - `contain`:Stretch the video to fill the container.
1766
+ */
1767
+ fillMode?: "fixWidth" | "fixHeight" | "cover" | "contain";
1768
+ }
1625
1769
  type PrepareResult = {
1626
1770
  options?: Partial<VePlayerBaseOptions>;
1627
1771
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -2352,6 +2496,7 @@ declare enum DynamicModule {
2352
2496
  PluginMp4 = "plugin:mp4",
2353
2497
  PluginHls = "plugin:hls",
2354
2498
  PluginHlsJs = "plugin:hlsjs",
2499
+ PluginDashJs = "plugin:dashjs",
2355
2500
  PluginShaka = "plugin:shaka",
2356
2501
  PluginRtm = "plugin:rtm",
2357
2502
  PluginXgvideo = "plugin:xgvideo",
@@ -2367,6 +2512,7 @@ type ModulesMap = {
2367
2512
  [DynamicModule.PluginMp4]: Exports;
2368
2513
  [DynamicModule.PluginHls]: Exports;
2369
2514
  [DynamicModule.PluginHlsJs]: Exports;
2515
+ [DynamicModule.PluginDashJs]: Exports;
2370
2516
  [DynamicModule.PluginShaka]: Exports;
2371
2517
  [DynamicModule.PluginRtm]: Exports;
2372
2518
  [DynamicModule.PluginXgvideo]: Exports;
@@ -2407,6 +2553,15 @@ declare namespace strategy {
2407
2553
  MEDIA_ERR_URL_EMPTY: string;
2408
2554
  DRM: string;
2409
2555
  DRM_LICENSE: string;
2556
+ DRM_UNSUPPORTED: string;
2557
+ DRM_NO_MEDIA_KEY: string;
2558
+ DRM_NO_KEY_SESSION: string;
2559
+ DRM_GENERATE_QUEST_FAIL: string;
2560
+ DRM_LACK_SERVER_CERTIFICATE_PATH: string;
2561
+ DRM_LACK_SERVER_PROCESS_SPC_PATH: string;
2562
+ DRM_LICENSE_FAIL: string;
2563
+ DRM_KEY_ERROR: string;
2564
+ DRM_CERT_FAIL: string;
2410
2565
  OTHER: string;
2411
2566
  RUNTIME: string;
2412
2567
  MODULE_LOAD_ERROR: string;
@@ -2467,6 +2622,15 @@ declare namespace strategy {
2467
2622
  MEDIA_ERR_URL_EMPTY: string;
2468
2623
  DRM: string;
2469
2624
  DRM_LICENSE: string;
2625
+ DRM_UNSUPPORTED: string;
2626
+ DRM_NO_MEDIA_KEY: string;
2627
+ DRM_NO_KEY_SESSION: string;
2628
+ DRM_GENERATE_QUEST_FAIL: string;
2629
+ DRM_LACK_SERVER_CERTIFICATE_PATH: string;
2630
+ DRM_LACK_SERVER_PROCESS_SPC_PATH: string;
2631
+ DRM_LICENSE_FAIL: string;
2632
+ DRM_KEY_ERROR: string;
2633
+ DRM_CERT_FAIL: string;
2470
2634
  OTHER: string;
2471
2635
  RUNTIME: string;
2472
2636
  MODULE_LOAD_ERROR: string;
@@ -2863,12 +3027,6 @@ declare namespace strategy {
2863
3027
  */
2864
3028
  Warn = "Warn"
2865
3029
  }
2866
- /** {zh}
2867
- * @id ErrorCodeRaw
2868
- */
2869
- /** {en}
2870
- * @id ErrorCodeRaw
2871
- */
2872
3030
  enum ErrorCode {
2873
3031
  /** {zh}
2874
3032
  * @brief 视频解析错误
@@ -3135,6 +3293,69 @@ declare namespace strategy {
3135
3293
  * @solution Verify the authentication and ensure proper playback permissions.
3136
3294
  */
3137
3295
  DRM_LICENSE = 7100,
3296
+ /** {zh}
3297
+ * @brief 不支持 DRM 加密播放
3298
+ */
3299
+ /** {en}
3300
+ * @brief DRM encrypted playback is not supported
3301
+ */
3302
+ DRM_UNSUPPORTED = 7101,
3303
+ /** {zh}
3304
+ * @brief 视频数据缺少相应 MediaKey
3305
+ */
3306
+ /** {en}
3307
+ * @brief Video data lacks the corresponding MediaKey
3308
+ */
3309
+ DRM_NO_MEDIA_KEY = 7103,
3310
+ /** {zh}
3311
+ * @brief 浏览器不支持相应 DRM KeySession
3312
+ */
3313
+ /** {en}
3314
+ * @brief Browser does not support the corresponding DRM KeySession
3315
+ */
3316
+ DRM_NO_KEY_SESSION = 7104,
3317
+ /** {zh}
3318
+ * @brief 解密播放错误
3319
+ */
3320
+ /** {en}
3321
+ * @brief Decryption playback error
3322
+ */
3323
+ DRM_GENERATE_QUEST_FAIL = 7105,
3324
+ /** {zh}
3325
+ * @brief 缺少 DRM 证书请求链接
3326
+ */
3327
+ /** {en}
3328
+ * @brief Missing DRM certificate request link
3329
+ */
3330
+ DRM_LACK_SERVER_CERTIFICATE_PATH = 7106,
3331
+ /** {zh}
3332
+ * @brief 缺少 DRM License 请求链接
3333
+ */
3334
+ /** {en}
3335
+ * @brief Missing DRM License request link
3336
+ */
3337
+ DRM_LACK_SERVER_PROCESS_SPC_PATH = 7107,
3338
+ /** {zh}
3339
+ * @brief 请求或更新 License 失败
3340
+ */
3341
+ /** {en}
3342
+ * @brief Request or update License failed
3343
+ */
3344
+ DRM_LICENSE_FAIL = 7108,
3345
+ /** {zh}
3346
+ * @brief 解密错误
3347
+ */
3348
+ /** {en}
3349
+ * @brief Decryption error
3350
+ */
3351
+ DRM_KEY_ERROR = 7109,
3352
+ /** {zh}
3353
+ * @brief 请求 DRM 证书失败'
3354
+ */
3355
+ /** {en}
3356
+ * @brief Request for DRM certificate failed'
3357
+ */
3358
+ DRM_CERT_FAIL = 7110,
3138
3359
  /** {zh}
3139
3360
  * @brief DRM 权限校验失败
3140
3361
  * @hidden
@@ -3181,7 +3402,7 @@ declare namespace strategy {
3181
3402
  * @brief A playback issue occurred.
3182
3403
  * @solution Check the live stream source or [contact support](https://console.byteplus.com/auth/login?redirectURI=%2Fworkorder%2Fcreate).
3183
3404
  */
3184
- RUNTIME_BWAITING_TIMEOUT_ERROR = 9002,
3405
+ RUNTIME_WAITING_TIMEOUT_ERROR = 9003,
3185
3406
  // veplayer 报错
3186
3407
  /** {zh}
3187
3408
  * @brief CDN 异步获取失败
@@ -3280,8 +3501,8 @@ declare namespace strategy {
3280
3501
  */
3281
3502
  constructor(error?: string | ErrorInfo<T>, i18n?: VeI18n<T>);
3282
3503
  }
3283
- function create(errorCode: ErrorCode, info?: ErrorInfo, i18n?: VeI18n): VeError<"DEFINITION_FALLBACK_TOAST" | "DEFINITION_SWITCHING" | "ERROR_REFRESH" | "UNMUTE" | "MANIFEST" | "NETWORK" | "NETWORK_TIMEOUT" | "NETWORK_FORBIDDEN" | "NETWORK_NOTFOUND" | "DEMUX" | "REMUX" | "MEDIA" | "MEDIA_ERR_CODEC_NOT_SUPPORTED" | "MEDIA_ERR_URL_EMPTY" | "DRM" | "DRM_LICENSE" | "OTHER" | "RUNTIME" | "MODULE_LOAD_ERROR" | "UNKNOWN" | "ERROR_TYPES" | "HAVE_NOTHING" | "HAVE_METADATA" | "HAVE_CURRENT_DATA" | "HAVE_FUTURE_DATA" | "HAVE_ENOUGH_DATA" | "NETWORK_EMPTY" | "NETWORK_IDLE" | "NETWORK_LOADING" | "NETWORK_NO_SOURCE" | "MEDIA_ERR_ABORTED" | "MEDIA_ERR_NETWORK" | "MEDIA_ERR_DECODE" | "MEDIA_ERR_SRC_NOT_SUPPORTED" | "REPLAY" | "ERROR" | "PLAY_TIPS" | "PAUSE_TIPS" | "PLAYNEXT_TIPS" | "DOWNLOAD_TIPS" | "ROTATE_TIPS" | "RELOAD_TIPS" | "FULLSCREEN_TIPS" | "EXITFULLSCREEN_TIPS" | "CSSFULLSCREEN_TIPS" | "EXITCSSFULLSCREEN_TIPS" | "TEXTTRACK" | "PIP" | "SCREENSHOT" | "LIVE" | "OFF" | "OPEN" | "MINI_DRAG" | "MINISCREEN" | "REFRESH_TIPS" | "REFRESH" | "FORWARD" | "LIVE_TIP">;
3284
- function transform(xgErr: XGError, i18n?: VeI18n): VeError<"DEFINITION_FALLBACK_TOAST" | "DEFINITION_SWITCHING" | "ERROR_REFRESH" | "UNMUTE" | "MANIFEST" | "NETWORK" | "NETWORK_TIMEOUT" | "NETWORK_FORBIDDEN" | "NETWORK_NOTFOUND" | "DEMUX" | "REMUX" | "MEDIA" | "MEDIA_ERR_CODEC_NOT_SUPPORTED" | "MEDIA_ERR_URL_EMPTY" | "DRM" | "DRM_LICENSE" | "OTHER" | "RUNTIME" | "MODULE_LOAD_ERROR" | "UNKNOWN" | "ERROR_TYPES" | "HAVE_NOTHING" | "HAVE_METADATA" | "HAVE_CURRENT_DATA" | "HAVE_FUTURE_DATA" | "HAVE_ENOUGH_DATA" | "NETWORK_EMPTY" | "NETWORK_IDLE" | "NETWORK_LOADING" | "NETWORK_NO_SOURCE" | "MEDIA_ERR_ABORTED" | "MEDIA_ERR_NETWORK" | "MEDIA_ERR_DECODE" | "MEDIA_ERR_SRC_NOT_SUPPORTED" | "REPLAY" | "ERROR" | "PLAY_TIPS" | "PAUSE_TIPS" | "PLAYNEXT_TIPS" | "DOWNLOAD_TIPS" | "ROTATE_TIPS" | "RELOAD_TIPS" | "FULLSCREEN_TIPS" | "EXITFULLSCREEN_TIPS" | "CSSFULLSCREEN_TIPS" | "EXITCSSFULLSCREEN_TIPS" | "TEXTTRACK" | "PIP" | "SCREENSHOT" | "LIVE" | "OFF" | "OPEN" | "MINI_DRAG" | "MINISCREEN" | "REFRESH_TIPS" | "REFRESH" | "FORWARD" | "LIVE_TIP">;
3504
+ function create(errorCode: ErrorCode, info?: ErrorInfo, i18n?: VeI18n): VeError<"DEFINITION_FALLBACK_TOAST" | "DEFINITION_SWITCHING" | "ERROR_REFRESH" | "UNMUTE" | "MANIFEST" | "NETWORK" | "NETWORK_TIMEOUT" | "NETWORK_FORBIDDEN" | "NETWORK_NOTFOUND" | "DEMUX" | "REMUX" | "MEDIA" | "MEDIA_ERR_CODEC_NOT_SUPPORTED" | "MEDIA_ERR_URL_EMPTY" | "DRM" | "DRM_LICENSE" | "DRM_UNSUPPORTED" | "DRM_NO_MEDIA_KEY" | "DRM_NO_KEY_SESSION" | "DRM_GENERATE_QUEST_FAIL" | "DRM_LACK_SERVER_CERTIFICATE_PATH" | "DRM_LACK_SERVER_PROCESS_SPC_PATH" | "DRM_LICENSE_FAIL" | "DRM_KEY_ERROR" | "DRM_CERT_FAIL" | "OTHER" | "RUNTIME" | "MODULE_LOAD_ERROR" | "UNKNOWN" | "ERROR_TYPES" | "HAVE_NOTHING" | "HAVE_METADATA" | "HAVE_CURRENT_DATA" | "HAVE_FUTURE_DATA" | "HAVE_ENOUGH_DATA" | "NETWORK_EMPTY" | "NETWORK_IDLE" | "NETWORK_LOADING" | "NETWORK_NO_SOURCE" | "MEDIA_ERR_ABORTED" | "MEDIA_ERR_NETWORK" | "MEDIA_ERR_DECODE" | "MEDIA_ERR_SRC_NOT_SUPPORTED" | "REPLAY" | "ERROR" | "PLAY_TIPS" | "PAUSE_TIPS" | "PLAYNEXT_TIPS" | "DOWNLOAD_TIPS" | "ROTATE_TIPS" | "RELOAD_TIPS" | "FULLSCREEN_TIPS" | "EXITFULLSCREEN_TIPS" | "CSSFULLSCREEN_TIPS" | "EXITCSSFULLSCREEN_TIPS" | "TEXTTRACK" | "PIP" | "SCREENSHOT" | "LIVE" | "OFF" | "OPEN" | "MINI_DRAG" | "MINISCREEN" | "REFRESH_TIPS" | "REFRESH" | "FORWARD" | "LIVE_TIP">;
3505
+ function transform(xgErr: XGError, i18n?: VeI18n): VeError<"DEFINITION_FALLBACK_TOAST" | "DEFINITION_SWITCHING" | "ERROR_REFRESH" | "UNMUTE" | "MANIFEST" | "NETWORK" | "NETWORK_TIMEOUT" | "NETWORK_FORBIDDEN" | "NETWORK_NOTFOUND" | "DEMUX" | "REMUX" | "MEDIA" | "MEDIA_ERR_CODEC_NOT_SUPPORTED" | "MEDIA_ERR_URL_EMPTY" | "DRM" | "DRM_LICENSE" | "DRM_UNSUPPORTED" | "DRM_NO_MEDIA_KEY" | "DRM_NO_KEY_SESSION" | "DRM_GENERATE_QUEST_FAIL" | "DRM_LACK_SERVER_CERTIFICATE_PATH" | "DRM_LACK_SERVER_PROCESS_SPC_PATH" | "DRM_LICENSE_FAIL" | "DRM_KEY_ERROR" | "DRM_CERT_FAIL" | "OTHER" | "RUNTIME" | "MODULE_LOAD_ERROR" | "UNKNOWN" | "ERROR_TYPES" | "HAVE_NOTHING" | "HAVE_METADATA" | "HAVE_CURRENT_DATA" | "HAVE_FUTURE_DATA" | "HAVE_ENOUGH_DATA" | "NETWORK_EMPTY" | "NETWORK_IDLE" | "NETWORK_LOADING" | "NETWORK_NO_SOURCE" | "MEDIA_ERR_ABORTED" | "MEDIA_ERR_NETWORK" | "MEDIA_ERR_DECODE" | "MEDIA_ERR_SRC_NOT_SUPPORTED" | "REPLAY" | "ERROR" | "PLAY_TIPS" | "PAUSE_TIPS" | "PLAYNEXT_TIPS" | "DOWNLOAD_TIPS" | "ROTATE_TIPS" | "RELOAD_TIPS" | "FULLSCREEN_TIPS" | "EXITFULLSCREEN_TIPS" | "CSSFULLSCREEN_TIPS" | "EXITCSSFULLSCREEN_TIPS" | "TEXTTRACK" | "PIP" | "SCREENSHOT" | "LIVE" | "OFF" | "OPEN" | "MINI_DRAG" | "MINISCREEN" | "REFRESH_TIPS" | "REFRESH" | "FORWARD" | "LIVE_TIP">;
3285
3506
  /** {zh}
3286
3507
  * @list option
3287
3508
  * @kind property
@@ -3382,10 +3603,12 @@ declare namespace strategy {
3382
3603
  /** {zh}
3383
3604
  * @list option
3384
3605
  * @kind property
3606
+ * @hidden
3385
3607
  */
3386
3608
  /** {en}
3387
3609
  * @list option
3388
3610
  * @kind property
3611
+ * @hidden
3389
3612
  */
3390
3613
  interface DefinitionConfig {
3391
3614
  /** {zh}
@@ -3597,7 +3820,7 @@ declare namespace strategy {
3597
3820
  /** {en}
3598
3821
  * @brief The URL of the player's cover image.
3599
3822
  */
3600
- poster?: string;
3823
+ poster?: string | Poster;
3601
3824
  /** {zh}
3602
3825
  * @brief 为播放器设置初始显示语言,语言包不存在的情况下默认显示 'en' 语言包 。默认值为 `document.documentElement.getAttribute('lang') || navigator.language || 'zh-cn'`
3603
3826
  */
@@ -3991,6 +4214,73 @@ declare namespace strategy {
3991
4214
  */
3992
4215
  volumeColor?: string;
3993
4216
  }
4217
+ /** {zh}
4218
+ * @list option
4219
+ * @kind property
4220
+ */
4221
+ /** {en}
4222
+ * @list option
4223
+ * @kind property
4224
+ */
4225
+ interface Poster {
4226
+ /** {zh}
4227
+ * @brief 封面图 URL 地址。
4228
+ */
4229
+ /** {en}
4230
+ * @brief The URL of the player's cover image.
4231
+ */
4232
+ poster: string;
4233
+ /** {zh}
4234
+ * @brief 是否在播放结束之后显示封面图。
4235
+ * - `true`:播放结束之后显示封面图。
4236
+ * - `false`:播放结束之后不显示封面图。
4237
+ * @default true
4238
+ */
4239
+ /** {en}
4240
+ * @brief Whether to display the cover image after playback ends.
4241
+ * - `true`:display the cover image after playback ends.
4242
+ * - `false`:not display the cover image after playback ends.
4243
+ * @default true
4244
+ */
4245
+ isEndedShow?: boolean;
4246
+ /** {zh}
4247
+ * @brief 是否播放后再隐藏封面图。
4248
+ * - `true`:播放后隐藏,未启播时一直显示封面图。
4249
+ * - `false`:在 `play` 事件触发后隐藏封面图。
4250
+ * @default false
4251
+ */
4252
+ /** {en}
4253
+ * @brief Whether to hide the cover image after `canplay` event.
4254
+ * - `true`:hide the cover image after `canplay` event.
4255
+ * - `false`:hide the cover image after `play` event.
4256
+ * @default false
4257
+ */
4258
+ hideCanplay?: boolean;
4259
+ /** {zh}
4260
+ * @brief 是否一直显示封面图。
4261
+ * @default false
4262
+ * @hidden
4263
+ */
4264
+ /** {}
4265
+ * @hidden
4266
+ */
4267
+ notHidden?: boolean;
4268
+ /** {zh}
4269
+ * @brief 封面图填充方式。取值如下:
4270
+ * - `fixWidth`:宽度方向填充,不会被拉伸压缩。
4271
+ * - `fixHeight`:高度方向填充,不会被拉伸压缩。
4272
+ * - `cover`:完全覆盖容器,多余部分会被裁剪。
4273
+ * - `contain`:完全覆盖,与容器不匹配时会被拉伸压缩。
4274
+ */
4275
+ /** {en}
4276
+ * @brief Cover image fill mode.
4277
+ * - `fixWidth`:Fill the width of the container and crop the height if necessary.
4278
+ * - `fixHeight`:Fill the height of the container and crop the width if necessary.
4279
+ * - `cover`:Fill the entire container while keeping the original aspect ratio.
4280
+ * - `contain`:Stretch the video to fill the container.
4281
+ */
4282
+ fillMode?: "fixWidth" | "fixHeight" | "cover" | "contain";
4283
+ }
3994
4284
  type PrepareResult = {
3995
4285
  options?: Partial<VePlayerBaseOptions>;
3996
4286
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -4083,6 +4373,7 @@ declare namespace strategy {
4083
4373
  readonly "plugin:mp4": "veplayer.plugin.mp4.[env].[ext]";
4084
4374
  readonly "plugin:hls": "veplayer.plugin.hls.[env].[ext]";
4085
4375
  readonly "plugin:hlsjs": "veplayer.plugin.hlsjs.[env].[ext]";
4376
+ readonly "plugin:dashjs": "veplayer.plugin.dashjs.[env].[ext]";
4086
4377
  readonly "plugin:shaka": "veplayer.plugin.shaka.[env].[ext]";
4087
4378
  readonly "plugin:rtm": "veplayer.plugin.rtm.[env].[ext]";
4088
4379
  readonly "plugin:xgvideo": "veplayer.plugin.xgvideo.[env].[ext]";
@@ -4117,6 +4408,7 @@ declare namespace strategy {
4117
4408
  PluginMp4 = "plugin:mp4",
4118
4409
  PluginHls = "plugin:hls",
4119
4410
  PluginHlsJs = "plugin:hlsjs",
4411
+ PluginDashJs = "plugin:dashjs",
4120
4412
  PluginShaka = "plugin:shaka",
4121
4413
  PluginRtm = "plugin:rtm",
4122
4414
  PluginXgvideo = "plugin:xgvideo",
@@ -4132,6 +4424,7 @@ declare namespace strategy {
4132
4424
  [DynamicModule.PluginMp4]: Exports;
4133
4425
  [DynamicModule.PluginHls]: Exports;
4134
4426
  [DynamicModule.PluginHlsJs]: Exports;
4427
+ [DynamicModule.PluginDashJs]: Exports;
4135
4428
  [DynamicModule.PluginShaka]: Exports;
4136
4429
  [DynamicModule.PluginRtm]: Exports;
4137
4430
  [DynamicModule.PluginXgvideo]: Exports;
@@ -4355,6 +4648,15 @@ declare namespace error {
4355
4648
  MEDIA_ERR_URL_EMPTY: string;
4356
4649
  DRM: string;
4357
4650
  DRM_LICENSE: string;
4651
+ DRM_UNSUPPORTED: string;
4652
+ DRM_NO_MEDIA_KEY: string;
4653
+ DRM_NO_KEY_SESSION: string;
4654
+ DRM_GENERATE_QUEST_FAIL: string;
4655
+ DRM_LACK_SERVER_CERTIFICATE_PATH: string;
4656
+ DRM_LACK_SERVER_PROCESS_SPC_PATH: string;
4657
+ DRM_LICENSE_FAIL: string;
4658
+ DRM_KEY_ERROR: string;
4659
+ DRM_CERT_FAIL: string;
4358
4660
  OTHER: string;
4359
4661
  RUNTIME: string;
4360
4662
  MODULE_LOAD_ERROR: string;
@@ -4415,6 +4717,15 @@ declare namespace error {
4415
4717
  MEDIA_ERR_URL_EMPTY: string;
4416
4718
  DRM: string;
4417
4719
  DRM_LICENSE: string;
4720
+ DRM_UNSUPPORTED: string;
4721
+ DRM_NO_MEDIA_KEY: string;
4722
+ DRM_NO_KEY_SESSION: string;
4723
+ DRM_GENERATE_QUEST_FAIL: string;
4724
+ DRM_LACK_SERVER_CERTIFICATE_PATH: string;
4725
+ DRM_LACK_SERVER_PROCESS_SPC_PATH: string;
4726
+ DRM_LICENSE_FAIL: string;
4727
+ DRM_KEY_ERROR: string;
4728
+ DRM_CERT_FAIL: string;
4418
4729
  OTHER: string;
4419
4730
  RUNTIME: string;
4420
4731
  MODULE_LOAD_ERROR: string;
@@ -4507,12 +4818,6 @@ declare namespace error {
4507
4818
  */
4508
4819
  Warn = "Warn"
4509
4820
  }
4510
- /** {zh}
4511
- * @id ErrorCodeRaw
4512
- */
4513
- /** {en}
4514
- * @id ErrorCodeRaw
4515
- */
4516
4821
  enum ErrorCode {
4517
4822
  /** {zh}
4518
4823
  * @brief 视频解析错误
@@ -4779,6 +5084,69 @@ declare namespace error {
4779
5084
  * @solution Verify the authentication and ensure proper playback permissions.
4780
5085
  */
4781
5086
  DRM_LICENSE = 7100,
5087
+ /** {zh}
5088
+ * @brief 不支持 DRM 加密播放
5089
+ */
5090
+ /** {en}
5091
+ * @brief DRM encrypted playback is not supported
5092
+ */
5093
+ DRM_UNSUPPORTED = 7101,
5094
+ /** {zh}
5095
+ * @brief 视频数据缺少相应 MediaKey
5096
+ */
5097
+ /** {en}
5098
+ * @brief Video data lacks the corresponding MediaKey
5099
+ */
5100
+ DRM_NO_MEDIA_KEY = 7103,
5101
+ /** {zh}
5102
+ * @brief 浏览器不支持相应 DRM KeySession
5103
+ */
5104
+ /** {en}
5105
+ * @brief Browser does not support the corresponding DRM KeySession
5106
+ */
5107
+ DRM_NO_KEY_SESSION = 7104,
5108
+ /** {zh}
5109
+ * @brief 解密播放错误
5110
+ */
5111
+ /** {en}
5112
+ * @brief Decryption playback error
5113
+ */
5114
+ DRM_GENERATE_QUEST_FAIL = 7105,
5115
+ /** {zh}
5116
+ * @brief 缺少 DRM 证书请求链接
5117
+ */
5118
+ /** {en}
5119
+ * @brief Missing DRM certificate request link
5120
+ */
5121
+ DRM_LACK_SERVER_CERTIFICATE_PATH = 7106,
5122
+ /** {zh}
5123
+ * @brief 缺少 DRM License 请求链接
5124
+ */
5125
+ /** {en}
5126
+ * @brief Missing DRM License request link
5127
+ */
5128
+ DRM_LACK_SERVER_PROCESS_SPC_PATH = 7107,
5129
+ /** {zh}
5130
+ * @brief 请求或更新 License 失败
5131
+ */
5132
+ /** {en}
5133
+ * @brief Request or update License failed
5134
+ */
5135
+ DRM_LICENSE_FAIL = 7108,
5136
+ /** {zh}
5137
+ * @brief 解密错误
5138
+ */
5139
+ /** {en}
5140
+ * @brief Decryption error
5141
+ */
5142
+ DRM_KEY_ERROR = 7109,
5143
+ /** {zh}
5144
+ * @brief 请求 DRM 证书失败'
5145
+ */
5146
+ /** {en}
5147
+ * @brief Request for DRM certificate failed'
5148
+ */
5149
+ DRM_CERT_FAIL = 7110,
4782
5150
  /** {zh}
4783
5151
  * @brief DRM 权限校验失败
4784
5152
  * @hidden
@@ -4825,7 +5193,7 @@ declare namespace error {
4825
5193
  * @brief A playback issue occurred.
4826
5194
  * @solution Check the live stream source or [contact support](https://console.byteplus.com/auth/login?redirectURI=%2Fworkorder%2Fcreate).
4827
5195
  */
4828
- RUNTIME_BWAITING_TIMEOUT_ERROR = 9002,
5196
+ RUNTIME_WAITING_TIMEOUT_ERROR = 9003,
4829
5197
  // veplayer 报错
4830
5198
  /** {zh}
4831
5199
  * @brief CDN 异步获取失败
@@ -4924,8 +5292,8 @@ declare namespace error {
4924
5292
  */
4925
5293
  constructor(error?: string | ErrorInfo<T>, i18n?: VeI18n<T>);
4926
5294
  }
4927
- function create(errorCode: ErrorCode, info?: ErrorInfo, i18n?: VeI18n): VeError<"DEFINITION_FALLBACK_TOAST" | "DEFINITION_SWITCHING" | "ERROR_REFRESH" | "UNMUTE" | "MANIFEST" | "NETWORK" | "NETWORK_TIMEOUT" | "NETWORK_FORBIDDEN" | "NETWORK_NOTFOUND" | "DEMUX" | "REMUX" | "MEDIA" | "MEDIA_ERR_CODEC_NOT_SUPPORTED" | "MEDIA_ERR_URL_EMPTY" | "DRM" | "DRM_LICENSE" | "OTHER" | "RUNTIME" | "MODULE_LOAD_ERROR" | "UNKNOWN" | "ERROR_TYPES" | "HAVE_NOTHING" | "HAVE_METADATA" | "HAVE_CURRENT_DATA" | "HAVE_FUTURE_DATA" | "HAVE_ENOUGH_DATA" | "NETWORK_EMPTY" | "NETWORK_IDLE" | "NETWORK_LOADING" | "NETWORK_NO_SOURCE" | "MEDIA_ERR_ABORTED" | "MEDIA_ERR_NETWORK" | "MEDIA_ERR_DECODE" | "MEDIA_ERR_SRC_NOT_SUPPORTED" | "REPLAY" | "ERROR" | "PLAY_TIPS" | "PAUSE_TIPS" | "PLAYNEXT_TIPS" | "DOWNLOAD_TIPS" | "ROTATE_TIPS" | "RELOAD_TIPS" | "FULLSCREEN_TIPS" | "EXITFULLSCREEN_TIPS" | "CSSFULLSCREEN_TIPS" | "EXITCSSFULLSCREEN_TIPS" | "TEXTTRACK" | "PIP" | "SCREENSHOT" | "LIVE" | "OFF" | "OPEN" | "MINI_DRAG" | "MINISCREEN" | "REFRESH_TIPS" | "REFRESH" | "FORWARD" | "LIVE_TIP">;
4928
- function transform(xgErr: XGError, i18n?: VeI18n): VeError<"DEFINITION_FALLBACK_TOAST" | "DEFINITION_SWITCHING" | "ERROR_REFRESH" | "UNMUTE" | "MANIFEST" | "NETWORK" | "NETWORK_TIMEOUT" | "NETWORK_FORBIDDEN" | "NETWORK_NOTFOUND" | "DEMUX" | "REMUX" | "MEDIA" | "MEDIA_ERR_CODEC_NOT_SUPPORTED" | "MEDIA_ERR_URL_EMPTY" | "DRM" | "DRM_LICENSE" | "OTHER" | "RUNTIME" | "MODULE_LOAD_ERROR" | "UNKNOWN" | "ERROR_TYPES" | "HAVE_NOTHING" | "HAVE_METADATA" | "HAVE_CURRENT_DATA" | "HAVE_FUTURE_DATA" | "HAVE_ENOUGH_DATA" | "NETWORK_EMPTY" | "NETWORK_IDLE" | "NETWORK_LOADING" | "NETWORK_NO_SOURCE" | "MEDIA_ERR_ABORTED" | "MEDIA_ERR_NETWORK" | "MEDIA_ERR_DECODE" | "MEDIA_ERR_SRC_NOT_SUPPORTED" | "REPLAY" | "ERROR" | "PLAY_TIPS" | "PAUSE_TIPS" | "PLAYNEXT_TIPS" | "DOWNLOAD_TIPS" | "ROTATE_TIPS" | "RELOAD_TIPS" | "FULLSCREEN_TIPS" | "EXITFULLSCREEN_TIPS" | "CSSFULLSCREEN_TIPS" | "EXITCSSFULLSCREEN_TIPS" | "TEXTTRACK" | "PIP" | "SCREENSHOT" | "LIVE" | "OFF" | "OPEN" | "MINI_DRAG" | "MINISCREEN" | "REFRESH_TIPS" | "REFRESH" | "FORWARD" | "LIVE_TIP">;
5295
+ function create(errorCode: ErrorCode, info?: ErrorInfo, i18n?: VeI18n): VeError<"DEFINITION_FALLBACK_TOAST" | "DEFINITION_SWITCHING" | "ERROR_REFRESH" | "UNMUTE" | "MANIFEST" | "NETWORK" | "NETWORK_TIMEOUT" | "NETWORK_FORBIDDEN" | "NETWORK_NOTFOUND" | "DEMUX" | "REMUX" | "MEDIA" | "MEDIA_ERR_CODEC_NOT_SUPPORTED" | "MEDIA_ERR_URL_EMPTY" | "DRM" | "DRM_LICENSE" | "DRM_UNSUPPORTED" | "DRM_NO_MEDIA_KEY" | "DRM_NO_KEY_SESSION" | "DRM_GENERATE_QUEST_FAIL" | "DRM_LACK_SERVER_CERTIFICATE_PATH" | "DRM_LACK_SERVER_PROCESS_SPC_PATH" | "DRM_LICENSE_FAIL" | "DRM_KEY_ERROR" | "DRM_CERT_FAIL" | "OTHER" | "RUNTIME" | "MODULE_LOAD_ERROR" | "UNKNOWN" | "ERROR_TYPES" | "HAVE_NOTHING" | "HAVE_METADATA" | "HAVE_CURRENT_DATA" | "HAVE_FUTURE_DATA" | "HAVE_ENOUGH_DATA" | "NETWORK_EMPTY" | "NETWORK_IDLE" | "NETWORK_LOADING" | "NETWORK_NO_SOURCE" | "MEDIA_ERR_ABORTED" | "MEDIA_ERR_NETWORK" | "MEDIA_ERR_DECODE" | "MEDIA_ERR_SRC_NOT_SUPPORTED" | "REPLAY" | "ERROR" | "PLAY_TIPS" | "PAUSE_TIPS" | "PLAYNEXT_TIPS" | "DOWNLOAD_TIPS" | "ROTATE_TIPS" | "RELOAD_TIPS" | "FULLSCREEN_TIPS" | "EXITFULLSCREEN_TIPS" | "CSSFULLSCREEN_TIPS" | "EXITCSSFULLSCREEN_TIPS" | "TEXTTRACK" | "PIP" | "SCREENSHOT" | "LIVE" | "OFF" | "OPEN" | "MINI_DRAG" | "MINISCREEN" | "REFRESH_TIPS" | "REFRESH" | "FORWARD" | "LIVE_TIP">;
5296
+ function transform(xgErr: XGError, i18n?: VeI18n): VeError<"DEFINITION_FALLBACK_TOAST" | "DEFINITION_SWITCHING" | "ERROR_REFRESH" | "UNMUTE" | "MANIFEST" | "NETWORK" | "NETWORK_TIMEOUT" | "NETWORK_FORBIDDEN" | "NETWORK_NOTFOUND" | "DEMUX" | "REMUX" | "MEDIA" | "MEDIA_ERR_CODEC_NOT_SUPPORTED" | "MEDIA_ERR_URL_EMPTY" | "DRM" | "DRM_LICENSE" | "DRM_UNSUPPORTED" | "DRM_NO_MEDIA_KEY" | "DRM_NO_KEY_SESSION" | "DRM_GENERATE_QUEST_FAIL" | "DRM_LACK_SERVER_CERTIFICATE_PATH" | "DRM_LACK_SERVER_PROCESS_SPC_PATH" | "DRM_LICENSE_FAIL" | "DRM_KEY_ERROR" | "DRM_CERT_FAIL" | "OTHER" | "RUNTIME" | "MODULE_LOAD_ERROR" | "UNKNOWN" | "ERROR_TYPES" | "HAVE_NOTHING" | "HAVE_METADATA" | "HAVE_CURRENT_DATA" | "HAVE_FUTURE_DATA" | "HAVE_ENOUGH_DATA" | "NETWORK_EMPTY" | "NETWORK_IDLE" | "NETWORK_LOADING" | "NETWORK_NO_SOURCE" | "MEDIA_ERR_ABORTED" | "MEDIA_ERR_NETWORK" | "MEDIA_ERR_DECODE" | "MEDIA_ERR_SRC_NOT_SUPPORTED" | "REPLAY" | "ERROR" | "PLAY_TIPS" | "PAUSE_TIPS" | "PLAYNEXT_TIPS" | "DOWNLOAD_TIPS" | "ROTATE_TIPS" | "RELOAD_TIPS" | "FULLSCREEN_TIPS" | "EXITFULLSCREEN_TIPS" | "CSSFULLSCREEN_TIPS" | "EXITCSSFULLSCREEN_TIPS" | "TEXTTRACK" | "PIP" | "SCREENSHOT" | "LIVE" | "OFF" | "OPEN" | "MINI_DRAG" | "MINISCREEN" | "REFRESH_TIPS" | "REFRESH" | "FORWARD" | "LIVE_TIP">;
4929
5297
  }
4930
5298
  declare namespace event {
4931
5299
  const BaseEvents: {
@@ -5324,7 +5692,7 @@ type StrategyInitOptions<T = Record<string, Partial<VeStrategyConfig> | boolean>
5324
5692
  /** {en}
5325
5693
  * @brief 应用ID
5326
5694
  */
5327
- appId: number;
5695
+ appId: number | string;
5328
5696
  /**
5329
5697
  * 高级能力(策略)配置
5330
5698
  * @brief 策略配置
@@ -5353,6 +5721,7 @@ type StrategyInitOptions<T = Record<string, Partial<VeStrategyConfig> | boolean>
5353
5721
  * @brief 策略Module,默认自动加载
5354
5722
  */
5355
5723
  Module?: typeof VeStrategy;
5724
+ type?: "VOD" | "LIVE"; // 视频类型,默认VOD
5356
5725
  };
5357
5726
  interface Config$1 {
5358
5727
  /**
@@ -5477,6 +5846,7 @@ declare abstract class BaseProtocol {
5477
5846
  abstract getVeStrategy(options: VePlayerBaseOptions, config?: {
5478
5847
  veStrategyManager?: VeStrategyManager;
5479
5848
  }): Promise<Strategy> | undefined;
5849
+ abstract updateDrmConfig(drmConfig: any, player?: VePlayerBase): void;
5480
5850
  }
5481
5851
  type Strategy = {
5482
5852
  options?: undefined;
@@ -5512,6 +5882,15 @@ declare class ProtocolManager {
5512
5882
  private _init;
5513
5883
  private _initSingleProtocol;
5514
5884
  }
5885
+ interface PrepareOptions {
5886
+ appId: string;
5887
+ userId?: string;
5888
+ deviceId?: string;
5889
+ strategies: RtmAdaptiveBufferStrategy;
5890
+ }
5891
+ type RtmAdaptiveBufferStrategy = {
5892
+ rtmAdaptiveBuffer?: boolean;
5893
+ };
5515
5894
  /** {zh}
5516
5895
  * @list option
5517
5896
  * @kind property
@@ -5813,6 +6192,8 @@ interface Drm {
5813
6192
  * @brief FairPlay DRM configurations.
5814
6193
  */
5815
6194
  fairplay?: FairplayDrm;
6195
+ widevine?: WidevineDrm;
6196
+ playready?: PlayreadyDrm;
5816
6197
  }
5817
6198
  /** {zh}
5818
6199
  * @list option
@@ -5822,20 +6203,21 @@ interface Drm {
5822
6203
  * @list option
5823
6204
  * @kind property
5824
6205
  */
5825
- interface FairplayDrm extends FairplayDrmConfig {
6206
+ interface FairplayDrm {
5826
6207
  /** {zh}
5827
- * @brief 获取 DRM 配置的方法,用于更新 DRM 配置。
5828
- * @param config
5829
- * @returns 证书的请求地址和内容密钥许可证的请求地址。
6208
+ * @brief 获取证书的请求地址。
5830
6209
  */
5831
6210
  /** {en}
5832
- * @brief Gets DRM configurations.
5833
- * @param config
5834
- * @returns URLs used to get the DRM license and FairPlay streaming certificate.
6211
+ * @brief URL used to acquire the FairPlay certificate.
5835
6212
  */
5836
- getDrmConfig?: (config: {
5837
- url: string;
5838
- }) => Promise<FairplayDrmConfig>;
6213
+ serverCertificatePath?: string;
6214
+ /** {zh}
6215
+ * @brief 获取内容密钥许可证的请求地址。
6216
+ */
6217
+ /** {en}
6218
+ * @brief URL used to acquire the DRM license.
6219
+ */
6220
+ serverProcessSPCPath?: string;
5839
6221
  }
5840
6222
  /** {zh}
5841
6223
  * @list option
@@ -5845,14 +6227,35 @@ interface FairplayDrm extends FairplayDrmConfig {
5845
6227
  * @list option
5846
6228
  * @kind property
5847
6229
  */
5848
- interface FairplayDrmConfig {
6230
+ interface WidevineDrm {
5849
6231
  /** {zh}
5850
- * @brief 获取证书的请求地址。
6232
+ * @hidden
5851
6233
  */
5852
6234
  /** {en}
5853
- * @brief URL used to acquire the FairPlay certificate.
6235
+ * @hidden
5854
6236
  */
5855
- serverCertificatePath?: string;
6237
+ // [x: string]: string | undefined;
6238
+ /** {zh}
6239
+ * @brief 获取内容密钥许可证的请求地址。
6240
+ */
6241
+ /** {en}
6242
+ * @brief URL used to acquire the DRM license.
6243
+ */
6244
+ serverProcessSPCPath?: string;
6245
+ }
6246
+ /** {zh}
6247
+ * @list option
6248
+ * @kind property
6249
+ */
6250
+ /** {en}
6251
+ * @list option
6252
+ * @kind property
6253
+ */
6254
+ interface PlayreadyDrm {
6255
+ /**
6256
+ * @hidden
6257
+ */
6258
+ // [x: string]: string | undefined;
5856
6259
  /** {zh}
5857
6260
  * @brief 获取内容密钥许可证的请求地址。
5858
6261
  */
@@ -5999,10 +6402,12 @@ interface Rtm {
5999
6402
  /** {zh}
6000
6403
  * @brief 当前环境不支持播放 RTM 或者 RTM 拉流播放失败时是否进行降级。
6001
6404
  * @default true
6405
+ * @hidden
6002
6406
  */
6003
6407
  /** {en}
6004
6408
  * @brief Whether to fall back to other protocols when RTM is not supported or an error occurs when playing an RTM stream.
6005
6409
  * @default true
6410
+ * @hidden
6006
6411
  */
6007
6412
  enableFallback?: boolean;
6008
6413
  /** {zh}
@@ -6109,6 +6514,19 @@ interface Rtm {
6109
6514
  * @brief buffer delay to handle network jitter, in seconds.
6110
6515
  */
6111
6516
  delayHint?: number;
6517
+ /** {zh}
6518
+ * @brief RTM 建联后将在达到该阈值后检测数据接收是否异常,如果异常则播放器报错,单位毫秒。
6519
+ * @default 5000
6520
+ */
6521
+ /** {en}
6522
+ * @brief After RTM connection is established, the system will detect abnormal data reception once the threshold (in milliseconds) is reached. If anomalies occur, the player triggers an error.
6523
+ * @default 5000
6524
+ */
6525
+ checkStatsErrorDelay?: number;
6526
+ /** {zh}
6527
+ * @brief 是否打开 RTM SEI
6528
+ */
6529
+ enableSei?: boolean;
6112
6530
  }
6113
6531
  /** {zh}
6114
6532
  * @list option
@@ -6826,7 +7244,7 @@ declare class VePlayerLive extends VePlayerBase {
6826
7244
  * @brief Use this method to update DRM configuration.
6827
7245
  * @param config A configuration object containing settings for Fairplay DRM.
6828
7246
  */
6829
- updateDrmConfig(config: FairplayDrmConfig): void;
7247
+ updateDrmConfig(config: Drm): Promise<void | undefined>;
6830
7248
  /** {zh}
6831
7249
  * @brief 修改 ABR 配置,包含修改是否开启 ABR 功能,和修改其他清晰度。
6832
7250
  * @param options ABR 的配置。
@@ -7040,6 +7458,15 @@ declare namespace live {
7040
7458
  MEDIA_ERR_URL_EMPTY: string;
7041
7459
  DRM: string;
7042
7460
  DRM_LICENSE: string;
7461
+ DRM_UNSUPPORTED: string;
7462
+ DRM_NO_MEDIA_KEY: string;
7463
+ DRM_NO_KEY_SESSION: string;
7464
+ DRM_GENERATE_QUEST_FAIL: string;
7465
+ DRM_LACK_SERVER_CERTIFICATE_PATH: string;
7466
+ DRM_LACK_SERVER_PROCESS_SPC_PATH: string;
7467
+ DRM_LICENSE_FAIL: string;
7468
+ DRM_KEY_ERROR: string;
7469
+ DRM_CERT_FAIL: string;
7043
7470
  OTHER: string;
7044
7471
  RUNTIME: string;
7045
7472
  MODULE_LOAD_ERROR: string;
@@ -7100,6 +7527,15 @@ declare namespace live {
7100
7527
  MEDIA_ERR_URL_EMPTY: string;
7101
7528
  DRM: string;
7102
7529
  DRM_LICENSE: string;
7530
+ DRM_UNSUPPORTED: string;
7531
+ DRM_NO_MEDIA_KEY: string;
7532
+ DRM_NO_KEY_SESSION: string;
7533
+ DRM_GENERATE_QUEST_FAIL: string;
7534
+ DRM_LACK_SERVER_CERTIFICATE_PATH: string;
7535
+ DRM_LACK_SERVER_PROCESS_SPC_PATH: string;
7536
+ DRM_LICENSE_FAIL: string;
7537
+ DRM_KEY_ERROR: string;
7538
+ DRM_CERT_FAIL: string;
7103
7539
  OTHER: string;
7104
7540
  RUNTIME: string;
7105
7541
  MODULE_LOAD_ERROR: string;
@@ -7496,12 +7932,6 @@ declare namespace live {
7496
7932
  */
7497
7933
  Warn = "Warn"
7498
7934
  }
7499
- /** {zh}
7500
- * @id ErrorCodeRaw
7501
- */
7502
- /** {en}
7503
- * @id ErrorCodeRaw
7504
- */
7505
7935
  enum ErrorCode {
7506
7936
  /** {zh}
7507
7937
  * @brief 视频解析错误
@@ -7768,6 +8198,69 @@ declare namespace live {
7768
8198
  * @solution Verify the authentication and ensure proper playback permissions.
7769
8199
  */
7770
8200
  DRM_LICENSE = 7100,
8201
+ /** {zh}
8202
+ * @brief 不支持 DRM 加密播放
8203
+ */
8204
+ /** {en}
8205
+ * @brief DRM encrypted playback is not supported
8206
+ */
8207
+ DRM_UNSUPPORTED = 7101,
8208
+ /** {zh}
8209
+ * @brief 视频数据缺少相应 MediaKey
8210
+ */
8211
+ /** {en}
8212
+ * @brief Video data lacks the corresponding MediaKey
8213
+ */
8214
+ DRM_NO_MEDIA_KEY = 7103,
8215
+ /** {zh}
8216
+ * @brief 浏览器不支持相应 DRM KeySession
8217
+ */
8218
+ /** {en}
8219
+ * @brief Browser does not support the corresponding DRM KeySession
8220
+ */
8221
+ DRM_NO_KEY_SESSION = 7104,
8222
+ /** {zh}
8223
+ * @brief 解密播放错误
8224
+ */
8225
+ /** {en}
8226
+ * @brief Decryption playback error
8227
+ */
8228
+ DRM_GENERATE_QUEST_FAIL = 7105,
8229
+ /** {zh}
8230
+ * @brief 缺少 DRM 证书请求链接
8231
+ */
8232
+ /** {en}
8233
+ * @brief Missing DRM certificate request link
8234
+ */
8235
+ DRM_LACK_SERVER_CERTIFICATE_PATH = 7106,
8236
+ /** {zh}
8237
+ * @brief 缺少 DRM License 请求链接
8238
+ */
8239
+ /** {en}
8240
+ * @brief Missing DRM License request link
8241
+ */
8242
+ DRM_LACK_SERVER_PROCESS_SPC_PATH = 7107,
8243
+ /** {zh}
8244
+ * @brief 请求或更新 License 失败
8245
+ */
8246
+ /** {en}
8247
+ * @brief Request or update License failed
8248
+ */
8249
+ DRM_LICENSE_FAIL = 7108,
8250
+ /** {zh}
8251
+ * @brief 解密错误
8252
+ */
8253
+ /** {en}
8254
+ * @brief Decryption error
8255
+ */
8256
+ DRM_KEY_ERROR = 7109,
8257
+ /** {zh}
8258
+ * @brief 请求 DRM 证书失败'
8259
+ */
8260
+ /** {en}
8261
+ * @brief Request for DRM certificate failed'
8262
+ */
8263
+ DRM_CERT_FAIL = 7110,
7771
8264
  /** {zh}
7772
8265
  * @brief DRM 权限校验失败
7773
8266
  * @hidden
@@ -7814,7 +8307,7 @@ declare namespace live {
7814
8307
  * @brief A playback issue occurred.
7815
8308
  * @solution Check the live stream source or [contact support](https://console.byteplus.com/auth/login?redirectURI=%2Fworkorder%2Fcreate).
7816
8309
  */
7817
- RUNTIME_BWAITING_TIMEOUT_ERROR = 9002,
8310
+ RUNTIME_WAITING_TIMEOUT_ERROR = 9003,
7818
8311
  // veplayer 报错
7819
8312
  /** {zh}
7820
8313
  * @brief CDN 异步获取失败
@@ -7913,8 +8406,8 @@ declare namespace live {
7913
8406
  */
7914
8407
  constructor(error?: string | ErrorInfo<T>, i18n?: VeI18n<T>);
7915
8408
  }
7916
- function create(errorCode: ErrorCode, info?: ErrorInfo, i18n?: VeI18n): VeError<"DEFINITION_FALLBACK_TOAST" | "DEFINITION_SWITCHING" | "ERROR_REFRESH" | "UNMUTE" | "MANIFEST" | "NETWORK" | "NETWORK_TIMEOUT" | "NETWORK_FORBIDDEN" | "NETWORK_NOTFOUND" | "DEMUX" | "REMUX" | "MEDIA" | "MEDIA_ERR_CODEC_NOT_SUPPORTED" | "MEDIA_ERR_URL_EMPTY" | "DRM" | "DRM_LICENSE" | "OTHER" | "RUNTIME" | "MODULE_LOAD_ERROR" | "UNKNOWN" | "ERROR_TYPES" | "HAVE_NOTHING" | "HAVE_METADATA" | "HAVE_CURRENT_DATA" | "HAVE_FUTURE_DATA" | "HAVE_ENOUGH_DATA" | "NETWORK_EMPTY" | "NETWORK_IDLE" | "NETWORK_LOADING" | "NETWORK_NO_SOURCE" | "MEDIA_ERR_ABORTED" | "MEDIA_ERR_NETWORK" | "MEDIA_ERR_DECODE" | "MEDIA_ERR_SRC_NOT_SUPPORTED" | "REPLAY" | "ERROR" | "PLAY_TIPS" | "PAUSE_TIPS" | "PLAYNEXT_TIPS" | "DOWNLOAD_TIPS" | "ROTATE_TIPS" | "RELOAD_TIPS" | "FULLSCREEN_TIPS" | "EXITFULLSCREEN_TIPS" | "CSSFULLSCREEN_TIPS" | "EXITCSSFULLSCREEN_TIPS" | "TEXTTRACK" | "PIP" | "SCREENSHOT" | "LIVE" | "OFF" | "OPEN" | "MINI_DRAG" | "MINISCREEN" | "REFRESH_TIPS" | "REFRESH" | "FORWARD" | "LIVE_TIP">;
7917
- function transform(xgErr: XGError, i18n?: VeI18n): VeError<"DEFINITION_FALLBACK_TOAST" | "DEFINITION_SWITCHING" | "ERROR_REFRESH" | "UNMUTE" | "MANIFEST" | "NETWORK" | "NETWORK_TIMEOUT" | "NETWORK_FORBIDDEN" | "NETWORK_NOTFOUND" | "DEMUX" | "REMUX" | "MEDIA" | "MEDIA_ERR_CODEC_NOT_SUPPORTED" | "MEDIA_ERR_URL_EMPTY" | "DRM" | "DRM_LICENSE" | "OTHER" | "RUNTIME" | "MODULE_LOAD_ERROR" | "UNKNOWN" | "ERROR_TYPES" | "HAVE_NOTHING" | "HAVE_METADATA" | "HAVE_CURRENT_DATA" | "HAVE_FUTURE_DATA" | "HAVE_ENOUGH_DATA" | "NETWORK_EMPTY" | "NETWORK_IDLE" | "NETWORK_LOADING" | "NETWORK_NO_SOURCE" | "MEDIA_ERR_ABORTED" | "MEDIA_ERR_NETWORK" | "MEDIA_ERR_DECODE" | "MEDIA_ERR_SRC_NOT_SUPPORTED" | "REPLAY" | "ERROR" | "PLAY_TIPS" | "PAUSE_TIPS" | "PLAYNEXT_TIPS" | "DOWNLOAD_TIPS" | "ROTATE_TIPS" | "RELOAD_TIPS" | "FULLSCREEN_TIPS" | "EXITFULLSCREEN_TIPS" | "CSSFULLSCREEN_TIPS" | "EXITCSSFULLSCREEN_TIPS" | "TEXTTRACK" | "PIP" | "SCREENSHOT" | "LIVE" | "OFF" | "OPEN" | "MINI_DRAG" | "MINISCREEN" | "REFRESH_TIPS" | "REFRESH" | "FORWARD" | "LIVE_TIP">;
8409
+ function create(errorCode: ErrorCode, info?: ErrorInfo, i18n?: VeI18n): VeError<"DEFINITION_FALLBACK_TOAST" | "DEFINITION_SWITCHING" | "ERROR_REFRESH" | "UNMUTE" | "MANIFEST" | "NETWORK" | "NETWORK_TIMEOUT" | "NETWORK_FORBIDDEN" | "NETWORK_NOTFOUND" | "DEMUX" | "REMUX" | "MEDIA" | "MEDIA_ERR_CODEC_NOT_SUPPORTED" | "MEDIA_ERR_URL_EMPTY" | "DRM" | "DRM_LICENSE" | "DRM_UNSUPPORTED" | "DRM_NO_MEDIA_KEY" | "DRM_NO_KEY_SESSION" | "DRM_GENERATE_QUEST_FAIL" | "DRM_LACK_SERVER_CERTIFICATE_PATH" | "DRM_LACK_SERVER_PROCESS_SPC_PATH" | "DRM_LICENSE_FAIL" | "DRM_KEY_ERROR" | "DRM_CERT_FAIL" | "OTHER" | "RUNTIME" | "MODULE_LOAD_ERROR" | "UNKNOWN" | "ERROR_TYPES" | "HAVE_NOTHING" | "HAVE_METADATA" | "HAVE_CURRENT_DATA" | "HAVE_FUTURE_DATA" | "HAVE_ENOUGH_DATA" | "NETWORK_EMPTY" | "NETWORK_IDLE" | "NETWORK_LOADING" | "NETWORK_NO_SOURCE" | "MEDIA_ERR_ABORTED" | "MEDIA_ERR_NETWORK" | "MEDIA_ERR_DECODE" | "MEDIA_ERR_SRC_NOT_SUPPORTED" | "REPLAY" | "ERROR" | "PLAY_TIPS" | "PAUSE_TIPS" | "PLAYNEXT_TIPS" | "DOWNLOAD_TIPS" | "ROTATE_TIPS" | "RELOAD_TIPS" | "FULLSCREEN_TIPS" | "EXITFULLSCREEN_TIPS" | "CSSFULLSCREEN_TIPS" | "EXITCSSFULLSCREEN_TIPS" | "TEXTTRACK" | "PIP" | "SCREENSHOT" | "LIVE" | "OFF" | "OPEN" | "MINI_DRAG" | "MINISCREEN" | "REFRESH_TIPS" | "REFRESH" | "FORWARD" | "LIVE_TIP">;
8410
+ function transform(xgErr: XGError, i18n?: VeI18n): VeError<"DEFINITION_FALLBACK_TOAST" | "DEFINITION_SWITCHING" | "ERROR_REFRESH" | "UNMUTE" | "MANIFEST" | "NETWORK" | "NETWORK_TIMEOUT" | "NETWORK_FORBIDDEN" | "NETWORK_NOTFOUND" | "DEMUX" | "REMUX" | "MEDIA" | "MEDIA_ERR_CODEC_NOT_SUPPORTED" | "MEDIA_ERR_URL_EMPTY" | "DRM" | "DRM_LICENSE" | "DRM_UNSUPPORTED" | "DRM_NO_MEDIA_KEY" | "DRM_NO_KEY_SESSION" | "DRM_GENERATE_QUEST_FAIL" | "DRM_LACK_SERVER_CERTIFICATE_PATH" | "DRM_LACK_SERVER_PROCESS_SPC_PATH" | "DRM_LICENSE_FAIL" | "DRM_KEY_ERROR" | "DRM_CERT_FAIL" | "OTHER" | "RUNTIME" | "MODULE_LOAD_ERROR" | "UNKNOWN" | "ERROR_TYPES" | "HAVE_NOTHING" | "HAVE_METADATA" | "HAVE_CURRENT_DATA" | "HAVE_FUTURE_DATA" | "HAVE_ENOUGH_DATA" | "NETWORK_EMPTY" | "NETWORK_IDLE" | "NETWORK_LOADING" | "NETWORK_NO_SOURCE" | "MEDIA_ERR_ABORTED" | "MEDIA_ERR_NETWORK" | "MEDIA_ERR_DECODE" | "MEDIA_ERR_SRC_NOT_SUPPORTED" | "REPLAY" | "ERROR" | "PLAY_TIPS" | "PAUSE_TIPS" | "PLAYNEXT_TIPS" | "DOWNLOAD_TIPS" | "ROTATE_TIPS" | "RELOAD_TIPS" | "FULLSCREEN_TIPS" | "EXITFULLSCREEN_TIPS" | "CSSFULLSCREEN_TIPS" | "EXITCSSFULLSCREEN_TIPS" | "TEXTTRACK" | "PIP" | "SCREENSHOT" | "LIVE" | "OFF" | "OPEN" | "MINI_DRAG" | "MINISCREEN" | "REFRESH_TIPS" | "REFRESH" | "FORWARD" | "LIVE_TIP">;
7918
8411
  /** {zh}
7919
8412
  * @list option
7920
8413
  * @kind property
@@ -8015,10 +8508,12 @@ declare namespace live {
8015
8508
  /** {zh}
8016
8509
  * @list option
8017
8510
  * @kind property
8511
+ * @hidden
8018
8512
  */
8019
8513
  /** {en}
8020
8514
  * @list option
8021
8515
  * @kind property
8516
+ * @hidden
8022
8517
  */
8023
8518
  interface DefinitionConfig {
8024
8519
  /** {zh}
@@ -8230,7 +8725,7 @@ declare namespace live {
8230
8725
  /** {en}
8231
8726
  * @brief The URL of the player's cover image.
8232
8727
  */
8233
- poster?: string;
8728
+ poster?: string | Poster;
8234
8729
  /** {zh}
8235
8730
  * @brief 为播放器设置初始显示语言,语言包不存在的情况下默认显示 'en' 语言包 。默认值为 `document.documentElement.getAttribute('lang') || navigator.language || 'zh-cn'`
8236
8731
  */
@@ -8624,6 +9119,73 @@ declare namespace live {
8624
9119
  */
8625
9120
  volumeColor?: string;
8626
9121
  }
9122
+ /** {zh}
9123
+ * @list option
9124
+ * @kind property
9125
+ */
9126
+ /** {en}
9127
+ * @list option
9128
+ * @kind property
9129
+ */
9130
+ interface Poster {
9131
+ /** {zh}
9132
+ * @brief 封面图 URL 地址。
9133
+ */
9134
+ /** {en}
9135
+ * @brief The URL of the player's cover image.
9136
+ */
9137
+ poster: string;
9138
+ /** {zh}
9139
+ * @brief 是否在播放结束之后显示封面图。
9140
+ * - `true`:播放结束之后显示封面图。
9141
+ * - `false`:播放结束之后不显示封面图。
9142
+ * @default true
9143
+ */
9144
+ /** {en}
9145
+ * @brief Whether to display the cover image after playback ends.
9146
+ * - `true`:display the cover image after playback ends.
9147
+ * - `false`:not display the cover image after playback ends.
9148
+ * @default true
9149
+ */
9150
+ isEndedShow?: boolean;
9151
+ /** {zh}
9152
+ * @brief 是否播放后再隐藏封面图。
9153
+ * - `true`:播放后隐藏,未启播时一直显示封面图。
9154
+ * - `false`:在 `play` 事件触发后隐藏封面图。
9155
+ * @default false
9156
+ */
9157
+ /** {en}
9158
+ * @brief Whether to hide the cover image after `canplay` event.
9159
+ * - `true`:hide the cover image after `canplay` event.
9160
+ * - `false`:hide the cover image after `play` event.
9161
+ * @default false
9162
+ */
9163
+ hideCanplay?: boolean;
9164
+ /** {zh}
9165
+ * @brief 是否一直显示封面图。
9166
+ * @default false
9167
+ * @hidden
9168
+ */
9169
+ /** {}
9170
+ * @hidden
9171
+ */
9172
+ notHidden?: boolean;
9173
+ /** {zh}
9174
+ * @brief 封面图填充方式。取值如下:
9175
+ * - `fixWidth`:宽度方向填充,不会被拉伸压缩。
9176
+ * - `fixHeight`:高度方向填充,不会被拉伸压缩。
9177
+ * - `cover`:完全覆盖容器,多余部分会被裁剪。
9178
+ * - `contain`:完全覆盖,与容器不匹配时会被拉伸压缩。
9179
+ */
9180
+ /** {en}
9181
+ * @brief Cover image fill mode.
9182
+ * - `fixWidth`:Fill the width of the container and crop the height if necessary.
9183
+ * - `fixHeight`:Fill the height of the container and crop the width if necessary.
9184
+ * - `cover`:Fill the entire container while keeping the original aspect ratio.
9185
+ * - `contain`:Stretch the video to fill the container.
9186
+ */
9187
+ fillMode?: "fixWidth" | "fixHeight" | "cover" | "contain";
9188
+ }
8627
9189
  type PrepareResult = {
8628
9190
  options?: Partial<VePlayerBaseOptions>;
8629
9191
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -9337,6 +9899,7 @@ declare namespace live {
9337
9899
  readonly "plugin:mp4": "veplayer.plugin.mp4.[env].[ext]";
9338
9900
  readonly "plugin:hls": "veplayer.plugin.hls.[env].[ext]";
9339
9901
  readonly "plugin:hlsjs": "veplayer.plugin.hlsjs.[env].[ext]";
9902
+ readonly "plugin:dashjs": "veplayer.plugin.dashjs.[env].[ext]";
9340
9903
  readonly "plugin:shaka": "veplayer.plugin.shaka.[env].[ext]";
9341
9904
  readonly "plugin:rtm": "veplayer.plugin.rtm.[env].[ext]";
9342
9905
  readonly "plugin:xgvideo": "veplayer.plugin.xgvideo.[env].[ext]";
@@ -9371,6 +9934,7 @@ declare namespace live {
9371
9934
  PluginMp4 = "plugin:mp4",
9372
9935
  PluginHls = "plugin:hls",
9373
9936
  PluginHlsJs = "plugin:hlsjs",
9937
+ PluginDashJs = "plugin:dashjs",
9374
9938
  PluginShaka = "plugin:shaka",
9375
9939
  PluginRtm = "plugin:rtm",
9376
9940
  PluginXgvideo = "plugin:xgvideo",
@@ -9386,6 +9950,7 @@ declare namespace live {
9386
9950
  [DynamicModule.PluginMp4]: Exports;
9387
9951
  [DynamicModule.PluginHls]: Exports;
9388
9952
  [DynamicModule.PluginHlsJs]: Exports;
9953
+ [DynamicModule.PluginDashJs]: Exports;
9389
9954
  [DynamicModule.PluginShaka]: Exports;
9390
9955
  [DynamicModule.PluginRtm]: Exports;
9391
9956
  [DynamicModule.PluginXgvideo]: Exports;
@@ -9679,9 +10244,9 @@ declare namespace live {
9679
10244
  destroy(): void;
9680
10245
  render(): string;
9681
10246
  }
9682
- const DEFAULT_PC_PLUGINS: (typeof Error | typeof Toast | typeof Sources | typeof DefinitionPlugin | typeof Autoplay | typeof TopRightBar | typeof Play | typeof FullScreen | typeof Volume | typeof MiniScreen | typeof PIPIcon | typeof Poster | typeof Start | typeof Loading | typeof Enter | typeof Keyboard | typeof PC)[];
9683
- const DEFAULT_MOBILE_PLUGINS: (typeof Error | typeof Toast | typeof Sources | typeof DefinitionPlugin | typeof Autoplay | typeof TopRightBar | typeof Play | typeof FullScreen | typeof Volume | typeof MiniScreen | typeof PIPIcon | typeof Poster | typeof Start | typeof Loading | typeof Enter | typeof Mobile)[];
9684
- const DEFAULT_PLUGINS: (typeof Error | typeof Toast | typeof Sources | typeof DefinitionPlugin | typeof Autoplay | typeof TopRightBar | typeof Play | typeof FullScreen | typeof Volume | typeof MiniScreen | typeof PIPIcon | typeof Poster | typeof Start | typeof Loading | typeof Enter | typeof Keyboard | typeof PC)[] | (typeof Error | typeof Toast | typeof Sources | typeof DefinitionPlugin | typeof Autoplay | typeof TopRightBar | typeof Play | typeof FullScreen | typeof Volume | typeof MiniScreen | typeof PIPIcon | typeof Poster | typeof Start | typeof Loading | typeof Enter | typeof Mobile)[];
10247
+ const DEFAULT_PC_PLUGINS: (typeof Error | typeof Toast | typeof Sources | typeof DefinitionPlugin | typeof Autoplay | typeof TopRightBar | typeof Play | typeof FullScreen | typeof Volume | typeof MiniScreen | typeof PIPIcon | typeof Poster$0 | typeof Start | typeof Loading | typeof Enter | typeof Keyboard | typeof PC)[];
10248
+ const DEFAULT_MOBILE_PLUGINS: (typeof Error | typeof Toast | typeof Sources | typeof DefinitionPlugin | typeof Autoplay | typeof TopRightBar | typeof Play | typeof FullScreen | typeof Volume | typeof MiniScreen | typeof PIPIcon | typeof Poster$0 | typeof Start | typeof Loading | typeof Enter | typeof Mobile)[];
10249
+ const DEFAULT_PLUGINS: (typeof Error | typeof Toast | typeof Sources | typeof DefinitionPlugin | typeof Autoplay | typeof TopRightBar | typeof Play | typeof FullScreen | typeof Volume | typeof MiniScreen | typeof PIPIcon | typeof Poster$0 | typeof Start | typeof Loading | typeof Enter | typeof Keyboard | typeof PC)[] | (typeof Error | typeof Toast | typeof Sources | typeof DefinitionPlugin | typeof Autoplay | typeof TopRightBar | typeof Play | typeof FullScreen | typeof Volume | typeof MiniScreen | typeof PIPIcon | typeof Poster$0 | typeof Start | typeof Loading | typeof Enter | typeof Mobile)[];
9685
10250
  interface Options$0 {
9686
10251
  url?: string;
9687
10252
  defaultDefinition?: string;
@@ -9934,7 +10499,7 @@ declare namespace live {
9934
10499
  /** {en}
9935
10500
  * @brief 应用ID
9936
10501
  */
9937
- appId: number;
10502
+ appId: number | string;
9938
10503
  /**
9939
10504
  * 高级能力(策略)配置
9940
10505
  * @brief 策略配置
@@ -9963,6 +10528,7 @@ declare namespace live {
9963
10528
  * @brief 策略Module,默认自动加载
9964
10529
  */
9965
10530
  Module?: typeof VeStrategy;
10531
+ type?: "VOD" | "LIVE"; // 视频类型,默认VOD
9966
10532
  };
9967
10533
  /** {zh}
9968
10534
  * 预加载模块状态
@@ -10113,6 +10679,7 @@ declare namespace live {
10113
10679
  abstract getVeStrategy(options: VePlayerBaseOptions, config?: {
10114
10680
  veStrategyManager?: VeStrategyManager;
10115
10681
  }): Promise<Strategy> | undefined;
10682
+ abstract updateDrmConfig(drmConfig: any, player?: VePlayerBase): void;
10116
10683
  }
10117
10684
  type Strategy = {
10118
10685
  options?: undefined;
@@ -10148,6 +10715,15 @@ declare namespace live {
10148
10715
  private _init;
10149
10716
  private _initSingleProtocol;
10150
10717
  }
10718
+ interface PrepareOptions {
10719
+ appId: string;
10720
+ userId?: string;
10721
+ deviceId?: string;
10722
+ strategies: RtmAdaptiveBufferStrategy;
10723
+ }
10724
+ type RtmAdaptiveBufferStrategy = {
10725
+ rtmAdaptiveBuffer?: boolean;
10726
+ };
10151
10727
  /** {zh}
10152
10728
  * @list option
10153
10729
  * @kind property
@@ -10449,6 +11025,8 @@ declare namespace live {
10449
11025
  * @brief FairPlay DRM configurations.
10450
11026
  */
10451
11027
  fairplay?: FairplayDrm;
11028
+ widevine?: WidevineDrm;
11029
+ playready?: PlayreadyDrm;
10452
11030
  }
10453
11031
  /** {zh}
10454
11032
  * @list option
@@ -10458,20 +11036,21 @@ declare namespace live {
10458
11036
  * @list option
10459
11037
  * @kind property
10460
11038
  */
10461
- interface FairplayDrm extends FairplayDrmConfig {
11039
+ interface FairplayDrm {
10462
11040
  /** {zh}
10463
- * @brief 获取 DRM 配置的方法,用于更新 DRM 配置。
10464
- * @param config
10465
- * @returns 证书的请求地址和内容密钥许可证的请求地址。
11041
+ * @brief 获取证书的请求地址。
10466
11042
  */
10467
11043
  /** {en}
10468
- * @brief Gets DRM configurations.
10469
- * @param config
10470
- * @returns URLs used to get the DRM license and FairPlay streaming certificate.
11044
+ * @brief URL used to acquire the FairPlay certificate.
10471
11045
  */
10472
- getDrmConfig?: (config: {
10473
- url: string;
10474
- }) => Promise<FairplayDrmConfig>;
11046
+ serverCertificatePath?: string;
11047
+ /** {zh}
11048
+ * @brief 获取内容密钥许可证的请求地址。
11049
+ */
11050
+ /** {en}
11051
+ * @brief URL used to acquire the DRM license.
11052
+ */
11053
+ serverProcessSPCPath?: string;
10475
11054
  }
10476
11055
  /** {zh}
10477
11056
  * @list option
@@ -10481,14 +11060,35 @@ declare namespace live {
10481
11060
  * @list option
10482
11061
  * @kind property
10483
11062
  */
10484
- interface FairplayDrmConfig {
11063
+ interface WidevineDrm {
10485
11064
  /** {zh}
10486
- * @brief 获取证书的请求地址。
11065
+ * @hidden
10487
11066
  */
10488
11067
  /** {en}
10489
- * @brief URL used to acquire the FairPlay certificate.
11068
+ * @hidden
10490
11069
  */
10491
- serverCertificatePath?: string;
11070
+ // [x: string]: string | undefined;
11071
+ /** {zh}
11072
+ * @brief 获取内容密钥许可证的请求地址。
11073
+ */
11074
+ /** {en}
11075
+ * @brief URL used to acquire the DRM license.
11076
+ */
11077
+ serverProcessSPCPath?: string;
11078
+ }
11079
+ /** {zh}
11080
+ * @list option
11081
+ * @kind property
11082
+ */
11083
+ /** {en}
11084
+ * @list option
11085
+ * @kind property
11086
+ */
11087
+ interface PlayreadyDrm {
11088
+ /**
11089
+ * @hidden
11090
+ */
11091
+ // [x: string]: string | undefined;
10492
11092
  /** {zh}
10493
11093
  * @brief 获取内容密钥许可证的请求地址。
10494
11094
  */
@@ -10635,10 +11235,12 @@ declare namespace live {
10635
11235
  /** {zh}
10636
11236
  * @brief 当前环境不支持播放 RTM 或者 RTM 拉流播放失败时是否进行降级。
10637
11237
  * @default true
11238
+ * @hidden
10638
11239
  */
10639
11240
  /** {en}
10640
11241
  * @brief Whether to fall back to other protocols when RTM is not supported or an error occurs when playing an RTM stream.
10641
11242
  * @default true
11243
+ * @hidden
10642
11244
  */
10643
11245
  enableFallback?: boolean;
10644
11246
  /** {zh}
@@ -10745,6 +11347,19 @@ declare namespace live {
10745
11347
  * @brief buffer delay to handle network jitter, in seconds.
10746
11348
  */
10747
11349
  delayHint?: number;
11350
+ /** {zh}
11351
+ * @brief RTM 建联后将在达到该阈值后检测数据接收是否异常,如果异常则播放器报错,单位毫秒。
11352
+ * @default 5000
11353
+ */
11354
+ /** {en}
11355
+ * @brief After RTM connection is established, the system will detect abnormal data reception once the threshold (in milliseconds) is reached. If anomalies occur, the player triggers an error.
11356
+ * @default 5000
11357
+ */
11358
+ checkStatsErrorDelay?: number;
11359
+ /** {zh}
11360
+ * @brief 是否打开 RTM SEI
11361
+ */
11362
+ enableSei?: boolean;
10748
11363
  }
10749
11364
  /** {zh}
10750
11365
  * @list option
@@ -11462,7 +12077,7 @@ declare namespace live {
11462
12077
  * @brief Use this method to update DRM configuration.
11463
12078
  * @param config A configuration object containing settings for Fairplay DRM.
11464
12079
  */
11465
- updateDrmConfig(config: FairplayDrmConfig): void;
12080
+ updateDrmConfig(config: Drm): Promise<void | undefined>;
11466
12081
  /** {zh}
11467
12082
  * @brief 修改 ABR 配置,包含修改是否开启 ABR 功能,和修改其他清晰度。
11468
12083
  * @param options ABR 的配置。
@@ -11600,7 +12215,7 @@ declare namespace live {
11600
12215
  * @returns The player instance.
11601
12216
  */
11602
12217
  function createLivePlayer(options?: LiveVePlayerOptions): Promise<VePlayerLive>;
11603
- function prepare(options: any): Promise<VeStrategyManager | undefined>;
12218
+ function prepare(options: PrepareOptions): Promise<VeStrategyManager | undefined>;
11604
12219
  /** {zh}
11605
12220
  * @detail events
11606
12221
  * @id LiveEvents
@@ -12683,6 +13298,15 @@ declare namespace live {
12683
13298
  MEDIA_ERR_URL_EMPTY: string;
12684
13299
  DRM: string;
12685
13300
  DRM_LICENSE: string;
13301
+ DRM_UNSUPPORTED: string;
13302
+ DRM_NO_MEDIA_KEY: string;
13303
+ DRM_NO_KEY_SESSION: string;
13304
+ DRM_GENERATE_QUEST_FAIL: string;
13305
+ DRM_LACK_SERVER_CERTIFICATE_PATH: string;
13306
+ DRM_LACK_SERVER_PROCESS_SPC_PATH: string;
13307
+ DRM_LICENSE_FAIL: string;
13308
+ DRM_KEY_ERROR: string;
13309
+ DRM_CERT_FAIL: string;
12686
13310
  OTHER: string;
12687
13311
  RUNTIME: string;
12688
13312
  MODULE_LOAD_ERROR: string;
@@ -12757,6 +13381,15 @@ declare namespace live {
12757
13381
  MEDIA_ERR_URL_EMPTY: string;
12758
13382
  DRM: string;
12759
13383
  DRM_LICENSE: string;
13384
+ DRM_UNSUPPORTED: string;
13385
+ DRM_NO_MEDIA_KEY: string;
13386
+ DRM_NO_KEY_SESSION: string;
13387
+ DRM_GENERATE_QUEST_FAIL: string;
13388
+ DRM_LACK_SERVER_CERTIFICATE_PATH: string;
13389
+ DRM_LACK_SERVER_PROCESS_SPC_PATH: string;
13390
+ DRM_LICENSE_FAIL: string;
13391
+ DRM_KEY_ERROR: string;
13392
+ DRM_CERT_FAIL: string;
12760
13393
  OTHER: string;
12761
13394
  RUNTIME: string;
12762
13395
  MODULE_LOAD_ERROR: string;
@@ -12831,7 +13464,7 @@ declare namespace live {
12831
13464
  */
12832
13465
  /** {en}
12833
13466
  * @brief Log errors.
12834
- * @solution Log options not configured correctly. Please refer to this [document](https://docs.byteplus.com/en/docs/byteplus-media-live/docs-feature-implementation).
13467
+ * @solution Log options are not configured correctly. For details, see [Playback Logging and Reporting](https://docs.byteplus.com/en/docs/byteplus-media-live/docs-playback-logging-and-reporting).
12835
13468
  */
12836
13469
  INVALID_LOGGER = 220
12837
13470
  }
@@ -12843,14 +13476,12 @@ declare namespace live {
12843
13476
  * @name ErrorCode
12844
13477
  * @id ErrorCode
12845
13478
  * @structure errorCode
12846
- * @brief 错误码。
12847
13479
  */
12848
13480
  /** {en}
12849
13481
  * @detail error
12850
13482
  * @name ErrorCode
12851
13483
  * @id ErrorCode
12852
13484
  * @structure errorCode
12853
- * @brief Error code.
12854
13485
  */
12855
13486
  const ErrorCode$0: {
12856
13487
  [x: number]: string;
@@ -12881,11 +13512,20 @@ declare namespace live {
12881
13512
  MEDIA_MSE_HIJACK: error.ErrorCode.MEDIA_MSE_HIJACK;
12882
13513
  MEDIA_EME_HIJACK: error.ErrorCode.MEDIA_EME_HIJACK;
12883
13514
  DRM_LICENSE: error.ErrorCode.DRM_LICENSE;
13515
+ DRM_UNSUPPORTED: error.ErrorCode.DRM_UNSUPPORTED;
13516
+ DRM_NO_MEDIA_KEY: error.ErrorCode.DRM_NO_MEDIA_KEY;
13517
+ DRM_NO_KEY_SESSION: error.ErrorCode.DRM_NO_KEY_SESSION;
13518
+ DRM_GENERATE_QUEST_FAIL: error.ErrorCode.DRM_GENERATE_QUEST_FAIL;
13519
+ DRM_LACK_SERVER_CERTIFICATE_PATH: error.ErrorCode.DRM_LACK_SERVER_CERTIFICATE_PATH;
13520
+ DRM_LACK_SERVER_PROCESS_SPC_PATH: error.ErrorCode.DRM_LACK_SERVER_PROCESS_SPC_PATH;
13521
+ DRM_LICENSE_FAIL: error.ErrorCode.DRM_LICENSE_FAIL;
13522
+ DRM_KEY_ERROR: error.ErrorCode.DRM_KEY_ERROR;
13523
+ DRM_CERT_FAIL: error.ErrorCode.DRM_CERT_FAIL;
12884
13524
  DRM_CUSTOM_LICENSE: error.ErrorCode.DRM_CUSTOM_LICENSE;
12885
13525
  OTHER: error.ErrorCode.OTHER;
12886
13526
  RUNTIME_NO_CANPLAY_ERROR: error.ErrorCode.RUNTIME_NO_CANPLAY_ERROR;
12887
13527
  RUNTIME_BUFFERBREAK_ERROR: error.ErrorCode.RUNTIME_BUFFERBREAK_ERROR;
12888
- RUNTIME_BWAITING_TIMEOUT_ERROR: error.ErrorCode.RUNTIME_BUFFERBREAK_ERROR;
13528
+ RUNTIME_WAITING_TIMEOUT_ERROR: error.ErrorCode.RUNTIME_WAITING_TIMEOUT_ERROR;
12889
13529
  MODULE_LOAD_ERROR: error.ErrorCode.MODULE_LOAD_ERROR;
12890
13530
  UNKNOWN: error.ErrorCode.UNKNOWN;
12891
13531
  INVALID_PARAMETER: LiveErrorCode.INVALID_PARAMETER;
@@ -12894,6 +13534,6 @@ declare namespace live {
12894
13534
  };
12895
13535
  type ValueOf<T> = T[keyof T];
12896
13536
  const ERRORS: Partial<Record<ValueOf<typeof ErrorCode$0>, error.ErrorInfo<TextKey$0>>>;
12897
- function create$0(errorCode: ValueOf<typeof ErrorCode$0>, i18n?: VeI18n<TextKey$0>): error.VeError<"DEFINITION_FALLBACK_TOAST" | "DEFINITION_SWITCHING" | "ERROR_REFRESH" | "UNMUTE" | "MANIFEST" | "NETWORK" | "NETWORK_TIMEOUT" | "NETWORK_FORBIDDEN" | "NETWORK_NOTFOUND" | "DEMUX" | "REMUX" | "MEDIA" | "MEDIA_ERR_CODEC_NOT_SUPPORTED" | "MEDIA_ERR_URL_EMPTY" | "DRM" | "DRM_LICENSE" | "OTHER" | "RUNTIME" | "MODULE_LOAD_ERROR" | "UNKNOWN" | "ERROR_TYPES" | "HAVE_NOTHING" | "HAVE_METADATA" | "HAVE_CURRENT_DATA" | "HAVE_FUTURE_DATA" | "HAVE_ENOUGH_DATA" | "NETWORK_EMPTY" | "NETWORK_IDLE" | "NETWORK_LOADING" | "NETWORK_NO_SOURCE" | "MEDIA_ERR_ABORTED" | "MEDIA_ERR_NETWORK" | "MEDIA_ERR_DECODE" | "MEDIA_ERR_SRC_NOT_SUPPORTED" | "REPLAY" | "ERROR" | "PLAY_TIPS" | "PAUSE_TIPS" | "PLAYNEXT_TIPS" | "DOWNLOAD_TIPS" | "ROTATE_TIPS" | "RELOAD_TIPS" | "FULLSCREEN_TIPS" | "EXITFULLSCREEN_TIPS" | "CSSFULLSCREEN_TIPS" | "EXITCSSFULLSCREEN_TIPS" | "TEXTTRACK" | "PIP" | "SCREENSHOT" | "LIVE" | "OFF" | "OPEN" | "MINI_DRAG" | "MINISCREEN" | "REFRESH_TIPS" | "REFRESH" | "FORWARD" | "LIVE_TIP" | "GOP" | "INVALID_PARAMETER" | "EMPTY_RTM_FALLBACK_PARAMETER" | "INVALID_LOGGER" | "FORMAT" | "FPS" | "BITRATE" | "RESOLUTION" | "ENCODE_TYPE" | "BUFFER_END" | "CURRENT_TIME" | "DECODE_EFFICIENCY" | "DECODE_COST" | "DECODE_INFO">;
13537
+ function create$0(errorCode: ValueOf<typeof ErrorCode$0>, i18n?: VeI18n<TextKey$0>): error.VeError<"DEFINITION_FALLBACK_TOAST" | "DEFINITION_SWITCHING" | "ERROR_REFRESH" | "UNMUTE" | "MANIFEST" | "NETWORK" | "NETWORK_TIMEOUT" | "NETWORK_FORBIDDEN" | "NETWORK_NOTFOUND" | "DEMUX" | "REMUX" | "MEDIA" | "MEDIA_ERR_CODEC_NOT_SUPPORTED" | "MEDIA_ERR_URL_EMPTY" | "DRM" | "DRM_LICENSE" | "DRM_UNSUPPORTED" | "DRM_NO_MEDIA_KEY" | "DRM_NO_KEY_SESSION" | "DRM_GENERATE_QUEST_FAIL" | "DRM_LACK_SERVER_CERTIFICATE_PATH" | "DRM_LACK_SERVER_PROCESS_SPC_PATH" | "DRM_LICENSE_FAIL" | "DRM_KEY_ERROR" | "DRM_CERT_FAIL" | "OTHER" | "RUNTIME" | "MODULE_LOAD_ERROR" | "UNKNOWN" | "ERROR_TYPES" | "HAVE_NOTHING" | "HAVE_METADATA" | "HAVE_CURRENT_DATA" | "HAVE_FUTURE_DATA" | "HAVE_ENOUGH_DATA" | "NETWORK_EMPTY" | "NETWORK_IDLE" | "NETWORK_LOADING" | "NETWORK_NO_SOURCE" | "MEDIA_ERR_ABORTED" | "MEDIA_ERR_NETWORK" | "MEDIA_ERR_DECODE" | "MEDIA_ERR_SRC_NOT_SUPPORTED" | "REPLAY" | "ERROR" | "PLAY_TIPS" | "PAUSE_TIPS" | "PLAYNEXT_TIPS" | "DOWNLOAD_TIPS" | "ROTATE_TIPS" | "RELOAD_TIPS" | "FULLSCREEN_TIPS" | "EXITFULLSCREEN_TIPS" | "CSSFULLSCREEN_TIPS" | "EXITCSSFULLSCREEN_TIPS" | "TEXTTRACK" | "PIP" | "SCREENSHOT" | "LIVE" | "OFF" | "OPEN" | "MINI_DRAG" | "MINISCREEN" | "REFRESH_TIPS" | "REFRESH" | "FORWARD" | "LIVE_TIP" | "GOP" | "INVALID_PARAMETER" | "EMPTY_RTM_FALLBACK_PARAMETER" | "INVALID_LOGGER" | "FORMAT" | "FPS" | "BITRATE" | "RESOLUTION" | "ENCODE_TYPE" | "BUFFER_END" | "CURRENT_TIME" | "DECODE_EFFICIENCY" | "DECODE_COST" | "DECODE_INFO">;
12898
13538
  }
12899
13539
  export { Codec, DecodeType, Degradation, DynamicModule, RTMCodec, ListType, Plugin, ExposedSource, VePlayerLive, util, register, registerPlugin, createLivePlayer, isMseSupported, isSoftDecodeSupported, isRTMSupported, isFLVSupported, isRTMSupportCodec, isMMSSupported, load, POSITIONS, EN, ZH_CN, Sniffer, live };