@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.
@@ -26,6 +26,15 @@ declare const EN: {
26
26
  MEDIA_ERR_URL_EMPTY: string;
27
27
  DRM: string;
28
28
  DRM_LICENSE: string;
29
+ DRM_UNSUPPORTED: string;
30
+ DRM_NO_MEDIA_KEY: string;
31
+ DRM_NO_KEY_SESSION: string;
32
+ DRM_GENERATE_QUEST_FAIL: string;
33
+ DRM_LACK_SERVER_CERTIFICATE_PATH: string;
34
+ DRM_LACK_SERVER_PROCESS_SPC_PATH: string;
35
+ DRM_LICENSE_FAIL: string;
36
+ DRM_KEY_ERROR: string;
37
+ DRM_CERT_FAIL: string;
29
38
  OTHER: string;
30
39
  RUNTIME: string;
31
40
  MODULE_LOAD_ERROR: string;
@@ -424,12 +433,6 @@ declare enum Level {
424
433
  */
425
434
  Warn = "Warn"
426
435
  }
427
- /** {zh}
428
- * @id ErrorCodeRaw
429
- */
430
- /** {en}
431
- * @id ErrorCodeRaw
432
- */
433
436
  declare enum ErrorCode {
434
437
  /** {zh}
435
438
  * @brief 视频解析错误
@@ -696,6 +699,69 @@ declare enum ErrorCode {
696
699
  * @solution Verify the authentication and ensure proper playback permissions.
697
700
  */
698
701
  DRM_LICENSE = 7100,
702
+ /** {zh}
703
+ * @brief 不支持 DRM 加密播放
704
+ */
705
+ /** {en}
706
+ * @brief DRM encrypted playback is not supported
707
+ */
708
+ DRM_UNSUPPORTED = 7101,
709
+ /** {zh}
710
+ * @brief 视频数据缺少相应 MediaKey
711
+ */
712
+ /** {en}
713
+ * @brief Video data lacks the corresponding MediaKey
714
+ */
715
+ DRM_NO_MEDIA_KEY = 7103,
716
+ /** {zh}
717
+ * @brief 浏览器不支持相应 DRM KeySession
718
+ */
719
+ /** {en}
720
+ * @brief Browser does not support the corresponding DRM KeySession
721
+ */
722
+ DRM_NO_KEY_SESSION = 7104,
723
+ /** {zh}
724
+ * @brief 解密播放错误
725
+ */
726
+ /** {en}
727
+ * @brief Decryption playback error
728
+ */
729
+ DRM_GENERATE_QUEST_FAIL = 7105,
730
+ /** {zh}
731
+ * @brief 缺少 DRM 证书请求链接
732
+ */
733
+ /** {en}
734
+ * @brief Missing DRM certificate request link
735
+ */
736
+ DRM_LACK_SERVER_CERTIFICATE_PATH = 7106,
737
+ /** {zh}
738
+ * @brief 缺少 DRM License 请求链接
739
+ */
740
+ /** {en}
741
+ * @brief Missing DRM License request link
742
+ */
743
+ DRM_LACK_SERVER_PROCESS_SPC_PATH = 7107,
744
+ /** {zh}
745
+ * @brief 请求或更新 License 失败
746
+ */
747
+ /** {en}
748
+ * @brief Request or update License failed
749
+ */
750
+ DRM_LICENSE_FAIL = 7108,
751
+ /** {zh}
752
+ * @brief 解密错误
753
+ */
754
+ /** {en}
755
+ * @brief Decryption error
756
+ */
757
+ DRM_KEY_ERROR = 7109,
758
+ /** {zh}
759
+ * @brief 请求 DRM 证书失败'
760
+ */
761
+ /** {en}
762
+ * @brief Request for DRM certificate failed'
763
+ */
764
+ DRM_CERT_FAIL = 7110,
699
765
  /** {zh}
700
766
  * @brief DRM 权限校验失败
701
767
  * @hidden
@@ -742,7 +808,7 @@ declare enum ErrorCode {
742
808
  * @brief A playback issue occurred.
743
809
  * @solution Check the live stream source or [contact support](https://console.byteplus.com/auth/login?redirectURI=%2Fworkorder%2Fcreate).
744
810
  */
745
- RUNTIME_BWAITING_TIMEOUT_ERROR = 9002,
811
+ RUNTIME_WAITING_TIMEOUT_ERROR = 9003,
746
812
  // veplayer 报错
747
813
  /** {zh}
748
814
  * @brief CDN 异步获取失败
@@ -939,10 +1005,12 @@ declare class Error extends Plugin {
939
1005
  /** {zh}
940
1006
  * @list option
941
1007
  * @kind property
1008
+ * @hidden
942
1009
  */
943
1010
  /** {en}
944
1011
  * @list option
945
1012
  * @kind property
1013
+ * @hidden
946
1014
  */
947
1015
  interface DefinitionConfig {
948
1016
  /** {zh}
@@ -1095,7 +1163,7 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
1095
1163
  /** {en}
1096
1164
  * @brief The URL of the player's cover image.
1097
1165
  */
1098
- poster?: string;
1166
+ poster?: string | Poster;
1099
1167
  /** {zh}
1100
1168
  * @brief 为播放器设置初始显示语言,语言包不存在的情况下默认显示 'en' 语言包 。默认值为 `document.documentElement.getAttribute('lang') || navigator.language || 'zh-cn'`
1101
1169
  */
@@ -1489,6 +1557,73 @@ interface CommonStyle {
1489
1557
  */
1490
1558
  volumeColor?: string;
1491
1559
  }
1560
+ /** {zh}
1561
+ * @list option
1562
+ * @kind property
1563
+ */
1564
+ /** {en}
1565
+ * @list option
1566
+ * @kind property
1567
+ */
1568
+ interface Poster {
1569
+ /** {zh}
1570
+ * @brief 封面图 URL 地址。
1571
+ */
1572
+ /** {en}
1573
+ * @brief The URL of the player's cover image.
1574
+ */
1575
+ poster: string;
1576
+ /** {zh}
1577
+ * @brief 是否在播放结束之后显示封面图。
1578
+ * - `true`:播放结束之后显示封面图。
1579
+ * - `false`:播放结束之后不显示封面图。
1580
+ * @default true
1581
+ */
1582
+ /** {en}
1583
+ * @brief Whether to display the cover image after playback ends.
1584
+ * - `true`:display the cover image after playback ends.
1585
+ * - `false`:not display the cover image after playback ends.
1586
+ * @default true
1587
+ */
1588
+ isEndedShow?: boolean;
1589
+ /** {zh}
1590
+ * @brief 是否播放后再隐藏封面图。
1591
+ * - `true`:播放后隐藏,未启播时一直显示封面图。
1592
+ * - `false`:在 `play` 事件触发后隐藏封面图。
1593
+ * @default false
1594
+ */
1595
+ /** {en}
1596
+ * @brief Whether to hide the cover image after `canplay` event.
1597
+ * - `true`:hide the cover image after `canplay` event.
1598
+ * - `false`:hide the cover image after `play` event.
1599
+ * @default false
1600
+ */
1601
+ hideCanplay?: boolean;
1602
+ /** {zh}
1603
+ * @brief 是否一直显示封面图。
1604
+ * @default false
1605
+ * @hidden
1606
+ */
1607
+ /** {}
1608
+ * @hidden
1609
+ */
1610
+ notHidden?: boolean;
1611
+ /** {zh}
1612
+ * @brief 封面图填充方式。取值如下:
1613
+ * - `fixWidth`:宽度方向填充,不会被拉伸压缩。
1614
+ * - `fixHeight`:高度方向填充,不会被拉伸压缩。
1615
+ * - `cover`:完全覆盖容器,多余部分会被裁剪。
1616
+ * - `contain`:完全覆盖,与容器不匹配时会被拉伸压缩。
1617
+ */
1618
+ /** {en}
1619
+ * @brief Cover image fill mode.
1620
+ * - `fixWidth`:Fill the width of the container and crop the height if necessary.
1621
+ * - `fixHeight`:Fill the height of the container and crop the width if necessary.
1622
+ * - `cover`:Fill the entire container while keeping the original aspect ratio.
1623
+ * - `contain`:Stretch the video to fill the container.
1624
+ */
1625
+ fillMode?: "fixWidth" | "fixHeight" | "cover" | "contain";
1626
+ }
1492
1627
  type PrepareResult = {
1493
1628
  options?: Partial<VePlayerBaseOptions>;
1494
1629
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -2182,6 +2317,7 @@ declare enum DynamicModule {
2182
2317
  PluginMp4 = "plugin:mp4",
2183
2318
  PluginHls = "plugin:hls",
2184
2319
  PluginHlsJs = "plugin:hlsjs",
2320
+ PluginDashJs = "plugin:dashjs",
2185
2321
  PluginShaka = "plugin:shaka",
2186
2322
  PluginRtm = "plugin:rtm",
2187
2323
  PluginXgvideo = "plugin:xgvideo",
@@ -2197,6 +2333,7 @@ type ModulesMap = {
2197
2333
  [DynamicModule.PluginMp4]: Exports;
2198
2334
  [DynamicModule.PluginHls]: Exports;
2199
2335
  [DynamicModule.PluginHlsJs]: Exports;
2336
+ [DynamicModule.PluginDashJs]: Exports;
2200
2337
  [DynamicModule.PluginShaka]: Exports;
2201
2338
  [DynamicModule.PluginRtm]: Exports;
2202
2339
  [DynamicModule.PluginXgvideo]: Exports;
@@ -2232,6 +2369,15 @@ declare namespace strategy {
2232
2369
  MEDIA_ERR_URL_EMPTY: string;
2233
2370
  DRM: string;
2234
2371
  DRM_LICENSE: string;
2372
+ DRM_UNSUPPORTED: string;
2373
+ DRM_NO_MEDIA_KEY: string;
2374
+ DRM_NO_KEY_SESSION: string;
2375
+ DRM_GENERATE_QUEST_FAIL: string;
2376
+ DRM_LACK_SERVER_CERTIFICATE_PATH: string;
2377
+ DRM_LACK_SERVER_PROCESS_SPC_PATH: string;
2378
+ DRM_LICENSE_FAIL: string;
2379
+ DRM_KEY_ERROR: string;
2380
+ DRM_CERT_FAIL: string;
2235
2381
  OTHER: string;
2236
2382
  RUNTIME: string;
2237
2383
  MODULE_LOAD_ERROR: string;
@@ -2292,6 +2438,15 @@ declare namespace strategy {
2292
2438
  MEDIA_ERR_URL_EMPTY: string;
2293
2439
  DRM: string;
2294
2440
  DRM_LICENSE: string;
2441
+ DRM_UNSUPPORTED: string;
2442
+ DRM_NO_MEDIA_KEY: string;
2443
+ DRM_NO_KEY_SESSION: string;
2444
+ DRM_GENERATE_QUEST_FAIL: string;
2445
+ DRM_LACK_SERVER_CERTIFICATE_PATH: string;
2446
+ DRM_LACK_SERVER_PROCESS_SPC_PATH: string;
2447
+ DRM_LICENSE_FAIL: string;
2448
+ DRM_KEY_ERROR: string;
2449
+ DRM_CERT_FAIL: string;
2295
2450
  OTHER: string;
2296
2451
  RUNTIME: string;
2297
2452
  MODULE_LOAD_ERROR: string;
@@ -2688,12 +2843,6 @@ declare namespace strategy {
2688
2843
  */
2689
2844
  Warn = "Warn"
2690
2845
  }
2691
- /** {zh}
2692
- * @id ErrorCodeRaw
2693
- */
2694
- /** {en}
2695
- * @id ErrorCodeRaw
2696
- */
2697
2846
  enum ErrorCode {
2698
2847
  /** {zh}
2699
2848
  * @brief 视频解析错误
@@ -2960,6 +3109,69 @@ declare namespace strategy {
2960
3109
  * @solution Verify the authentication and ensure proper playback permissions.
2961
3110
  */
2962
3111
  DRM_LICENSE = 7100,
3112
+ /** {zh}
3113
+ * @brief 不支持 DRM 加密播放
3114
+ */
3115
+ /** {en}
3116
+ * @brief DRM encrypted playback is not supported
3117
+ */
3118
+ DRM_UNSUPPORTED = 7101,
3119
+ /** {zh}
3120
+ * @brief 视频数据缺少相应 MediaKey
3121
+ */
3122
+ /** {en}
3123
+ * @brief Video data lacks the corresponding MediaKey
3124
+ */
3125
+ DRM_NO_MEDIA_KEY = 7103,
3126
+ /** {zh}
3127
+ * @brief 浏览器不支持相应 DRM KeySession
3128
+ */
3129
+ /** {en}
3130
+ * @brief Browser does not support the corresponding DRM KeySession
3131
+ */
3132
+ DRM_NO_KEY_SESSION = 7104,
3133
+ /** {zh}
3134
+ * @brief 解密播放错误
3135
+ */
3136
+ /** {en}
3137
+ * @brief Decryption playback error
3138
+ */
3139
+ DRM_GENERATE_QUEST_FAIL = 7105,
3140
+ /** {zh}
3141
+ * @brief 缺少 DRM 证书请求链接
3142
+ */
3143
+ /** {en}
3144
+ * @brief Missing DRM certificate request link
3145
+ */
3146
+ DRM_LACK_SERVER_CERTIFICATE_PATH = 7106,
3147
+ /** {zh}
3148
+ * @brief 缺少 DRM License 请求链接
3149
+ */
3150
+ /** {en}
3151
+ * @brief Missing DRM License request link
3152
+ */
3153
+ DRM_LACK_SERVER_PROCESS_SPC_PATH = 7107,
3154
+ /** {zh}
3155
+ * @brief 请求或更新 License 失败
3156
+ */
3157
+ /** {en}
3158
+ * @brief Request or update License failed
3159
+ */
3160
+ DRM_LICENSE_FAIL = 7108,
3161
+ /** {zh}
3162
+ * @brief 解密错误
3163
+ */
3164
+ /** {en}
3165
+ * @brief Decryption error
3166
+ */
3167
+ DRM_KEY_ERROR = 7109,
3168
+ /** {zh}
3169
+ * @brief 请求 DRM 证书失败'
3170
+ */
3171
+ /** {en}
3172
+ * @brief Request for DRM certificate failed'
3173
+ */
3174
+ DRM_CERT_FAIL = 7110,
2963
3175
  /** {zh}
2964
3176
  * @brief DRM 权限校验失败
2965
3177
  * @hidden
@@ -3006,7 +3218,7 @@ declare namespace strategy {
3006
3218
  * @brief A playback issue occurred.
3007
3219
  * @solution Check the live stream source or [contact support](https://console.byteplus.com/auth/login?redirectURI=%2Fworkorder%2Fcreate).
3008
3220
  */
3009
- RUNTIME_BWAITING_TIMEOUT_ERROR = 9002,
3221
+ RUNTIME_WAITING_TIMEOUT_ERROR = 9003,
3010
3222
  // veplayer 报错
3011
3223
  /** {zh}
3012
3224
  * @brief CDN 异步获取失败
@@ -3105,8 +3317,8 @@ declare namespace strategy {
3105
3317
  */
3106
3318
  constructor(error?: string | ErrorInfo<T>, i18n?: VeI18n<T>);
3107
3319
  }
3108
- 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">;
3109
- 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">;
3320
+ 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">;
3321
+ 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">;
3110
3322
  /** {zh}
3111
3323
  * @list option
3112
3324
  * @kind property
@@ -3207,10 +3419,12 @@ declare namespace strategy {
3207
3419
  /** {zh}
3208
3420
  * @list option
3209
3421
  * @kind property
3422
+ * @hidden
3210
3423
  */
3211
3424
  /** {en}
3212
3425
  * @list option
3213
3426
  * @kind property
3427
+ * @hidden
3214
3428
  */
3215
3429
  interface DefinitionConfig {
3216
3430
  /** {zh}
@@ -3422,7 +3636,7 @@ declare namespace strategy {
3422
3636
  /** {en}
3423
3637
  * @brief The URL of the player's cover image.
3424
3638
  */
3425
- poster?: string;
3639
+ poster?: string | Poster;
3426
3640
  /** {zh}
3427
3641
  * @brief 为播放器设置初始显示语言,语言包不存在的情况下默认显示 'en' 语言包 。默认值为 `document.documentElement.getAttribute('lang') || navigator.language || 'zh-cn'`
3428
3642
  */
@@ -3816,6 +4030,73 @@ declare namespace strategy {
3816
4030
  */
3817
4031
  volumeColor?: string;
3818
4032
  }
4033
+ /** {zh}
4034
+ * @list option
4035
+ * @kind property
4036
+ */
4037
+ /** {en}
4038
+ * @list option
4039
+ * @kind property
4040
+ */
4041
+ interface Poster {
4042
+ /** {zh}
4043
+ * @brief 封面图 URL 地址。
4044
+ */
4045
+ /** {en}
4046
+ * @brief The URL of the player's cover image.
4047
+ */
4048
+ poster: string;
4049
+ /** {zh}
4050
+ * @brief 是否在播放结束之后显示封面图。
4051
+ * - `true`:播放结束之后显示封面图。
4052
+ * - `false`:播放结束之后不显示封面图。
4053
+ * @default true
4054
+ */
4055
+ /** {en}
4056
+ * @brief Whether to display the cover image after playback ends.
4057
+ * - `true`:display the cover image after playback ends.
4058
+ * - `false`:not display the cover image after playback ends.
4059
+ * @default true
4060
+ */
4061
+ isEndedShow?: boolean;
4062
+ /** {zh}
4063
+ * @brief 是否播放后再隐藏封面图。
4064
+ * - `true`:播放后隐藏,未启播时一直显示封面图。
4065
+ * - `false`:在 `play` 事件触发后隐藏封面图。
4066
+ * @default false
4067
+ */
4068
+ /** {en}
4069
+ * @brief Whether to hide the cover image after `canplay` event.
4070
+ * - `true`:hide the cover image after `canplay` event.
4071
+ * - `false`:hide the cover image after `play` event.
4072
+ * @default false
4073
+ */
4074
+ hideCanplay?: boolean;
4075
+ /** {zh}
4076
+ * @brief 是否一直显示封面图。
4077
+ * @default false
4078
+ * @hidden
4079
+ */
4080
+ /** {}
4081
+ * @hidden
4082
+ */
4083
+ notHidden?: boolean;
4084
+ /** {zh}
4085
+ * @brief 封面图填充方式。取值如下:
4086
+ * - `fixWidth`:宽度方向填充,不会被拉伸压缩。
4087
+ * - `fixHeight`:高度方向填充,不会被拉伸压缩。
4088
+ * - `cover`:完全覆盖容器,多余部分会被裁剪。
4089
+ * - `contain`:完全覆盖,与容器不匹配时会被拉伸压缩。
4090
+ */
4091
+ /** {en}
4092
+ * @brief Cover image fill mode.
4093
+ * - `fixWidth`:Fill the width of the container and crop the height if necessary.
4094
+ * - `fixHeight`:Fill the height of the container and crop the width if necessary.
4095
+ * - `cover`:Fill the entire container while keeping the original aspect ratio.
4096
+ * - `contain`:Stretch the video to fill the container.
4097
+ */
4098
+ fillMode?: "fixWidth" | "fixHeight" | "cover" | "contain";
4099
+ }
3819
4100
  type PrepareResult = {
3820
4101
  options?: Partial<VePlayerBaseOptions>;
3821
4102
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -3908,6 +4189,7 @@ declare namespace strategy {
3908
4189
  readonly "plugin:mp4": "veplayer.plugin.mp4.[env].[ext]";
3909
4190
  readonly "plugin:hls": "veplayer.plugin.hls.[env].[ext]";
3910
4191
  readonly "plugin:hlsjs": "veplayer.plugin.hlsjs.[env].[ext]";
4192
+ readonly "plugin:dashjs": "veplayer.plugin.dashjs.[env].[ext]";
3911
4193
  readonly "plugin:shaka": "veplayer.plugin.shaka.[env].[ext]";
3912
4194
  readonly "plugin:rtm": "veplayer.plugin.rtm.[env].[ext]";
3913
4195
  readonly "plugin:xgvideo": "veplayer.plugin.xgvideo.[env].[ext]";
@@ -3942,6 +4224,7 @@ declare namespace strategy {
3942
4224
  PluginMp4 = "plugin:mp4",
3943
4225
  PluginHls = "plugin:hls",
3944
4226
  PluginHlsJs = "plugin:hlsjs",
4227
+ PluginDashJs = "plugin:dashjs",
3945
4228
  PluginShaka = "plugin:shaka",
3946
4229
  PluginRtm = "plugin:rtm",
3947
4230
  PluginXgvideo = "plugin:xgvideo",
@@ -3957,6 +4240,7 @@ declare namespace strategy {
3957
4240
  [DynamicModule.PluginMp4]: Exports;
3958
4241
  [DynamicModule.PluginHls]: Exports;
3959
4242
  [DynamicModule.PluginHlsJs]: Exports;
4243
+ [DynamicModule.PluginDashJs]: Exports;
3960
4244
  [DynamicModule.PluginShaka]: Exports;
3961
4245
  [DynamicModule.PluginRtm]: Exports;
3962
4246
  [DynamicModule.PluginXgvideo]: Exports;
@@ -4028,6 +4312,15 @@ declare namespace error {
4028
4312
  MEDIA_ERR_URL_EMPTY: string;
4029
4313
  DRM: string;
4030
4314
  DRM_LICENSE: string;
4315
+ DRM_UNSUPPORTED: string;
4316
+ DRM_NO_MEDIA_KEY: string;
4317
+ DRM_NO_KEY_SESSION: string;
4318
+ DRM_GENERATE_QUEST_FAIL: string;
4319
+ DRM_LACK_SERVER_CERTIFICATE_PATH: string;
4320
+ DRM_LACK_SERVER_PROCESS_SPC_PATH: string;
4321
+ DRM_LICENSE_FAIL: string;
4322
+ DRM_KEY_ERROR: string;
4323
+ DRM_CERT_FAIL: string;
4031
4324
  OTHER: string;
4032
4325
  RUNTIME: string;
4033
4326
  MODULE_LOAD_ERROR: string;
@@ -4088,6 +4381,15 @@ declare namespace error {
4088
4381
  MEDIA_ERR_URL_EMPTY: string;
4089
4382
  DRM: string;
4090
4383
  DRM_LICENSE: string;
4384
+ DRM_UNSUPPORTED: string;
4385
+ DRM_NO_MEDIA_KEY: string;
4386
+ DRM_NO_KEY_SESSION: string;
4387
+ DRM_GENERATE_QUEST_FAIL: string;
4388
+ DRM_LACK_SERVER_CERTIFICATE_PATH: string;
4389
+ DRM_LACK_SERVER_PROCESS_SPC_PATH: string;
4390
+ DRM_LICENSE_FAIL: string;
4391
+ DRM_KEY_ERROR: string;
4392
+ DRM_CERT_FAIL: string;
4091
4393
  OTHER: string;
4092
4394
  RUNTIME: string;
4093
4395
  MODULE_LOAD_ERROR: string;
@@ -4180,12 +4482,6 @@ declare namespace error {
4180
4482
  */
4181
4483
  Warn = "Warn"
4182
4484
  }
4183
- /** {zh}
4184
- * @id ErrorCodeRaw
4185
- */
4186
- /** {en}
4187
- * @id ErrorCodeRaw
4188
- */
4189
4485
  enum ErrorCode {
4190
4486
  /** {zh}
4191
4487
  * @brief 视频解析错误
@@ -4452,6 +4748,69 @@ declare namespace error {
4452
4748
  * @solution Verify the authentication and ensure proper playback permissions.
4453
4749
  */
4454
4750
  DRM_LICENSE = 7100,
4751
+ /** {zh}
4752
+ * @brief 不支持 DRM 加密播放
4753
+ */
4754
+ /** {en}
4755
+ * @brief DRM encrypted playback is not supported
4756
+ */
4757
+ DRM_UNSUPPORTED = 7101,
4758
+ /** {zh}
4759
+ * @brief 视频数据缺少相应 MediaKey
4760
+ */
4761
+ /** {en}
4762
+ * @brief Video data lacks the corresponding MediaKey
4763
+ */
4764
+ DRM_NO_MEDIA_KEY = 7103,
4765
+ /** {zh}
4766
+ * @brief 浏览器不支持相应 DRM KeySession
4767
+ */
4768
+ /** {en}
4769
+ * @brief Browser does not support the corresponding DRM KeySession
4770
+ */
4771
+ DRM_NO_KEY_SESSION = 7104,
4772
+ /** {zh}
4773
+ * @brief 解密播放错误
4774
+ */
4775
+ /** {en}
4776
+ * @brief Decryption playback error
4777
+ */
4778
+ DRM_GENERATE_QUEST_FAIL = 7105,
4779
+ /** {zh}
4780
+ * @brief 缺少 DRM 证书请求链接
4781
+ */
4782
+ /** {en}
4783
+ * @brief Missing DRM certificate request link
4784
+ */
4785
+ DRM_LACK_SERVER_CERTIFICATE_PATH = 7106,
4786
+ /** {zh}
4787
+ * @brief 缺少 DRM License 请求链接
4788
+ */
4789
+ /** {en}
4790
+ * @brief Missing DRM License request link
4791
+ */
4792
+ DRM_LACK_SERVER_PROCESS_SPC_PATH = 7107,
4793
+ /** {zh}
4794
+ * @brief 请求或更新 License 失败
4795
+ */
4796
+ /** {en}
4797
+ * @brief Request or update License failed
4798
+ */
4799
+ DRM_LICENSE_FAIL = 7108,
4800
+ /** {zh}
4801
+ * @brief 解密错误
4802
+ */
4803
+ /** {en}
4804
+ * @brief Decryption error
4805
+ */
4806
+ DRM_KEY_ERROR = 7109,
4807
+ /** {zh}
4808
+ * @brief 请求 DRM 证书失败'
4809
+ */
4810
+ /** {en}
4811
+ * @brief Request for DRM certificate failed'
4812
+ */
4813
+ DRM_CERT_FAIL = 7110,
4455
4814
  /** {zh}
4456
4815
  * @brief DRM 权限校验失败
4457
4816
  * @hidden
@@ -4498,7 +4857,7 @@ declare namespace error {
4498
4857
  * @brief A playback issue occurred.
4499
4858
  * @solution Check the live stream source or [contact support](https://console.byteplus.com/auth/login?redirectURI=%2Fworkorder%2Fcreate).
4500
4859
  */
4501
- RUNTIME_BWAITING_TIMEOUT_ERROR = 9002,
4860
+ RUNTIME_WAITING_TIMEOUT_ERROR = 9003,
4502
4861
  // veplayer 报错
4503
4862
  /** {zh}
4504
4863
  * @brief CDN 异步获取失败
@@ -4597,8 +4956,8 @@ declare namespace error {
4597
4956
  */
4598
4957
  constructor(error?: string | ErrorInfo<T>, i18n?: VeI18n<T>);
4599
4958
  }
4600
- 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">;
4601
- 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">;
4959
+ 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">;
4960
+ 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">;
4602
4961
  }
4603
4962
  declare namespace event {
4604
4963
  const BaseEvents: {