@volcengine/veplayer 2.5.0-rc.1 → 2.5.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 +80 -83
- package/esm/veplayer.biz.live.development.js +251 -35
- package/esm/veplayer.biz.live.production.js +1 -1
- package/esm/veplayer.d.ts +1249 -323
- package/esm/veplayer.development.js +198 -85
- package/esm/veplayer.live.d.ts +1250 -323
- package/esm/veplayer.live.development.js +198 -85
- package/esm/veplayer.live.production.js +3 -3
- package/esm/veplayer.production.js +3 -3
- package/esm/veplayer.vod.d.ts +80 -83
- package/esm/veplayer.vod.development.js +100 -56
- package/esm/veplayer.vod.production.js +2 -2
- package/package.json +1 -1
- package/umd/index.d.ts +80 -83
- package/umd/veplayer.biz.live.development.js +251 -35
- package/umd/veplayer.biz.live.production.js +1 -1
- package/umd/veplayer.d.ts +1249 -323
- package/umd/veplayer.development.js +198 -85
- package/umd/veplayer.live.d.ts +1250 -323
- package/umd/veplayer.live.development.js +198 -85
- package/umd/veplayer.live.production.js +1 -1
- package/umd/veplayer.production.js +1 -1
- package/umd/veplayer.vod.d.ts +80 -83
- package/umd/veplayer.vod.development.js +100 -56
- package/umd/veplayer.vod.production.js +1 -1
- package/veplayer.d.ts +1249 -323
- package/veplayer.live.d.ts +1250 -323
- package/veplayer.vod.d.ts +80 -83
package/veplayer.vod.d.ts
CHANGED
|
@@ -287,7 +287,7 @@ import MobilePanel = MobilePlayerPanelWrapper.MobilePlayerPanel;
|
|
|
287
287
|
*/
|
|
288
288
|
declare enum ListType {
|
|
289
289
|
/** {zh}
|
|
290
|
-
* @brief
|
|
290
|
+
* @brief 全屏布局。
|
|
291
291
|
* @hidden
|
|
292
292
|
*/
|
|
293
293
|
/** {en}
|
|
@@ -296,21 +296,21 @@ declare enum ListType {
|
|
|
296
296
|
*/
|
|
297
297
|
Middle = "middle",
|
|
298
298
|
/** {zh}
|
|
299
|
-
* @brief
|
|
299
|
+
* @brief 底部抽屉。
|
|
300
300
|
*/
|
|
301
301
|
/** {en}
|
|
302
302
|
* @brief Bottom navigation drawer.
|
|
303
303
|
*/
|
|
304
304
|
Bottom = "bottom",
|
|
305
305
|
/** {zh}
|
|
306
|
-
* @brief
|
|
306
|
+
* @brief 右侧抽屉,常用于全屏时展示。
|
|
307
307
|
*/
|
|
308
308
|
/** {en}
|
|
309
309
|
* @brief Right navigation drawer. This is often used for fullscreen display.
|
|
310
310
|
*/
|
|
311
311
|
Fullscreen = "fullscreen",
|
|
312
312
|
/** {zh}
|
|
313
|
-
* @brief
|
|
313
|
+
* @brief 窗口蒙层展示。
|
|
314
314
|
*/
|
|
315
315
|
/** {en}
|
|
316
316
|
* @brief Overlay.
|
|
@@ -398,14 +398,15 @@ declare class OptionsIcon extends Plugin {
|
|
|
398
398
|
}
|
|
399
399
|
/** {zh}
|
|
400
400
|
* @detail error
|
|
401
|
+
* @brief 错误等级。
|
|
401
402
|
*/
|
|
402
403
|
/** {en}
|
|
403
404
|
* @detail error
|
|
405
|
+
* @brief Error level.
|
|
404
406
|
*/
|
|
405
407
|
declare enum Level {
|
|
406
408
|
/** {zh}
|
|
407
|
-
* @brief
|
|
408
|
-
*
|
|
409
|
+
* @brief 严重。
|
|
409
410
|
*/
|
|
410
411
|
/** {en}
|
|
411
412
|
* @brief Fatal.
|
|
@@ -413,7 +414,7 @@ declare enum Level {
|
|
|
413
414
|
*/
|
|
414
415
|
Fatal = "Fatal",
|
|
415
416
|
/** {zh}
|
|
416
|
-
* @brief
|
|
417
|
+
* @brief 报错。
|
|
417
418
|
*/
|
|
418
419
|
/** {en}
|
|
419
420
|
* @brief Error.
|
|
@@ -779,7 +780,7 @@ interface ErrorInfo<T = TextKey> {
|
|
|
779
780
|
/** {zh}
|
|
780
781
|
* @list error
|
|
781
782
|
* @detail error
|
|
782
|
-
* @brief
|
|
783
|
+
* @brief 错误对象。
|
|
783
784
|
* @name VeError
|
|
784
785
|
* @id VeError
|
|
785
786
|
*/
|
|
@@ -791,11 +792,11 @@ interface ErrorInfo<T = TextKey> {
|
|
|
791
792
|
* @id VeError
|
|
792
793
|
*/
|
|
793
794
|
declare class VeError<T extends string = TextKey> extends Error {
|
|
794
|
-
/**
|
|
795
|
+
/** {zh}
|
|
795
796
|
* @brief 错误码。
|
|
796
797
|
*/
|
|
797
798
|
/** {en}
|
|
798
|
-
* @brief
|
|
799
|
+
* @brief Error code.
|
|
799
800
|
*/
|
|
800
801
|
readonly errorCode: ErrorCode;
|
|
801
802
|
/** {zh}
|
|
@@ -1099,11 +1100,9 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
|
|
|
1099
1100
|
poster?: string;
|
|
1100
1101
|
/** {zh}
|
|
1101
1102
|
* @brief 为播放器设置初始显示语言,语言包不存在的情况下默认显示 'en' 语言包 。默认值为 `document.documentElement.getAttribute('lang') || navigator.language || 'zh-cn'`
|
|
1102
|
-
* @default -
|
|
1103
1103
|
*/
|
|
1104
1104
|
/** {en}
|
|
1105
1105
|
* @brief The initial display language of the player. If the language pack does not exist, the 'en'language pack will be displayed by default. The default value is `document.documentElement.getAttribute('lang') || navigator.language || 'zh-cn'`.
|
|
1106
|
-
* @default -
|
|
1107
1106
|
*/
|
|
1108
1107
|
lang?: Lang;
|
|
1109
1108
|
/** {zh}
|
|
@@ -1162,25 +1161,20 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
|
|
|
1162
1161
|
* @brief Whether to display the full-screen button.
|
|
1163
1162
|
* - `true`: Display;
|
|
1164
1163
|
* - `false`: Do not display.
|
|
1165
|
-
* @default -
|
|
1166
1164
|
*/
|
|
1167
1165
|
fullscreen?: boolean | Fullscreen;
|
|
1168
1166
|
/** {zh}
|
|
1169
1167
|
* @brief 为播放器设置报错信息,支持配置播放异常时,播放器显示的异常文案、图片,以及是否提供刷新按钮等。
|
|
1170
|
-
* @default -
|
|
1171
1168
|
*/
|
|
1172
1169
|
/** {en}
|
|
1173
1170
|
* @brief The error message of the player. When a playback error occurs, you can configure the error message and image displayed and whether to display the refresh button.
|
|
1174
|
-
* @default -
|
|
1175
1171
|
*/
|
|
1176
1172
|
error?: ErrorConfig;
|
|
1177
1173
|
/** {zh}
|
|
1178
1174
|
* @brief 为播放器设置清晰度的相关配置。
|
|
1179
|
-
* @default -
|
|
1180
1175
|
*/
|
|
1181
1176
|
/** {en}
|
|
1182
1177
|
* @brief Resolution-related configurations.
|
|
1183
|
-
* @default -
|
|
1184
1178
|
*/
|
|
1185
1179
|
definition?: DefinitionConfig;
|
|
1186
1180
|
/** {zh}
|
|
@@ -1441,8 +1435,7 @@ interface Fullscreen {
|
|
|
1441
1435
|
* `true`: Display;
|
|
1442
1436
|
* `false`: Do not display.
|
|
1443
1437
|
* @default false
|
|
1444
|
-
* @brief
|
|
1445
|
-
* Whether to display a return button at the top-right corner when the player is in full-screen mode. This feature is usually turned on on mobile devices.
|
|
1438
|
+
* @brief Whether to display a return button at the top-right corner when the player is in full-screen mode. This feature is usually turned on on mobile devices.
|
|
1446
1439
|
* - `true`: Display;
|
|
1447
1440
|
* - `false`: Do not display.
|
|
1448
1441
|
*/
|
|
@@ -1460,7 +1453,7 @@ interface Fullscreen {
|
|
|
1460
1453
|
*/
|
|
1461
1454
|
interface CommonStyle {
|
|
1462
1455
|
/** {zh}
|
|
1463
|
-
* @brief
|
|
1456
|
+
* @brief 进度条底色。
|
|
1464
1457
|
* @default 无
|
|
1465
1458
|
*/
|
|
1466
1459
|
/** {en}
|
|
@@ -1468,7 +1461,7 @@ interface CommonStyle {
|
|
|
1468
1461
|
*/
|
|
1469
1462
|
progressColor?: string;
|
|
1470
1463
|
/** {zh}
|
|
1471
|
-
* @brief
|
|
1464
|
+
* @brief 播放完成部分进度条底色。
|
|
1472
1465
|
* @default 无
|
|
1473
1466
|
*/
|
|
1474
1467
|
/** {en}
|
|
@@ -1476,7 +1469,7 @@ interface CommonStyle {
|
|
|
1476
1469
|
*/
|
|
1477
1470
|
playedColor?: string;
|
|
1478
1471
|
/** {zh}
|
|
1479
|
-
* @brief
|
|
1472
|
+
* @brief 缓存部分进度条底色。
|
|
1480
1473
|
* @default 无
|
|
1481
1474
|
*/
|
|
1482
1475
|
/** {en}
|
|
@@ -1485,7 +1478,7 @@ interface CommonStyle {
|
|
|
1485
1478
|
*/
|
|
1486
1479
|
cachedColor?: string;
|
|
1487
1480
|
/** {zh}
|
|
1488
|
-
* @brief
|
|
1481
|
+
* @brief 进度条滑块样式。
|
|
1489
1482
|
* @default 无
|
|
1490
1483
|
*/
|
|
1491
1484
|
/** {en}
|
|
@@ -1496,7 +1489,7 @@ interface CommonStyle {
|
|
|
1496
1489
|
[propName: string]: any;
|
|
1497
1490
|
};
|
|
1498
1491
|
/** {zh}
|
|
1499
|
-
* @brief
|
|
1492
|
+
* @brief 音量颜色。
|
|
1500
1493
|
* @default 无
|
|
1501
1494
|
*/
|
|
1502
1495
|
/** {en}
|
|
@@ -1520,14 +1513,14 @@ type PreparePlugins = (url: string) => Promise<PrepareResult> | undefined;
|
|
|
1520
1513
|
*/
|
|
1521
1514
|
declare enum Codec {
|
|
1522
1515
|
/** {zh}
|
|
1523
|
-
* @brief H.265
|
|
1516
|
+
* @brief H.265 编码格式。
|
|
1524
1517
|
*/
|
|
1525
1518
|
/** {en}
|
|
1526
1519
|
* @brief H.265.
|
|
1527
1520
|
*/
|
|
1528
1521
|
H265 = "h265",
|
|
1529
1522
|
/** {zh}
|
|
1530
|
-
* @brief H.264
|
|
1523
|
+
* @brief H.264 编码格式。
|
|
1531
1524
|
*/
|
|
1532
1525
|
/** {en}
|
|
1533
1526
|
* @brief H.264.
|
|
@@ -1544,18 +1537,18 @@ declare enum Codec {
|
|
|
1544
1537
|
*/
|
|
1545
1538
|
declare enum Degradation {
|
|
1546
1539
|
/** {zh}
|
|
1547
|
-
* @brief
|
|
1540
|
+
* @brief 硬解不支持时,优先降级到软解。
|
|
1548
1541
|
*/
|
|
1549
1542
|
/** {en}
|
|
1550
|
-
* @brief
|
|
1543
|
+
* @brief When hardware decoding is not supported, prioritize downgrading to software decoding.
|
|
1551
1544
|
*/
|
|
1552
1545
|
SoftFirst = "soft-first",
|
|
1553
1546
|
/** {zh}
|
|
1554
|
-
* @brief
|
|
1547
|
+
* @brief 硬解不支持时,优先降级到 H.264 解码。
|
|
1555
1548
|
* @hidden
|
|
1556
1549
|
*/
|
|
1557
1550
|
/** {en}
|
|
1558
|
-
* @brief
|
|
1551
|
+
* @brief When hardware decoding is not supported, prioritize downgrading to H.264 decoding.
|
|
1559
1552
|
* @hidden
|
|
1560
1553
|
*/
|
|
1561
1554
|
H264First = "h264-first"
|
|
@@ -1572,14 +1565,14 @@ declare enum Degradation {
|
|
|
1572
1565
|
*/
|
|
1573
1566
|
declare enum DecodeType {
|
|
1574
1567
|
/** {zh}
|
|
1575
|
-
* @brief
|
|
1568
|
+
* @brief 软解。
|
|
1576
1569
|
*/
|
|
1577
1570
|
/** {en}
|
|
1578
1571
|
* @brief Software decoding.
|
|
1579
1572
|
*/
|
|
1580
1573
|
Software = "software",
|
|
1581
1574
|
/** {zh}
|
|
1582
|
-
* @brief
|
|
1575
|
+
* @brief 硬解。
|
|
1583
1576
|
*/
|
|
1584
1577
|
/** {en}
|
|
1585
1578
|
* @brief Hardware decoding.
|
|
@@ -1732,6 +1725,11 @@ declare class VePlayerBase {
|
|
|
1732
1725
|
/** {zh}
|
|
1733
1726
|
* 获取播放器版本号
|
|
1734
1727
|
* @returns
|
|
1728
|
+
* @brief
|
|
1729
|
+
* 获取播放器 SDK 版本号。
|
|
1730
|
+
*/
|
|
1731
|
+
/** {en}
|
|
1732
|
+
* @brief Retrieve the player SDK version number.
|
|
1735
1733
|
*/
|
|
1736
1734
|
get playerVersion(): string;
|
|
1737
1735
|
/** {zh}
|
|
@@ -1819,8 +1817,8 @@ declare class VePlayerBase {
|
|
|
1819
1817
|
static create<T extends VePlayerBase>(options?: VePlayerBaseOptions, Constructor?: Constructor<T>): Promise<T>;
|
|
1820
1818
|
/** {zh}
|
|
1821
1819
|
* @brief 调用此方法切换拉流地址、线路、清晰度。
|
|
1822
|
-
* @param target
|
|
1823
|
-
* @param options
|
|
1820
|
+
* @param target 目标地址,可以是播放地址,也可以是线路和清晰度。
|
|
1821
|
+
* @param options 更多配置信息。
|
|
1824
1822
|
*/
|
|
1825
1823
|
/** {en}
|
|
1826
1824
|
* @brief Switches the pull stream address, playback source, or resolution.
|
|
@@ -1857,11 +1855,12 @@ declare class VePlayerBase {
|
|
|
1857
1855
|
*/
|
|
1858
1856
|
fallbackToFirstDefinition?: boolean;
|
|
1859
1857
|
/** {zh}
|
|
1860
|
-
* @brief
|
|
1861
|
-
* - true: 无缝切换
|
|
1862
|
-
* - false: 非无缝切换
|
|
1858
|
+
* @brief 是否无缝切换,true 为无缝切换,false 为非无缝切换。
|
|
1863
1859
|
* @default false
|
|
1864
1860
|
*/
|
|
1861
|
+
/** {en}
|
|
1862
|
+
* @brief Whether seamless switching or not. True means seamless switching and false means non-seamless switching.
|
|
1863
|
+
*/
|
|
1865
1864
|
seamless?: boolean;
|
|
1866
1865
|
}): Promise<ExposedDefinition>;
|
|
1867
1866
|
/** {zh}
|
|
@@ -1897,16 +1896,15 @@ declare class VePlayerBase {
|
|
|
1897
1896
|
source?: string;
|
|
1898
1897
|
}): Promise<void>;
|
|
1899
1898
|
// TODO: 等西瓜播放器完善错误码后增加函数重载以提供更好的类型
|
|
1900
|
-
/**
|
|
1901
1899
|
/** {zh}
|
|
1902
1900
|
* @brief 调用此方法监听指定事件,事件处理函数只执行一次。
|
|
1903
1901
|
* @param event 表示事件的名称。
|
|
1904
1902
|
* @param callback 表示事件的回调函数。
|
|
1905
1903
|
*/
|
|
1906
1904
|
/** {en}
|
|
1907
|
-
* @brief
|
|
1908
|
-
* @param event The event
|
|
1909
|
-
* @param callback
|
|
1905
|
+
* @brief Call this method to listen for the specified event. The event handler is executed only once.
|
|
1906
|
+
* @param event The name representing the event.
|
|
1907
|
+
* @param callback Callback functions representing events.
|
|
1910
1908
|
*/
|
|
1911
1909
|
once(event: string, callback: (data?: any) => any): void;
|
|
1912
1910
|
/** {zh}
|
|
@@ -2032,10 +2030,14 @@ declare class VePlayerBase {
|
|
|
2032
2030
|
ignorePaused?: boolean;
|
|
2033
2031
|
}): void;
|
|
2034
2032
|
/** {zh}
|
|
2035
|
-
* @brief
|
|
2036
|
-
* @param type
|
|
2033
|
+
* @brief 判断浏览器是否支持播放格式。
|
|
2034
|
+
* @param type 播放格式。
|
|
2037
2035
|
* @returns
|
|
2038
2036
|
*/
|
|
2037
|
+
/** {en}
|
|
2038
|
+
* @brief Determine whether the browser supports the playback format.
|
|
2039
|
+
* @param type The playback format.
|
|
2040
|
+
*/
|
|
2039
2041
|
canPlayType(type: string): boolean;
|
|
2040
2042
|
/** {zh}
|
|
2041
2043
|
* @brief 调用此方法进入系统全屏状态。如果该方法调用的时候处于网页全屏状态会自动退出网页全屏,下发事件 `Events.FULLSCREEN_CHANGE`。
|
|
@@ -2115,7 +2117,7 @@ declare class VePlayerBase {
|
|
|
2115
2117
|
unRegisterPlugin(plugin: any): void;
|
|
2116
2118
|
/** {zh}
|
|
2117
2119
|
* @brief 调用此接口显示指定插件图标。
|
|
2118
|
-
* @param pluginNames
|
|
2120
|
+
* @param pluginNames 插件名称。
|
|
2119
2121
|
*/
|
|
2120
2122
|
/** {en}
|
|
2121
2123
|
* @brief Displays the icon of a specified plugin.
|
|
@@ -2124,7 +2126,7 @@ declare class VePlayerBase {
|
|
|
2124
2126
|
showIcon(pluginNames: string[]): void;
|
|
2125
2127
|
/** {zh}
|
|
2126
2128
|
* @brief 调用此接口隐藏指定插件图标。
|
|
2127
|
-
* @param pluginNames
|
|
2129
|
+
* @param pluginNames 插件名称。
|
|
2128
2130
|
*/
|
|
2129
2131
|
/** {en}
|
|
2130
2132
|
* @brief Hides the icon of a specified plugin.
|
|
@@ -2545,7 +2547,7 @@ declare namespace strategy {
|
|
|
2545
2547
|
*/
|
|
2546
2548
|
enum ListType {
|
|
2547
2549
|
/** {zh}
|
|
2548
|
-
* @brief
|
|
2550
|
+
* @brief 全屏布局。
|
|
2549
2551
|
* @hidden
|
|
2550
2552
|
*/
|
|
2551
2553
|
/** {en}
|
|
@@ -2554,21 +2556,21 @@ declare namespace strategy {
|
|
|
2554
2556
|
*/
|
|
2555
2557
|
Middle = "middle",
|
|
2556
2558
|
/** {zh}
|
|
2557
|
-
* @brief
|
|
2559
|
+
* @brief 底部抽屉。
|
|
2558
2560
|
*/
|
|
2559
2561
|
/** {en}
|
|
2560
2562
|
* @brief Bottom navigation drawer.
|
|
2561
2563
|
*/
|
|
2562
2564
|
Bottom = "bottom",
|
|
2563
2565
|
/** {zh}
|
|
2564
|
-
* @brief
|
|
2566
|
+
* @brief 右侧抽屉,常用于全屏时展示。
|
|
2565
2567
|
*/
|
|
2566
2568
|
/** {en}
|
|
2567
2569
|
* @brief Right navigation drawer. This is often used for fullscreen display.
|
|
2568
2570
|
*/
|
|
2569
2571
|
Fullscreen = "fullscreen",
|
|
2570
2572
|
/** {zh}
|
|
2571
|
-
* @brief
|
|
2573
|
+
* @brief 窗口蒙层展示。
|
|
2572
2574
|
*/
|
|
2573
2575
|
/** {en}
|
|
2574
2576
|
* @brief Overlay.
|
|
@@ -2656,14 +2658,15 @@ declare namespace strategy {
|
|
|
2656
2658
|
}
|
|
2657
2659
|
/** {zh}
|
|
2658
2660
|
* @detail error
|
|
2661
|
+
* @brief 错误等级。
|
|
2659
2662
|
*/
|
|
2660
2663
|
/** {en}
|
|
2661
2664
|
* @detail error
|
|
2665
|
+
* @brief Error level.
|
|
2662
2666
|
*/
|
|
2663
2667
|
enum Level {
|
|
2664
2668
|
/** {zh}
|
|
2665
|
-
* @brief
|
|
2666
|
-
*
|
|
2669
|
+
* @brief 严重。
|
|
2667
2670
|
*/
|
|
2668
2671
|
/** {en}
|
|
2669
2672
|
* @brief Fatal.
|
|
@@ -2671,7 +2674,7 @@ declare namespace strategy {
|
|
|
2671
2674
|
*/
|
|
2672
2675
|
Fatal = "Fatal",
|
|
2673
2676
|
/** {zh}
|
|
2674
|
-
* @brief
|
|
2677
|
+
* @brief 报错。
|
|
2675
2678
|
*/
|
|
2676
2679
|
/** {en}
|
|
2677
2680
|
* @brief Error.
|
|
@@ -3039,7 +3042,7 @@ declare namespace strategy {
|
|
|
3039
3042
|
/** {zh}
|
|
3040
3043
|
* @list error
|
|
3041
3044
|
* @detail error
|
|
3042
|
-
* @brief
|
|
3045
|
+
* @brief 错误对象。
|
|
3043
3046
|
* @name VeError
|
|
3044
3047
|
* @id VeError
|
|
3045
3048
|
*/
|
|
@@ -3051,11 +3054,11 @@ declare namespace strategy {
|
|
|
3051
3054
|
* @id VeError
|
|
3052
3055
|
*/
|
|
3053
3056
|
class VeError<T extends string = TextKey> extends Error {
|
|
3054
|
-
/**
|
|
3057
|
+
/** {zh}
|
|
3055
3058
|
* @brief 错误码。
|
|
3056
3059
|
*/
|
|
3057
3060
|
/** {en}
|
|
3058
|
-
* @brief
|
|
3061
|
+
* @brief Error code.
|
|
3059
3062
|
*/
|
|
3060
3063
|
readonly errorCode: ErrorCode;
|
|
3061
3064
|
/** {zh}
|
|
@@ -3420,11 +3423,9 @@ declare namespace strategy {
|
|
|
3420
3423
|
poster?: string;
|
|
3421
3424
|
/** {zh}
|
|
3422
3425
|
* @brief 为播放器设置初始显示语言,语言包不存在的情况下默认显示 'en' 语言包 。默认值为 `document.documentElement.getAttribute('lang') || navigator.language || 'zh-cn'`
|
|
3423
|
-
* @default -
|
|
3424
3426
|
*/
|
|
3425
3427
|
/** {en}
|
|
3426
3428
|
* @brief The initial display language of the player. If the language pack does not exist, the 'en'language pack will be displayed by default. The default value is `document.documentElement.getAttribute('lang') || navigator.language || 'zh-cn'`.
|
|
3427
|
-
* @default -
|
|
3428
3429
|
*/
|
|
3429
3430
|
lang?: Lang;
|
|
3430
3431
|
/** {zh}
|
|
@@ -3483,25 +3484,20 @@ declare namespace strategy {
|
|
|
3483
3484
|
* @brief Whether to display the full-screen button.
|
|
3484
3485
|
* - `true`: Display;
|
|
3485
3486
|
* - `false`: Do not display.
|
|
3486
|
-
* @default -
|
|
3487
3487
|
*/
|
|
3488
3488
|
fullscreen?: boolean | Fullscreen;
|
|
3489
3489
|
/** {zh}
|
|
3490
3490
|
* @brief 为播放器设置报错信息,支持配置播放异常时,播放器显示的异常文案、图片,以及是否提供刷新按钮等。
|
|
3491
|
-
* @default -
|
|
3492
3491
|
*/
|
|
3493
3492
|
/** {en}
|
|
3494
3493
|
* @brief The error message of the player. When a playback error occurs, you can configure the error message and image displayed and whether to display the refresh button.
|
|
3495
|
-
* @default -
|
|
3496
3494
|
*/
|
|
3497
3495
|
error?: ErrorConfig;
|
|
3498
3496
|
/** {zh}
|
|
3499
3497
|
* @brief 为播放器设置清晰度的相关配置。
|
|
3500
|
-
* @default -
|
|
3501
3498
|
*/
|
|
3502
3499
|
/** {en}
|
|
3503
3500
|
* @brief Resolution-related configurations.
|
|
3504
|
-
* @default -
|
|
3505
3501
|
*/
|
|
3506
3502
|
definition?: DefinitionConfig;
|
|
3507
3503
|
/** {zh}
|
|
@@ -3762,8 +3758,7 @@ declare namespace strategy {
|
|
|
3762
3758
|
* `true`: Display;
|
|
3763
3759
|
* `false`: Do not display.
|
|
3764
3760
|
* @default false
|
|
3765
|
-
* @brief
|
|
3766
|
-
* Whether to display a return button at the top-right corner when the player is in full-screen mode. This feature is usually turned on on mobile devices.
|
|
3761
|
+
* @brief Whether to display a return button at the top-right corner when the player is in full-screen mode. This feature is usually turned on on mobile devices.
|
|
3767
3762
|
* - `true`: Display;
|
|
3768
3763
|
* - `false`: Do not display.
|
|
3769
3764
|
*/
|
|
@@ -3781,7 +3776,7 @@ declare namespace strategy {
|
|
|
3781
3776
|
*/
|
|
3782
3777
|
interface CommonStyle {
|
|
3783
3778
|
/** {zh}
|
|
3784
|
-
* @brief
|
|
3779
|
+
* @brief 进度条底色。
|
|
3785
3780
|
* @default 无
|
|
3786
3781
|
*/
|
|
3787
3782
|
/** {en}
|
|
@@ -3789,7 +3784,7 @@ declare namespace strategy {
|
|
|
3789
3784
|
*/
|
|
3790
3785
|
progressColor?: string;
|
|
3791
3786
|
/** {zh}
|
|
3792
|
-
* @brief
|
|
3787
|
+
* @brief 播放完成部分进度条底色。
|
|
3793
3788
|
* @default 无
|
|
3794
3789
|
*/
|
|
3795
3790
|
/** {en}
|
|
@@ -3797,7 +3792,7 @@ declare namespace strategy {
|
|
|
3797
3792
|
*/
|
|
3798
3793
|
playedColor?: string;
|
|
3799
3794
|
/** {zh}
|
|
3800
|
-
* @brief
|
|
3795
|
+
* @brief 缓存部分进度条底色。
|
|
3801
3796
|
* @default 无
|
|
3802
3797
|
*/
|
|
3803
3798
|
/** {en}
|
|
@@ -3806,7 +3801,7 @@ declare namespace strategy {
|
|
|
3806
3801
|
*/
|
|
3807
3802
|
cachedColor?: string;
|
|
3808
3803
|
/** {zh}
|
|
3809
|
-
* @brief
|
|
3804
|
+
* @brief 进度条滑块样式。
|
|
3810
3805
|
* @default 无
|
|
3811
3806
|
*/
|
|
3812
3807
|
/** {en}
|
|
@@ -3817,7 +3812,7 @@ declare namespace strategy {
|
|
|
3817
3812
|
[propName: string]: any;
|
|
3818
3813
|
};
|
|
3819
3814
|
/** {zh}
|
|
3820
|
-
* @brief
|
|
3815
|
+
* @brief 音量颜色。
|
|
3821
3816
|
* @default 无
|
|
3822
3817
|
*/
|
|
3823
3818
|
/** {en}
|
|
@@ -3841,14 +3836,14 @@ declare namespace strategy {
|
|
|
3841
3836
|
*/
|
|
3842
3837
|
enum Codec {
|
|
3843
3838
|
/** {zh}
|
|
3844
|
-
* @brief H.265
|
|
3839
|
+
* @brief H.265 编码格式。
|
|
3845
3840
|
*/
|
|
3846
3841
|
/** {en}
|
|
3847
3842
|
* @brief H.265.
|
|
3848
3843
|
*/
|
|
3849
3844
|
H265 = "h265",
|
|
3850
3845
|
/** {zh}
|
|
3851
|
-
* @brief H.264
|
|
3846
|
+
* @brief H.264 编码格式。
|
|
3852
3847
|
*/
|
|
3853
3848
|
/** {en}
|
|
3854
3849
|
* @brief H.264.
|
|
@@ -3865,18 +3860,18 @@ declare namespace strategy {
|
|
|
3865
3860
|
*/
|
|
3866
3861
|
enum Degradation {
|
|
3867
3862
|
/** {zh}
|
|
3868
|
-
* @brief
|
|
3863
|
+
* @brief 硬解不支持时,优先降级到软解。
|
|
3869
3864
|
*/
|
|
3870
3865
|
/** {en}
|
|
3871
|
-
* @brief
|
|
3866
|
+
* @brief When hardware decoding is not supported, prioritize downgrading to software decoding.
|
|
3872
3867
|
*/
|
|
3873
3868
|
SoftFirst = "soft-first",
|
|
3874
3869
|
/** {zh}
|
|
3875
|
-
* @brief
|
|
3870
|
+
* @brief 硬解不支持时,优先降级到 H.264 解码。
|
|
3876
3871
|
* @hidden
|
|
3877
3872
|
*/
|
|
3878
3873
|
/** {en}
|
|
3879
|
-
* @brief
|
|
3874
|
+
* @brief When hardware decoding is not supported, prioritize downgrading to H.264 decoding.
|
|
3880
3875
|
* @hidden
|
|
3881
3876
|
*/
|
|
3882
3877
|
H264First = "h264-first"
|
|
@@ -3893,14 +3888,14 @@ declare namespace strategy {
|
|
|
3893
3888
|
*/
|
|
3894
3889
|
enum DecodeType {
|
|
3895
3890
|
/** {zh}
|
|
3896
|
-
* @brief
|
|
3891
|
+
* @brief 软解。
|
|
3897
3892
|
*/
|
|
3898
3893
|
/** {en}
|
|
3899
3894
|
* @brief Software decoding.
|
|
3900
3895
|
*/
|
|
3901
3896
|
Software = "software",
|
|
3902
3897
|
/** {zh}
|
|
3903
|
-
* @brief
|
|
3898
|
+
* @brief 硬解。
|
|
3904
3899
|
*/
|
|
3905
3900
|
/** {en}
|
|
3906
3901
|
* @brief Hardware decoding.
|
|
@@ -3999,6 +3994,7 @@ declare namespace strategy {
|
|
|
3999
3994
|
}
|
|
4000
3995
|
type StrategyCreator<T, R extends keyof ModulesMap = any> = (options?: T) => Strategy<T, R>;
|
|
4001
3996
|
const createFlvMseStrategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginFlv>;
|
|
3997
|
+
const createFlvMssStrategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginFlv>;
|
|
4002
3998
|
const createHlsMseStrategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginHls>;
|
|
4003
3999
|
const createSoftDecodeH264Strategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginXgvideo>;
|
|
4004
4000
|
const createSoftDecodeH265Strategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginXgvideo>;
|
|
@@ -4162,14 +4158,15 @@ declare namespace error {
|
|
|
4162
4158
|
}
|
|
4163
4159
|
/** {zh}
|
|
4164
4160
|
* @detail error
|
|
4161
|
+
* @brief 错误等级。
|
|
4165
4162
|
*/
|
|
4166
4163
|
/** {en}
|
|
4167
4164
|
* @detail error
|
|
4165
|
+
* @brief Error level.
|
|
4168
4166
|
*/
|
|
4169
4167
|
enum Level {
|
|
4170
4168
|
/** {zh}
|
|
4171
|
-
* @brief
|
|
4172
|
-
*
|
|
4169
|
+
* @brief 严重。
|
|
4173
4170
|
*/
|
|
4174
4171
|
/** {en}
|
|
4175
4172
|
* @brief Fatal.
|
|
@@ -4177,7 +4174,7 @@ declare namespace error {
|
|
|
4177
4174
|
*/
|
|
4178
4175
|
Fatal = "Fatal",
|
|
4179
4176
|
/** {zh}
|
|
4180
|
-
* @brief
|
|
4177
|
+
* @brief 报错。
|
|
4181
4178
|
*/
|
|
4182
4179
|
/** {en}
|
|
4183
4180
|
* @brief Error.
|
|
@@ -4545,7 +4542,7 @@ declare namespace error {
|
|
|
4545
4542
|
/** {zh}
|
|
4546
4543
|
* @list error
|
|
4547
4544
|
* @detail error
|
|
4548
|
-
* @brief
|
|
4545
|
+
* @brief 错误对象。
|
|
4549
4546
|
* @name VeError
|
|
4550
4547
|
* @id VeError
|
|
4551
4548
|
*/
|
|
@@ -4557,11 +4554,11 @@ declare namespace error {
|
|
|
4557
4554
|
* @id VeError
|
|
4558
4555
|
*/
|
|
4559
4556
|
class VeError<T extends string = TextKey> extends Error {
|
|
4560
|
-
/**
|
|
4557
|
+
/** {zh}
|
|
4561
4558
|
* @brief 错误码。
|
|
4562
4559
|
*/
|
|
4563
4560
|
/** {en}
|
|
4564
|
-
* @brief
|
|
4561
|
+
* @brief Error code.
|
|
4565
4562
|
*/
|
|
4566
4563
|
readonly errorCode: ErrorCode;
|
|
4567
4564
|
/** {zh}
|