@volcengine/veplayer 2.5.1 → 2.5.2-rc.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/index.d.ts +34 -10
- package/esm/veplayer.biz.live.development.js +90 -51
- package/esm/veplayer.biz.live.production.js +1 -1
- package/esm/veplayer.d.ts +156 -56
- package/esm/veplayer.development.js +163 -110
- package/esm/veplayer.live.d.ts +156 -56
- package/esm/veplayer.live.development.js +163 -110
- package/esm/veplayer.live.production.js +3 -5
- package/esm/veplayer.production.js +3 -5
- package/esm/veplayer.vod.d.ts +34 -10
- package/esm/veplayer.vod.development.js +92 -66
- package/esm/veplayer.vod.production.js +3 -5
- package/package.json +1 -1
- package/umd/index.d.ts +34 -10
- package/umd/veplayer.biz.live.development.js +111 -259
- package/umd/veplayer.biz.live.production.js +1 -1
- package/umd/veplayer.d.ts +156 -56
- package/umd/veplayer.development.js +163 -110
- package/umd/veplayer.live.d.ts +156 -56
- package/umd/veplayer.live.development.js +165 -115
- package/umd/veplayer.live.production.js +1 -1
- package/umd/veplayer.production.js +1 -1
- package/umd/veplayer.vod.d.ts +34 -10
- package/umd/veplayer.vod.development.js +92 -66
- package/umd/veplayer.vod.production.js +1 -1
- package/veplayer.d.ts +156 -56
- package/veplayer.live.d.ts +156 -56
- package/veplayer.vod.d.ts +34 -10
package/umd/veplayer.live.d.ts
CHANGED
|
@@ -491,7 +491,14 @@ declare enum Level {
|
|
|
491
491
|
/** {en}
|
|
492
492
|
* @brief Error.
|
|
493
493
|
*/
|
|
494
|
-
Error = "Error"
|
|
494
|
+
Error = "Error",
|
|
495
|
+
/** {zh}
|
|
496
|
+
* @brief 提示。
|
|
497
|
+
*/
|
|
498
|
+
/** {en}
|
|
499
|
+
* @brief Warn.
|
|
500
|
+
*/
|
|
501
|
+
Warn = "Warn"
|
|
495
502
|
}
|
|
496
503
|
declare enum ErrorCode {
|
|
497
504
|
/** {zh}
|
|
@@ -1632,15 +1639,16 @@ type PrepareResult = {
|
|
|
1632
1639
|
options?: Partial<VePlayerBaseOptions>;
|
|
1633
1640
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1634
1641
|
plugins?: any[];
|
|
1642
|
+
useSrc?: boolean;
|
|
1635
1643
|
};
|
|
1636
1644
|
type PreparePlugins = (url: string) => Promise<PrepareResult> | undefined;
|
|
1637
1645
|
/** {zh}
|
|
1638
1646
|
* @detail option
|
|
1639
|
-
* @brief 视频的实际编码格式。如果您在degradation 设置了 SoftFirst 属性(即硬解不支持降级软解),建议您传入该参数,省去探测实际编码格式的操作。
|
|
1647
|
+
* @brief 视频的实际编码格式。如果您在 degradation 设置了 SoftFirst 属性(即硬解不支持降级软解),建议您传入该参数,省去探测实际编码格式的操作。
|
|
1640
1648
|
*/
|
|
1641
1649
|
/** {en}
|
|
1642
1650
|
* @detail option
|
|
1643
|
-
* @brief The actual codec of the video.
|
|
1651
|
+
* @brief The actual codec of the video. If you set the SoftFirst property in degradation (that is, hard solutions do not support downgrading soft solutions), it is recommended that you pass this parameter to save the operation of probing the actual encoding format.
|
|
1644
1652
|
*/
|
|
1645
1653
|
declare enum Codec {
|
|
1646
1654
|
/** {zh}
|
|
@@ -2315,16 +2323,17 @@ declare class VePlayerBase {
|
|
|
2315
2323
|
* @hidden
|
|
2316
2324
|
*/
|
|
2317
2325
|
prepare(url: string): Promise<{
|
|
2318
|
-
plugins: any[];
|
|
2326
|
+
plugins: any[] | undefined;
|
|
2319
2327
|
options: Partial<VePlayerBaseOptions> | undefined;
|
|
2328
|
+
isSameProtocol: boolean | "";
|
|
2329
|
+
useSrc: boolean | undefined;
|
|
2320
2330
|
}>;
|
|
2321
2331
|
private _handleFallback;
|
|
2322
2332
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2323
2333
|
private _transformEvent;
|
|
2324
2334
|
private _switch;
|
|
2335
|
+
private _switchDifferentProtocolUrl;
|
|
2325
2336
|
private _switchUrl;
|
|
2326
|
-
// 获取需要卸载和需要注册的播放插件
|
|
2327
|
-
private _diffPlugins;
|
|
2328
2337
|
private _callBeforePlayerInitForUrl;
|
|
2329
2338
|
}
|
|
2330
2339
|
declare const enum State {
|
|
@@ -2852,7 +2861,14 @@ declare namespace strategy {
|
|
|
2852
2861
|
/** {en}
|
|
2853
2862
|
* @brief Error.
|
|
2854
2863
|
*/
|
|
2855
|
-
Error = "Error"
|
|
2864
|
+
Error = "Error",
|
|
2865
|
+
/** {zh}
|
|
2866
|
+
* @brief 提示。
|
|
2867
|
+
*/
|
|
2868
|
+
/** {en}
|
|
2869
|
+
* @brief Warn.
|
|
2870
|
+
*/
|
|
2871
|
+
Warn = "Warn"
|
|
2856
2872
|
}
|
|
2857
2873
|
enum ErrorCode {
|
|
2858
2874
|
/** {zh}
|
|
@@ -3997,15 +4013,16 @@ declare namespace strategy {
|
|
|
3997
4013
|
options?: Partial<VePlayerBaseOptions>;
|
|
3998
4014
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3999
4015
|
plugins?: any[];
|
|
4016
|
+
useSrc?: boolean;
|
|
4000
4017
|
};
|
|
4001
4018
|
type PreparePlugins = (url: string) => Promise<PrepareResult> | undefined;
|
|
4002
4019
|
/** {zh}
|
|
4003
4020
|
* @detail option
|
|
4004
|
-
* @brief 视频的实际编码格式。如果您在degradation 设置了 SoftFirst 属性(即硬解不支持降级软解),建议您传入该参数,省去探测实际编码格式的操作。
|
|
4021
|
+
* @brief 视频的实际编码格式。如果您在 degradation 设置了 SoftFirst 属性(即硬解不支持降级软解),建议您传入该参数,省去探测实际编码格式的操作。
|
|
4005
4022
|
*/
|
|
4006
4023
|
/** {en}
|
|
4007
4024
|
* @detail option
|
|
4008
|
-
* @brief The actual codec of the video.
|
|
4025
|
+
* @brief The actual codec of the video. If you set the SoftFirst property in degradation (that is, hard solutions do not support downgrading soft solutions), it is recommended that you pass this parameter to save the operation of probing the actual encoding format.
|
|
4009
4026
|
*/
|
|
4010
4027
|
enum Codec {
|
|
4011
4028
|
/** {zh}
|
|
@@ -4186,21 +4203,29 @@ declare namespace strategy {
|
|
|
4186
4203
|
declare function getStreamType(url: string): "unknown" | "hls" | "flv" | "rtm" | "mp4" | "dash";
|
|
4187
4204
|
/** {zh}
|
|
4188
4205
|
* @detail api
|
|
4189
|
-
* @brief
|
|
4190
|
-
*
|
|
4191
|
-
*
|
|
4192
|
-
*
|
|
4206
|
+
* @brief 检查当前浏览器是否支持 MSE(MediaSource Extends)API,并检查 MSE API 是否支持传入的视频编码信息(MIME 格式)。
|
|
4207
|
+
* :::tip
|
|
4208
|
+
* 使用场景:检查 PC 端浏览器和 Android 端浏览器是否支持传入的编码信息。
|
|
4209
|
+
* :::
|
|
4210
|
+
* @param codec 待检查的媒体类型和编解码信息字符串,使用 MIME 格式表示,例如`video/mp4;codecs="av01.0.01M.08"`。
|
|
4211
|
+
* 您也可以使用如下参数值快速检查是否支持 H.264 和 H.265 视频编码格式。
|
|
4212
|
+
* - `Codec.H264`(默认值):检查 MSE 是否支持 H.264 编码格式,如果支持可满足大部分 H.264 视频播放。
|
|
4213
|
+
* - `Codec.H265`:检查 MSE 是否支持 H.265 编码格式,如果支持可满足大部分 H.265 视频播放。
|
|
4193
4214
|
* @returns
|
|
4194
4215
|
*/
|
|
4195
4216
|
/** {en}
|
|
4196
4217
|
* @detail api
|
|
4197
|
-
* @brief
|
|
4198
|
-
*
|
|
4199
|
-
*
|
|
4200
|
-
*
|
|
4218
|
+
* @brief Check whether the current browser supports the MSE (MediaSource Extends) API and check whether the MSE API supports the incoming video encoding information (MIME format).
|
|
4219
|
+
* :::tip
|
|
4220
|
+
* Usage scenario: Check whether the PC-side browser and Android-side browser support the incoming encoding information.
|
|
4221
|
+
* :::
|
|
4222
|
+
* @param codec The media type and codec information string to be checked is represented in MIME format, for example, `video/mp4;codecs="av01.0.01M.08"`.
|
|
4223
|
+
* You can also use the following parameter values to quickly check whether the H.264 and H.265 video coding formats are supported.
|
|
4224
|
+
* - `Codec.H264` (default value): Check if MSE supports the H.264 encoding format. If supported, it can meet the playback requirements of most H.264 videos.
|
|
4225
|
+
* - `Codec.H265`: Check if MSE supports the H.265 encoding format. If supported, it can meet the playback requirements of most H.265 videos.
|
|
4201
4226
|
* @returns
|
|
4202
4227
|
*/
|
|
4203
|
-
declare function isMseSupported(codec?: string): boolean;
|
|
4228
|
+
declare function isMseSupported(codec?: string | undefined): boolean;
|
|
4204
4229
|
/** {zh}
|
|
4205
4230
|
* @detail api
|
|
4206
4231
|
* @brief 当前浏览器是否支持软解。
|
|
@@ -4214,25 +4239,31 @@ declare function isMseSupported(codec?: string): boolean;
|
|
|
4214
4239
|
declare function isSoftDecodeSupported(): Promise<boolean>;
|
|
4215
4240
|
/** {zh}
|
|
4216
4241
|
* @detail api
|
|
4217
|
-
* @brief 判断当前浏览器是否支持 MMS(ManagedMediaSource) API
|
|
4242
|
+
* @brief 判断当前浏览器是否支持 MMS(ManagedMediaSource) API,并检查 MMS API 是否支持传入的视频编码信息(MIME 格式)。
|
|
4218
4243
|
* :::tip
|
|
4219
|
-
* -
|
|
4220
|
-
* - 使用场景:检查 Safari 浏览器是否满足 H.264 编码流拉流要求。
|
|
4244
|
+
* - 使用场景:检查 iOS 端 Safari 浏览器和 Chrome 浏览器是否支持传入的编码信息。
|
|
4221
4245
|
* - Safari 17.1 以上版本浏览器开始支持 MMS。
|
|
4222
4246
|
* :::
|
|
4223
4247
|
* @returns
|
|
4248
|
+
* @param codec 待检查的媒体类型和编解码信息字符串,使用 MIME 格式表示,例如`video/mp4;codecs="av01.0.01M.08"`。
|
|
4249
|
+
* 您也可以使用如下参数值快速检查是否支持 H.264 和 H.265 视频编码格式。
|
|
4250
|
+
* - `Codec.H264`(默认值):检查 MMS 是否支持 H.264 编码格式,如果支持可满足大部分 H.264 视频播放。
|
|
4251
|
+
* - `Codec.H265`:检查 MMS 是否支持 H.265 编码格式。如果支持可满足大部分 H.265 视频播放。
|
|
4224
4252
|
*/
|
|
4225
4253
|
/** {en}
|
|
4226
4254
|
* @detail api
|
|
4227
4255
|
* @returns
|
|
4228
|
-
* @brief
|
|
4256
|
+
* @brief Check whether the current browser supports the MMS (ManagedMediaSource) API and check whether the MMS API supports the incoming video encoding information (MIME format).
|
|
4229
4257
|
* :::tip
|
|
4230
|
-
* -
|
|
4231
|
-
* - Usage scenario: Check whether Safari browser meets the requirements for pulling H.264 encoded streams.
|
|
4258
|
+
* - Usage scenario: Check whether the Safari browser and Chrome browser on the iOS side support the incoming encoding information.
|
|
4232
4259
|
* - Browsers with iOS 17.1 or above start to support MMS.
|
|
4233
4260
|
* :::
|
|
4261
|
+
* @param codec The media type and codec information string to be checked is represented in MIME format, for example, `video/mp4;codecs="av01.0.01M.08"`.
|
|
4262
|
+
* You can also use the following parameter values to quickly check whether the H.264 and H.265 video coding formats are supported.
|
|
4263
|
+
* - `Codec.H264` (default value): Check if MMS supports the H.264 encoding format. If supported, it can meet the playback requirements of most H.264 videos.
|
|
4264
|
+
* - `Codec.H265`: Check if MMS supports the H.265 encoding format. If supported, it can meet the playback requirements of most H.265 videos.
|
|
4234
4265
|
*/
|
|
4235
|
-
declare function isMMSSupported(codec?: string): any;
|
|
4266
|
+
declare function isMMSSupported(codec?: string | undefined): any;
|
|
4236
4267
|
declare const util: {
|
|
4237
4268
|
getStreamType: typeof getStreamType;
|
|
4238
4269
|
isMseSupported: typeof isMseSupported;
|
|
@@ -4480,7 +4511,14 @@ declare namespace error {
|
|
|
4480
4511
|
/** {en}
|
|
4481
4512
|
* @brief Error.
|
|
4482
4513
|
*/
|
|
4483
|
-
Error = "Error"
|
|
4514
|
+
Error = "Error",
|
|
4515
|
+
/** {zh}
|
|
4516
|
+
* @brief 提示。
|
|
4517
|
+
*/
|
|
4518
|
+
/** {en}
|
|
4519
|
+
* @brief Warn.
|
|
4520
|
+
*/
|
|
4521
|
+
Warn = "Warn"
|
|
4484
4522
|
}
|
|
4485
4523
|
enum ErrorCode {
|
|
4486
4524
|
/** {zh}
|
|
@@ -5222,7 +5260,7 @@ interface LoggerConfig {
|
|
|
5222
5260
|
*/
|
|
5223
5261
|
deviceId?: string;
|
|
5224
5262
|
/** {zh}
|
|
5225
|
-
* @brief 报错时是否在报错面板显示当前用户
|
|
5263
|
+
* @brief 报错时是否在报错面板显示当前用户 ID 信息。
|
|
5226
5264
|
* @default true
|
|
5227
5265
|
*/
|
|
5228
5266
|
/** {en}
|
|
@@ -5299,7 +5337,7 @@ interface LiveVePlayerOptions extends VePlayerBaseOptions {
|
|
|
5299
5337
|
* @default 无
|
|
5300
5338
|
*/
|
|
5301
5339
|
/** {en}
|
|
5302
|
-
* @brief A list of built-in plug-ins to be disabled.
|
|
5340
|
+
* @brief A list of built-in plug-ins to be disabled. For the access method, please refer to [Plugin descriptions](https://docs.byteplus.com/en/docs/byteplus-media-live/docs-d8idjfeza4#disabling-plugins).
|
|
5303
5341
|
*/
|
|
5304
5342
|
ignores?: string[];
|
|
5305
5343
|
/** {zh}
|
|
@@ -5307,7 +5345,7 @@ interface LiveVePlayerOptions extends VePlayerBaseOptions {
|
|
|
5307
5345
|
* @default 无
|
|
5308
5346
|
*/
|
|
5309
5347
|
/** {en}
|
|
5310
|
-
* @brief The plug-in icon.
|
|
5348
|
+
* @brief The plug-in icon. For the access method, please refer to [Plugin descriptions](https://docs.byteplus.com/en/docs/byteplus-media-live/docs-d8idjfeza4#replacing-plugin-icons).
|
|
5311
5349
|
*/
|
|
5312
5350
|
icons?: any;
|
|
5313
5351
|
/** {zh}
|
|
@@ -5698,12 +5736,14 @@ interface Flv {
|
|
|
5698
5736
|
* - `true`:开启;
|
|
5699
5737
|
* - `false`:关闭
|
|
5700
5738
|
* @default false
|
|
5739
|
+
* @listtip 低延迟 FLV 拉流仅在 PC 端浏览器中生效。
|
|
5701
5740
|
*/
|
|
5702
5741
|
/** {en}
|
|
5703
5742
|
* @brief Whether to enable low latency when playing an FLV address. For example, if you have enabled low latency, and set GOP to 2 seconds, the average latency will be around 2 seconds.
|
|
5704
5743
|
* - `true`: Enable;
|
|
5705
5744
|
* - `false`: Disable.
|
|
5706
5745
|
* @default false
|
|
5746
|
+
* @listtip Low-latency FLV pull-streaming is only effective in PC browsers.
|
|
5707
5747
|
*/
|
|
5708
5748
|
enableLowLatency?: boolean;
|
|
5709
5749
|
/** {zh}
|
|
@@ -6461,7 +6501,35 @@ declare function isRTMSupported(): Promise<boolean>;
|
|
|
6461
6501
|
* @returns
|
|
6462
6502
|
*/
|
|
6463
6503
|
declare function isRTMSupportCodec(codec?: string): Promise<boolean>;
|
|
6464
|
-
|
|
6504
|
+
/** {zh}
|
|
6505
|
+
* @detail api
|
|
6506
|
+
* @brief 检查当前浏览器是否支持 FLV 格式流的编码信息。
|
|
6507
|
+
* :::tip
|
|
6508
|
+
* - 在 PC 端或 Android 端浏览器调用此方法,实现方法与 isMseSupported 方法实现相同。
|
|
6509
|
+
* - 在 iOS 端浏览器调用此方法,实现与 isMMSSupported 方法实现相同。
|
|
6510
|
+
* :::
|
|
6511
|
+
* @kind property
|
|
6512
|
+
* @returns
|
|
6513
|
+
* @param codec 待检查的媒体类型和编解码信息字符串,使用 MIME 格式表示,例如`video/mp4;codecs="av01.0.01M.08"`。
|
|
6514
|
+
* 您也可以使用如下参数值快速检查是否支持 H.264 和 H.265 视频编码格式。
|
|
6515
|
+
* - `Codec.H264`(默认值):检查是否支持 H.264 编码格式,如果支持可满足大部分 H.264 视频播放。
|
|
6516
|
+
* - `Codec.H265`:检查是否支持 H.265 编码格式。如果支持可满足大部分 H.265 视频播放。
|
|
6517
|
+
*/
|
|
6518
|
+
/** {en}
|
|
6519
|
+
* @detail api
|
|
6520
|
+
* @brief Check whether the current browser supports the encoding information of FLV format streams.
|
|
6521
|
+
* :::tip
|
|
6522
|
+
* - When this method is called in a browser on a PC or Android device, it is the same as when the isMseSupported method is called with the default encoding format.
|
|
6523
|
+
* - When this method is called in a browser on an iOS device, it is the same as when the isMMSSupported method is implemented.
|
|
6524
|
+
* :::
|
|
6525
|
+
* @kind property
|
|
6526
|
+
* @returns
|
|
6527
|
+
* @param codec The media type and codec information string to be checked is represented in MIME format, for example, `video/mp4;codecs="av01.0.01M.08"`.
|
|
6528
|
+
* You can also use the following parameter values to quickly check whether the H.264 and H.265 video coding formats are supported.
|
|
6529
|
+
* - `Codec.H264` (default value): Check if the H.264 encoding format is supported. If supported, it can meet the playback requirements of most H.264 videos.
|
|
6530
|
+
* - `Codec.H265`: Check if the H.265 encoding format is supported. If supported, it can meet the playback requirements of most H.265 videos.
|
|
6531
|
+
*/
|
|
6532
|
+
declare function isFLVSupported(codec?: string | undefined): boolean;
|
|
6465
6533
|
declare module MobilePlayerPanelWrapper {
|
|
6466
6534
|
export { MobilePlayerPanel };
|
|
6467
6535
|
}
|
|
@@ -6627,7 +6695,14 @@ declare namespace live {
|
|
|
6627
6695
|
/** {en}
|
|
6628
6696
|
* @brief Error.
|
|
6629
6697
|
*/
|
|
6630
|
-
Error = "Error"
|
|
6698
|
+
Error = "Error",
|
|
6699
|
+
/** {zh}
|
|
6700
|
+
* @brief 提示。
|
|
6701
|
+
*/
|
|
6702
|
+
/** {en}
|
|
6703
|
+
* @brief Warn.
|
|
6704
|
+
*/
|
|
6705
|
+
Warn = "Warn"
|
|
6631
6706
|
}
|
|
6632
6707
|
enum ErrorCode {
|
|
6633
6708
|
/** {zh}
|
|
@@ -9111,15 +9186,16 @@ declare namespace live {
|
|
|
9111
9186
|
options?: Partial<VePlayerBaseOptions>;
|
|
9112
9187
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9113
9188
|
plugins?: any[];
|
|
9189
|
+
useSrc?: boolean;
|
|
9114
9190
|
};
|
|
9115
9191
|
type PreparePlugins = (url: string) => Promise<PrepareResult> | undefined;
|
|
9116
9192
|
/** {zh}
|
|
9117
9193
|
* @detail option
|
|
9118
|
-
* @brief 视频的实际编码格式。如果您在degradation 设置了 SoftFirst 属性(即硬解不支持降级软解),建议您传入该参数,省去探测实际编码格式的操作。
|
|
9194
|
+
* @brief 视频的实际编码格式。如果您在 degradation 设置了 SoftFirst 属性(即硬解不支持降级软解),建议您传入该参数,省去探测实际编码格式的操作。
|
|
9119
9195
|
*/
|
|
9120
9196
|
/** {en}
|
|
9121
9197
|
* @detail option
|
|
9122
|
-
* @brief The actual codec of the video.
|
|
9198
|
+
* @brief The actual codec of the video. If you set the SoftFirst property in degradation (that is, hard solutions do not support downgrading soft solutions), it is recommended that you pass this parameter to save the operation of probing the actual encoding format.
|
|
9123
9199
|
*/
|
|
9124
9200
|
enum Codec {
|
|
9125
9201
|
/** {zh}
|
|
@@ -9795,16 +9871,17 @@ declare namespace live {
|
|
|
9795
9871
|
* @hidden
|
|
9796
9872
|
*/
|
|
9797
9873
|
prepare(url: string): Promise<{
|
|
9798
|
-
plugins: any[];
|
|
9874
|
+
plugins: any[] | undefined;
|
|
9799
9875
|
options: Partial<VePlayerBaseOptions> | undefined;
|
|
9876
|
+
isSameProtocol: boolean | "";
|
|
9877
|
+
useSrc: boolean | undefined;
|
|
9800
9878
|
}>;
|
|
9801
9879
|
private _handleFallback;
|
|
9802
9880
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9803
9881
|
private _transformEvent;
|
|
9804
9882
|
private _switch;
|
|
9883
|
+
private _switchDifferentProtocolUrl;
|
|
9805
9884
|
private _switchUrl;
|
|
9806
|
-
// 获取需要卸载和需要注册的播放插件
|
|
9807
|
-
private _diffPlugins;
|
|
9808
9885
|
private _callBeforePlayerInitForUrl;
|
|
9809
9886
|
}
|
|
9810
9887
|
/// <reference types="./loader" />
|
|
@@ -9900,21 +9977,29 @@ declare namespace live {
|
|
|
9900
9977
|
function getStreamType(url: string): "unknown" | "hls" | "flv" | "rtm" | "mp4" | "dash";
|
|
9901
9978
|
/** {zh}
|
|
9902
9979
|
* @detail api
|
|
9903
|
-
* @brief
|
|
9904
|
-
*
|
|
9905
|
-
*
|
|
9906
|
-
*
|
|
9980
|
+
* @brief 检查当前浏览器是否支持 MSE(MediaSource Extends)API,并检查 MSE API 是否支持传入的视频编码信息(MIME 格式)。
|
|
9981
|
+
* :::tip
|
|
9982
|
+
* 使用场景:检查 PC 端浏览器和 Android 端浏览器是否支持传入的编码信息。
|
|
9983
|
+
* :::
|
|
9984
|
+
* @param codec 待检查的媒体类型和编解码信息字符串,使用 MIME 格式表示,例如`video/mp4;codecs="av01.0.01M.08"`。
|
|
9985
|
+
* 您也可以使用如下参数值快速检查是否支持 H.264 和 H.265 视频编码格式。
|
|
9986
|
+
* - `Codec.H264`(默认值):检查 MSE 是否支持 H.264 编码格式,如果支持可满足大部分 H.264 视频播放。
|
|
9987
|
+
* - `Codec.H265`:检查 MSE 是否支持 H.265 编码格式,如果支持可满足大部分 H.265 视频播放。
|
|
9907
9988
|
* @returns
|
|
9908
9989
|
*/
|
|
9909
9990
|
/** {en}
|
|
9910
9991
|
* @detail api
|
|
9911
|
-
* @brief
|
|
9912
|
-
*
|
|
9913
|
-
*
|
|
9914
|
-
*
|
|
9992
|
+
* @brief Check whether the current browser supports the MSE (MediaSource Extends) API and check whether the MSE API supports the incoming video encoding information (MIME format).
|
|
9993
|
+
* :::tip
|
|
9994
|
+
* Usage scenario: Check whether the PC-side browser and Android-side browser support the incoming encoding information.
|
|
9995
|
+
* :::
|
|
9996
|
+
* @param codec The media type and codec information string to be checked is represented in MIME format, for example, `video/mp4;codecs="av01.0.01M.08"`.
|
|
9997
|
+
* You can also use the following parameter values to quickly check whether the H.264 and H.265 video coding formats are supported.
|
|
9998
|
+
* - `Codec.H264` (default value): Check if MSE supports the H.264 encoding format. If supported, it can meet the playback requirements of most H.264 videos.
|
|
9999
|
+
* - `Codec.H265`: Check if MSE supports the H.265 encoding format. If supported, it can meet the playback requirements of most H.265 videos.
|
|
9915
10000
|
* @returns
|
|
9916
10001
|
*/
|
|
9917
|
-
function isMseSupported(codec?: string): boolean;
|
|
10002
|
+
function isMseSupported(codec?: string | undefined): boolean;
|
|
9918
10003
|
/** {zh}
|
|
9919
10004
|
* @detail api
|
|
9920
10005
|
* @brief 当前浏览器是否支持软解。
|
|
@@ -9928,25 +10013,31 @@ declare namespace live {
|
|
|
9928
10013
|
function isSoftDecodeSupported(): Promise<boolean>;
|
|
9929
10014
|
/** {zh}
|
|
9930
10015
|
* @detail api
|
|
9931
|
-
* @brief 判断当前浏览器是否支持 MMS(ManagedMediaSource) API
|
|
10016
|
+
* @brief 判断当前浏览器是否支持 MMS(ManagedMediaSource) API,并检查 MMS API 是否支持传入的视频编码信息(MIME 格式)。
|
|
9932
10017
|
* :::tip
|
|
9933
|
-
* -
|
|
9934
|
-
* - 使用场景:检查 Safari 浏览器是否满足 H.264 编码流拉流要求。
|
|
10018
|
+
* - 使用场景:检查 iOS 端 Safari 浏览器和 Chrome 浏览器是否支持传入的编码信息。
|
|
9935
10019
|
* - Safari 17.1 以上版本浏览器开始支持 MMS。
|
|
9936
10020
|
* :::
|
|
9937
10021
|
* @returns
|
|
10022
|
+
* @param codec 待检查的媒体类型和编解码信息字符串,使用 MIME 格式表示,例如`video/mp4;codecs="av01.0.01M.08"`。
|
|
10023
|
+
* 您也可以使用如下参数值快速检查是否支持 H.264 和 H.265 视频编码格式。
|
|
10024
|
+
* - `Codec.H264`(默认值):检查 MMS 是否支持 H.264 编码格式,如果支持可满足大部分 H.264 视频播放。
|
|
10025
|
+
* - `Codec.H265`:检查 MMS 是否支持 H.265 编码格式。如果支持可满足大部分 H.265 视频播放。
|
|
9938
10026
|
*/
|
|
9939
10027
|
/** {en}
|
|
9940
10028
|
* @detail api
|
|
9941
10029
|
* @returns
|
|
9942
|
-
* @brief
|
|
10030
|
+
* @brief Check whether the current browser supports the MMS (ManagedMediaSource) API and check whether the MMS API supports the incoming video encoding information (MIME format).
|
|
9943
10031
|
* :::tip
|
|
9944
|
-
* -
|
|
9945
|
-
* - Usage scenario: Check whether Safari browser meets the requirements for pulling H.264 encoded streams.
|
|
10032
|
+
* - Usage scenario: Check whether the Safari browser and Chrome browser on the iOS side support the incoming encoding information.
|
|
9946
10033
|
* - Browsers with iOS 17.1 or above start to support MMS.
|
|
9947
10034
|
* :::
|
|
10035
|
+
* @param codec The media type and codec information string to be checked is represented in MIME format, for example, `video/mp4;codecs="av01.0.01M.08"`.
|
|
10036
|
+
* You can also use the following parameter values to quickly check whether the H.264 and H.265 video coding formats are supported.
|
|
10037
|
+
* - `Codec.H264` (default value): Check if MMS supports the H.264 encoding format. If supported, it can meet the playback requirements of most H.264 videos.
|
|
10038
|
+
* - `Codec.H265`: Check if MMS supports the H.265 encoding format. If supported, it can meet the playback requirements of most H.265 videos.
|
|
9948
10039
|
*/
|
|
9949
|
-
function isMMSSupported(codec?: string): any;
|
|
10040
|
+
function isMMSSupported(codec?: string | undefined): any;
|
|
9950
10041
|
const util: {
|
|
9951
10042
|
getStreamType: typeof getStreamType;
|
|
9952
10043
|
isMseSupported: typeof isMseSupported;
|
|
@@ -10189,6 +10280,7 @@ declare namespace live {
|
|
|
10189
10280
|
const EN$0: {
|
|
10190
10281
|
INVALID_PARAMETER: string;
|
|
10191
10282
|
INVALID_LOGGER: string;
|
|
10283
|
+
EMPTY_RTM_FALLBACK_PARAMETER: string;
|
|
10192
10284
|
FORMAT: string;
|
|
10193
10285
|
FPS: string;
|
|
10194
10286
|
BITRATE: string;
|
|
@@ -10262,6 +10354,7 @@ declare namespace live {
|
|
|
10262
10354
|
const ZH_CN$0: {
|
|
10263
10355
|
INVALID_PARAMETER: string;
|
|
10264
10356
|
INVALID_LOGGER: string;
|
|
10357
|
+
EMPTY_RTM_FALLBACK_PARAMETER: string;
|
|
10265
10358
|
FORMAT: string;
|
|
10266
10359
|
FPS: string;
|
|
10267
10360
|
BITRATE: string;
|
|
@@ -10348,6 +10441,10 @@ declare namespace live {
|
|
|
10348
10441
|
* @solution Please check whether the required parameters `url` and `playlist` are specified.
|
|
10349
10442
|
*/
|
|
10350
10443
|
INVALID_PARAMETER = 210,
|
|
10444
|
+
/**
|
|
10445
|
+
* @hidden
|
|
10446
|
+
*/
|
|
10447
|
+
EMPTY_RTM_FALLBACK_PARAMETER = 211,
|
|
10351
10448
|
/** {zh}
|
|
10352
10449
|
* @brief 日志错误
|
|
10353
10450
|
* @solution 未正确配置质量日志参数, 请参考 https://www.volcengine.com/docs/6469/138655#日志上报 配置。
|
|
@@ -10410,11 +10507,12 @@ declare namespace live {
|
|
|
10410
10507
|
MODULE_LOAD_ERROR: error.ErrorCode.MODULE_LOAD_ERROR;
|
|
10411
10508
|
UNKNOWN: error.ErrorCode.UNKNOWN;
|
|
10412
10509
|
INVALID_PARAMETER: LiveErrorCode.INVALID_PARAMETER;
|
|
10510
|
+
EMPTY_RTM_FALLBACK_PARAMETER: LiveErrorCode.EMPTY_RTM_FALLBACK_PARAMETER;
|
|
10413
10511
|
INVALID_LOGGER: LiveErrorCode.INVALID_LOGGER;
|
|
10414
10512
|
};
|
|
10415
10513
|
type ValueOf<T> = T[keyof T];
|
|
10416
10514
|
const ERRORS: Partial<Record<ValueOf<typeof ErrorCode$0>, error.ErrorInfo<TextKey$0>>>;
|
|
10417
|
-
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" | "INVALID_LOGGER" | "FORMAT" | "FPS" | "BITRATE" | "RESOLUTION" | "ENCODE_TYPE" | "BUFFER_END" | "CURRENT_TIME" | "DECODE_EFFICIENCY" | "DECODE_COST" | "DECODE_INFO">;
|
|
10515
|
+
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">;
|
|
10418
10516
|
/** {zh}
|
|
10419
10517
|
* @list option
|
|
10420
10518
|
* @kind property
|
|
@@ -10554,7 +10652,7 @@ declare namespace live {
|
|
|
10554
10652
|
*/
|
|
10555
10653
|
deviceId?: string;
|
|
10556
10654
|
/** {zh}
|
|
10557
|
-
* @brief 报错时是否在报错面板显示当前用户
|
|
10655
|
+
* @brief 报错时是否在报错面板显示当前用户 ID 信息。
|
|
10558
10656
|
* @default true
|
|
10559
10657
|
*/
|
|
10560
10658
|
/** {en}
|
|
@@ -10651,7 +10749,7 @@ declare namespace live {
|
|
|
10651
10749
|
* @default 无
|
|
10652
10750
|
*/
|
|
10653
10751
|
/** {en}
|
|
10654
|
-
* @brief A list of built-in plug-ins to be disabled.
|
|
10752
|
+
* @brief A list of built-in plug-ins to be disabled. For the access method, please refer to [Plugin descriptions](https://docs.byteplus.com/en/docs/byteplus-media-live/docs-d8idjfeza4#disabling-plugins).
|
|
10655
10753
|
*/
|
|
10656
10754
|
ignores?: string[];
|
|
10657
10755
|
/** {zh}
|
|
@@ -10659,7 +10757,7 @@ declare namespace live {
|
|
|
10659
10757
|
* @default 无
|
|
10660
10758
|
*/
|
|
10661
10759
|
/** {en}
|
|
10662
|
-
* @brief The plug-in icon.
|
|
10760
|
+
* @brief The plug-in icon. For the access method, please refer to [Plugin descriptions](https://docs.byteplus.com/en/docs/byteplus-media-live/docs-d8idjfeza4#replacing-plugin-icons).
|
|
10663
10761
|
*/
|
|
10664
10762
|
icons?: any;
|
|
10665
10763
|
/** {zh}
|
|
@@ -11050,12 +11148,14 @@ declare namespace live {
|
|
|
11050
11148
|
* - `true`:开启;
|
|
11051
11149
|
* - `false`:关闭
|
|
11052
11150
|
* @default false
|
|
11151
|
+
* @listtip 低延迟 FLV 拉流仅在 PC 端浏览器中生效。
|
|
11053
11152
|
*/
|
|
11054
11153
|
/** {en}
|
|
11055
11154
|
* @brief Whether to enable low latency when playing an FLV address. For example, if you have enabled low latency, and set GOP to 2 seconds, the average latency will be around 2 seconds.
|
|
11056
11155
|
* - `true`: Enable;
|
|
11057
11156
|
* - `false`: Disable.
|
|
11058
11157
|
* @default false
|
|
11158
|
+
* @listtip Low-latency FLV pull-streaming is only effective in PC browsers.
|
|
11059
11159
|
*/
|
|
11060
11160
|
enableLowLatency?: boolean;
|
|
11061
11161
|
/** {zh}
|