@byteplus/veplayer 2.3.0 → 2.3.1-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 +57 -1
- package/esm/veplayer.biz.live.development.js +8 -2
- package/esm/veplayer.biz.live.production.js +1 -1
- package/esm/veplayer.d.ts +152 -2
- package/esm/veplayer.development.js +28 -3
- package/esm/veplayer.live.d.ts +152 -2
- package/esm/veplayer.live.development.js +28 -3
- package/esm/veplayer.live.production.js +2 -2
- package/esm/veplayer.production.js +2 -2
- package/esm/veplayer.vod.d.ts +57 -1
- package/esm/veplayer.vod.development.js +5 -1
- package/esm/veplayer.vod.production.js +1 -1
- package/package.json +1 -1
- package/umd/index.d.ts +57 -1
- package/umd/veplayer.biz.live.development.js +8 -2
- package/umd/veplayer.biz.live.production.js +1 -1
- package/umd/veplayer.d.ts +152 -2
- package/umd/veplayer.development.js +28 -3
- package/umd/veplayer.live.d.ts +152 -2
- package/umd/veplayer.live.development.js +28 -3
- package/umd/veplayer.live.production.js +1 -1
- package/umd/veplayer.production.js +1 -1
- package/umd/veplayer.vod.d.ts +57 -1
- package/umd/veplayer.vod.development.js +5 -1
- package/umd/veplayer.vod.production.js +1 -1
- package/veplayer.d.ts +152 -2
- package/veplayer.live.d.ts +152 -2
- package/veplayer.vod.d.ts +57 -1
package/esm/veplayer.d.ts
CHANGED
|
@@ -1497,6 +1497,34 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
|
|
|
1497
1497
|
* @hidden
|
|
1498
1498
|
*/
|
|
1499
1499
|
preparePlugins?: PreparePlugins;
|
|
1500
|
+
/** {zh}
|
|
1501
|
+
* @brief 是否关闭 PC 端单击播放区域切换播放/暂停的能力,开启时,点击播放器区域可实现播放或暂停。
|
|
1502
|
+
* - `true`: 关闭;
|
|
1503
|
+
* - `false`: 开启。
|
|
1504
|
+
* @default false
|
|
1505
|
+
*/
|
|
1506
|
+
/** {en}
|
|
1507
|
+
* @brief Whether to disable the click-to-play feature.
|
|
1508
|
+
* - `true`: Disable.
|
|
1509
|
+
* - `false`: Enable. Play/pause the video on mounse click for the PCs.
|
|
1510
|
+
* @default false
|
|
1511
|
+
*/
|
|
1512
|
+
closeVideoClick?: boolean;
|
|
1513
|
+
/** {zh}
|
|
1514
|
+
* @brief PC 端时表示是否关闭双击播放器进入全屏的能力;移动端时表示是否关闭双击切换播放/暂停的能力。
|
|
1515
|
+
* - `true`: 关闭;
|
|
1516
|
+
* - `false`: 开启。
|
|
1517
|
+
* @default false
|
|
1518
|
+
*/
|
|
1519
|
+
/** {en}
|
|
1520
|
+
* @brief Whether to disable the double-click/tap action.
|
|
1521
|
+
* - `true`: Disable.
|
|
1522
|
+
* - `false`: Enable.
|
|
1523
|
+
* - For the PCs, double click on the video to enter or exit the full screen mode.
|
|
1524
|
+
* - For the mobiles, play/pause the video with double tap.
|
|
1525
|
+
* @default false
|
|
1526
|
+
*/
|
|
1527
|
+
closeVideoDblclick?: boolean;
|
|
1500
1528
|
}
|
|
1501
1529
|
/** {zh}
|
|
1502
1530
|
* @list option
|
|
@@ -2032,7 +2060,7 @@ declare class VePlayerBase {
|
|
|
2032
2060
|
* @param callback 表示事件的回调函数。
|
|
2033
2061
|
*/
|
|
2034
2062
|
/** {en}
|
|
2035
|
-
* @brief
|
|
2063
|
+
* @brief Add a one-time listener function for the specified event.
|
|
2036
2064
|
* @param event The event name.
|
|
2037
2065
|
* @param callback The callback function for the event.
|
|
2038
2066
|
*/
|
|
@@ -3812,6 +3840,34 @@ declare namespace strategy {
|
|
|
3812
3840
|
* @hidden
|
|
3813
3841
|
*/
|
|
3814
3842
|
preparePlugins?: PreparePlugins;
|
|
3843
|
+
/** {zh}
|
|
3844
|
+
* @brief 是否关闭 PC 端单击播放区域切换播放/暂停的能力,开启时,点击播放器区域可实现播放或暂停。
|
|
3845
|
+
* - `true`: 关闭;
|
|
3846
|
+
* - `false`: 开启。
|
|
3847
|
+
* @default false
|
|
3848
|
+
*/
|
|
3849
|
+
/** {en}
|
|
3850
|
+
* @brief Whether to disable the click-to-play feature.
|
|
3851
|
+
* - `true`: Disable.
|
|
3852
|
+
* - `false`: Enable. Play/pause the video on mounse click for the PCs.
|
|
3853
|
+
* @default false
|
|
3854
|
+
*/
|
|
3855
|
+
closeVideoClick?: boolean;
|
|
3856
|
+
/** {zh}
|
|
3857
|
+
* @brief PC 端时表示是否关闭双击播放器进入全屏的能力;移动端时表示是否关闭双击切换播放/暂停的能力。
|
|
3858
|
+
* - `true`: 关闭;
|
|
3859
|
+
* - `false`: 开启。
|
|
3860
|
+
* @default false
|
|
3861
|
+
*/
|
|
3862
|
+
/** {en}
|
|
3863
|
+
* @brief Whether to disable the double-click/tap action.
|
|
3864
|
+
* - `true`: Disable.
|
|
3865
|
+
* - `false`: Enable.
|
|
3866
|
+
* - For the PCs, double click on the video to enter or exit the full screen mode.
|
|
3867
|
+
* - For the mobiles, play/pause the video with double tap.
|
|
3868
|
+
* @default false
|
|
3869
|
+
*/
|
|
3870
|
+
closeVideoDblclick?: boolean;
|
|
3815
3871
|
}
|
|
3816
3872
|
/** {zh}
|
|
3817
3873
|
* @list option
|
|
@@ -5219,6 +5275,7 @@ interface LiveVePlayerOptions extends VePlayerBaseOptions {
|
|
|
5219
5275
|
*/
|
|
5220
5276
|
icons?: any;
|
|
5221
5277
|
/** {zh}
|
|
5278
|
+
* @hidden
|
|
5222
5279
|
* @brief 商业 DRM 播放配置。
|
|
5223
5280
|
* @default -
|
|
5224
5281
|
*/
|
|
@@ -5228,6 +5285,15 @@ interface LiveVePlayerOptions extends VePlayerBaseOptions {
|
|
|
5228
5285
|
*/
|
|
5229
5286
|
drm?: Drm;
|
|
5230
5287
|
}
|
|
5288
|
+
/** {zh}
|
|
5289
|
+
* @hidden
|
|
5290
|
+
* @list option
|
|
5291
|
+
* @kind property
|
|
5292
|
+
*/
|
|
5293
|
+
/** {en}
|
|
5294
|
+
* @list option
|
|
5295
|
+
* @kind property
|
|
5296
|
+
*/
|
|
5231
5297
|
interface Drm {
|
|
5232
5298
|
/** {zh}
|
|
5233
5299
|
* @brief FairPlay DRM 配置
|
|
@@ -5237,8 +5303,18 @@ interface Drm {
|
|
|
5237
5303
|
*/
|
|
5238
5304
|
fairplay?: FairplayDrm;
|
|
5239
5305
|
}
|
|
5306
|
+
/** {zh}
|
|
5307
|
+
* @hidden
|
|
5308
|
+
* @list option
|
|
5309
|
+
* @kind property
|
|
5310
|
+
*/
|
|
5311
|
+
/** {en}
|
|
5312
|
+
* @list option
|
|
5313
|
+
* @kind property
|
|
5314
|
+
*/
|
|
5240
5315
|
interface FairplayDrm extends FairplayDrmConfig {
|
|
5241
5316
|
/** {zh}
|
|
5317
|
+
* @hidden
|
|
5242
5318
|
* @brief 获取 DRM 配置的方法,用于更新 DRM 配置。
|
|
5243
5319
|
* @param config
|
|
5244
5320
|
* @returns 证书的请求地址和内容密钥许可证的请求地址。
|
|
@@ -5252,6 +5328,15 @@ interface FairplayDrm extends FairplayDrmConfig {
|
|
|
5252
5328
|
url: string;
|
|
5253
5329
|
}) => Promise<FairplayDrmConfig>;
|
|
5254
5330
|
}
|
|
5331
|
+
/** {zh}
|
|
5332
|
+
* @hidden
|
|
5333
|
+
* @list option
|
|
5334
|
+
* @kind property
|
|
5335
|
+
*/
|
|
5336
|
+
/** {en}
|
|
5337
|
+
* @list option
|
|
5338
|
+
* @kind property
|
|
5339
|
+
*/
|
|
5255
5340
|
interface FairplayDrmConfig {
|
|
5256
5341
|
/** {zh}
|
|
5257
5342
|
* @brief 获取证书的请求地址
|
|
@@ -5284,6 +5369,10 @@ interface TimeShiftConfig {
|
|
|
5284
5369
|
* @brief 直播开始时间,Unix 时间戳,单位为 s,需要传入浏览器本地时间。
|
|
5285
5370
|
* @default Date.now() / 1000
|
|
5286
5371
|
*/
|
|
5372
|
+
/** {en}
|
|
5373
|
+
* @brief The time the live stream session started. Unix timestamp in seconds. The time must be specified according to the time zone of the browser.
|
|
5374
|
+
* @default Date.now() / 1000
|
|
5375
|
+
*/
|
|
5287
5376
|
liveStartTime?: number;
|
|
5288
5377
|
/** {zh}
|
|
5289
5378
|
* @brief 最大时移时间,单位为 s,取值范围为 [6,604800]。
|
|
@@ -8035,6 +8124,34 @@ declare namespace live {
|
|
|
8035
8124
|
* @hidden
|
|
8036
8125
|
*/
|
|
8037
8126
|
preparePlugins?: PreparePlugins;
|
|
8127
|
+
/** {zh}
|
|
8128
|
+
* @brief 是否关闭 PC 端单击播放区域切换播放/暂停的能力,开启时,点击播放器区域可实现播放或暂停。
|
|
8129
|
+
* - `true`: 关闭;
|
|
8130
|
+
* - `false`: 开启。
|
|
8131
|
+
* @default false
|
|
8132
|
+
*/
|
|
8133
|
+
/** {en}
|
|
8134
|
+
* @brief Whether to disable the click-to-play feature.
|
|
8135
|
+
* - `true`: Disable.
|
|
8136
|
+
* - `false`: Enable. Play/pause the video on mounse click for the PCs.
|
|
8137
|
+
* @default false
|
|
8138
|
+
*/
|
|
8139
|
+
closeVideoClick?: boolean;
|
|
8140
|
+
/** {zh}
|
|
8141
|
+
* @brief PC 端时表示是否关闭双击播放器进入全屏的能力;移动端时表示是否关闭双击切换播放/暂停的能力。
|
|
8142
|
+
* - `true`: 关闭;
|
|
8143
|
+
* - `false`: 开启。
|
|
8144
|
+
* @default false
|
|
8145
|
+
*/
|
|
8146
|
+
/** {en}
|
|
8147
|
+
* @brief Whether to disable the double-click/tap action.
|
|
8148
|
+
* - `true`: Disable.
|
|
8149
|
+
* - `false`: Enable.
|
|
8150
|
+
* - For the PCs, double click on the video to enter or exit the full screen mode.
|
|
8151
|
+
* - For the mobiles, play/pause the video with double tap.
|
|
8152
|
+
* @default false
|
|
8153
|
+
*/
|
|
8154
|
+
closeVideoDblclick?: boolean;
|
|
8038
8155
|
}
|
|
8039
8156
|
/** {zh}
|
|
8040
8157
|
* @list option
|
|
@@ -8571,7 +8688,7 @@ declare namespace live {
|
|
|
8571
8688
|
* @param callback 表示事件的回调函数。
|
|
8572
8689
|
*/
|
|
8573
8690
|
/** {en}
|
|
8574
|
-
* @brief
|
|
8691
|
+
* @brief Add a one-time listener function for the specified event.
|
|
8575
8692
|
* @param event The event name.
|
|
8576
8693
|
* @param callback The callback function for the event.
|
|
8577
8694
|
*/
|
|
@@ -9641,6 +9758,7 @@ declare namespace live {
|
|
|
9641
9758
|
*/
|
|
9642
9759
|
icons?: any;
|
|
9643
9760
|
/** {zh}
|
|
9761
|
+
* @hidden
|
|
9644
9762
|
* @brief 商业 DRM 播放配置。
|
|
9645
9763
|
* @default -
|
|
9646
9764
|
*/
|
|
@@ -9650,6 +9768,15 @@ declare namespace live {
|
|
|
9650
9768
|
*/
|
|
9651
9769
|
drm?: Drm;
|
|
9652
9770
|
}
|
|
9771
|
+
/** {zh}
|
|
9772
|
+
* @hidden
|
|
9773
|
+
* @list option
|
|
9774
|
+
* @kind property
|
|
9775
|
+
*/
|
|
9776
|
+
/** {en}
|
|
9777
|
+
* @list option
|
|
9778
|
+
* @kind property
|
|
9779
|
+
*/
|
|
9653
9780
|
interface Drm {
|
|
9654
9781
|
/** {zh}
|
|
9655
9782
|
* @brief FairPlay DRM 配置
|
|
@@ -9659,8 +9786,18 @@ declare namespace live {
|
|
|
9659
9786
|
*/
|
|
9660
9787
|
fairplay?: FairplayDrm;
|
|
9661
9788
|
}
|
|
9789
|
+
/** {zh}
|
|
9790
|
+
* @hidden
|
|
9791
|
+
* @list option
|
|
9792
|
+
* @kind property
|
|
9793
|
+
*/
|
|
9794
|
+
/** {en}
|
|
9795
|
+
* @list option
|
|
9796
|
+
* @kind property
|
|
9797
|
+
*/
|
|
9662
9798
|
interface FairplayDrm extends FairplayDrmConfig {
|
|
9663
9799
|
/** {zh}
|
|
9800
|
+
* @hidden
|
|
9664
9801
|
* @brief 获取 DRM 配置的方法,用于更新 DRM 配置。
|
|
9665
9802
|
* @param config
|
|
9666
9803
|
* @returns 证书的请求地址和内容密钥许可证的请求地址。
|
|
@@ -9674,6 +9811,15 @@ declare namespace live {
|
|
|
9674
9811
|
url: string;
|
|
9675
9812
|
}) => Promise<FairplayDrmConfig>;
|
|
9676
9813
|
}
|
|
9814
|
+
/** {zh}
|
|
9815
|
+
* @hidden
|
|
9816
|
+
* @list option
|
|
9817
|
+
* @kind property
|
|
9818
|
+
*/
|
|
9819
|
+
/** {en}
|
|
9820
|
+
* @list option
|
|
9821
|
+
* @kind property
|
|
9822
|
+
*/
|
|
9677
9823
|
interface FairplayDrmConfig {
|
|
9678
9824
|
/** {zh}
|
|
9679
9825
|
* @brief 获取证书的请求地址
|
|
@@ -9706,6 +9852,10 @@ declare namespace live {
|
|
|
9706
9852
|
* @brief 直播开始时间,Unix 时间戳,单位为 s,需要传入浏览器本地时间。
|
|
9707
9853
|
* @default Date.now() / 1000
|
|
9708
9854
|
*/
|
|
9855
|
+
/** {en}
|
|
9856
|
+
* @brief The time the live stream session started. Unix timestamp in seconds. The time must be specified according to the time zone of the browser.
|
|
9857
|
+
* @default Date.now() / 1000
|
|
9858
|
+
*/
|
|
9709
9859
|
liveStartTime?: number;
|
|
9710
9860
|
/** {zh}
|
|
9711
9861
|
* @brief 最大时移时间,单位为 s,取值范围为 [6,604800]。
|
|
@@ -13432,6 +13432,10 @@ class VePlayerBase {
|
|
|
13432
13432
|
plugins.forEach((plugin) => {
|
|
13433
13433
|
TopRightBar.isTopRightPlugin(plugin, options) ? topRightPlugins.push(plugin) : normalPlugins.push(plugin);
|
|
13434
13434
|
});
|
|
13435
|
+
window._veplayer_test_log["startxgplayer"] = {
|
|
13436
|
+
msg: "start to new XGPlayer",
|
|
13437
|
+
timestamp: performance.now()
|
|
13438
|
+
};
|
|
13435
13439
|
this._player = new Player({
|
|
13436
13440
|
...DEFAULT_OPTIONS,
|
|
13437
13441
|
...xgOptions,
|
|
@@ -13802,7 +13806,7 @@ class VePlayerBase {
|
|
|
13802
13806
|
* @param callback 表示事件的回调函数。
|
|
13803
13807
|
*/
|
|
13804
13808
|
/** {en}
|
|
13805
|
-
* @brief
|
|
13809
|
+
* @brief Add a one-time listener function for the specified event.
|
|
13806
13810
|
* @param event The event name.
|
|
13807
13811
|
* @param callback The callback function for the event.
|
|
13808
13812
|
*/
|
|
@@ -18725,10 +18729,25 @@ const getFlvStrategy = async (options) => {
|
|
|
18725
18729
|
if (!mseStrategy && !softStrategy) {
|
|
18726
18730
|
return {};
|
|
18727
18731
|
}
|
|
18732
|
+
window._veplayer_test_log["beforefetch"] = {
|
|
18733
|
+
msg: "start to load cdn",
|
|
18734
|
+
timestamp: performance.now()
|
|
18735
|
+
};
|
|
18728
18736
|
const [mseModule, softModule] = await Promise.all([
|
|
18729
18737
|
(mseStrategy == null ? void 0 : mseStrategy.module) && load(mseStrategy.module).catch(() => void 0),
|
|
18730
18738
|
(softStrategy == null ? void 0 : softStrategy.module) && load(softStrategy.module).catch(() => void 0)
|
|
18731
18739
|
]);
|
|
18740
|
+
if (mseModule) {
|
|
18741
|
+
window._veplayer_test_log["fetched"] = {
|
|
18742
|
+
msg: "cdn loaded",
|
|
18743
|
+
timestamp: performance.now()
|
|
18744
|
+
};
|
|
18745
|
+
} else {
|
|
18746
|
+
window._veplayer_test_log["fetched"] = {
|
|
18747
|
+
msg: "cdn loaded but empty",
|
|
18748
|
+
timestamp: performance.now()
|
|
18749
|
+
};
|
|
18750
|
+
}
|
|
18732
18751
|
(softModule == null ? void 0 : softModule.XGVideoPlugin) && ((_c = softStrategy == null ? void 0 : softStrategy.afterLoad) == null ? void 0 : _c.call(softStrategy, softModule == null ? void 0 : softModule.XGVideoPlugin));
|
|
18733
18752
|
const combineOptions$1 = combineOptions([mseStrategy, softStrategy]);
|
|
18734
18753
|
const plugins = [];
|
|
@@ -21789,8 +21808,8 @@ class Logger extends Plugin {
|
|
|
21789
21808
|
user_id: this._userId,
|
|
21790
21809
|
device_id: this._deviceId,
|
|
21791
21810
|
ext: {
|
|
21792
|
-
veplayer_version: "2.3.0",
|
|
21793
|
-
flv_version: "3.0.
|
|
21811
|
+
veplayer_version: "2.3.1-rc.0",
|
|
21812
|
+
flv_version: "3.0.15-alpha.2",
|
|
21794
21813
|
hls_version: "3.0.12",
|
|
21795
21814
|
rts_version: "0.2.0-alpha.5"
|
|
21796
21815
|
}
|
|
@@ -22170,6 +22189,12 @@ class VePlayerLive extends VePlayerBase {
|
|
|
22170
22189
|
async function createLivePlayer(options) {
|
|
22171
22190
|
var _a, _b;
|
|
22172
22191
|
let player = void 0;
|
|
22192
|
+
window._veplayer_test_log = {
|
|
22193
|
+
start: {
|
|
22194
|
+
msg: "start to create veplayer",
|
|
22195
|
+
timestamp: performance.now()
|
|
22196
|
+
}
|
|
22197
|
+
};
|
|
22173
22198
|
if (!options || !options.url && !options.playlist) {
|
|
22174
22199
|
throw create(ErrorCode.INVALID_PARAMETER, new VeI18n());
|
|
22175
22200
|
}
|
package/esm/veplayer.live.d.ts
CHANGED
|
@@ -1497,6 +1497,34 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
|
|
|
1497
1497
|
* @hidden
|
|
1498
1498
|
*/
|
|
1499
1499
|
preparePlugins?: PreparePlugins;
|
|
1500
|
+
/** {zh}
|
|
1501
|
+
* @brief 是否关闭 PC 端单击播放区域切换播放/暂停的能力,开启时,点击播放器区域可实现播放或暂停。
|
|
1502
|
+
* - `true`: 关闭;
|
|
1503
|
+
* - `false`: 开启。
|
|
1504
|
+
* @default false
|
|
1505
|
+
*/
|
|
1506
|
+
/** {en}
|
|
1507
|
+
* @brief Whether to disable the click-to-play feature.
|
|
1508
|
+
* - `true`: Disable.
|
|
1509
|
+
* - `false`: Enable. Play/pause the video on mounse click for the PCs.
|
|
1510
|
+
* @default false
|
|
1511
|
+
*/
|
|
1512
|
+
closeVideoClick?: boolean;
|
|
1513
|
+
/** {zh}
|
|
1514
|
+
* @brief PC 端时表示是否关闭双击播放器进入全屏的能力;移动端时表示是否关闭双击切换播放/暂停的能力。
|
|
1515
|
+
* - `true`: 关闭;
|
|
1516
|
+
* - `false`: 开启。
|
|
1517
|
+
* @default false
|
|
1518
|
+
*/
|
|
1519
|
+
/** {en}
|
|
1520
|
+
* @brief Whether to disable the double-click/tap action.
|
|
1521
|
+
* - `true`: Disable.
|
|
1522
|
+
* - `false`: Enable.
|
|
1523
|
+
* - For the PCs, double click on the video to enter or exit the full screen mode.
|
|
1524
|
+
* - For the mobiles, play/pause the video with double tap.
|
|
1525
|
+
* @default false
|
|
1526
|
+
*/
|
|
1527
|
+
closeVideoDblclick?: boolean;
|
|
1500
1528
|
}
|
|
1501
1529
|
/** {zh}
|
|
1502
1530
|
* @list option
|
|
@@ -2032,7 +2060,7 @@ declare class VePlayerBase {
|
|
|
2032
2060
|
* @param callback 表示事件的回调函数。
|
|
2033
2061
|
*/
|
|
2034
2062
|
/** {en}
|
|
2035
|
-
* @brief
|
|
2063
|
+
* @brief Add a one-time listener function for the specified event.
|
|
2036
2064
|
* @param event The event name.
|
|
2037
2065
|
* @param callback The callback function for the event.
|
|
2038
2066
|
*/
|
|
@@ -3812,6 +3840,34 @@ declare namespace strategy {
|
|
|
3812
3840
|
* @hidden
|
|
3813
3841
|
*/
|
|
3814
3842
|
preparePlugins?: PreparePlugins;
|
|
3843
|
+
/** {zh}
|
|
3844
|
+
* @brief 是否关闭 PC 端单击播放区域切换播放/暂停的能力,开启时,点击播放器区域可实现播放或暂停。
|
|
3845
|
+
* - `true`: 关闭;
|
|
3846
|
+
* - `false`: 开启。
|
|
3847
|
+
* @default false
|
|
3848
|
+
*/
|
|
3849
|
+
/** {en}
|
|
3850
|
+
* @brief Whether to disable the click-to-play feature.
|
|
3851
|
+
* - `true`: Disable.
|
|
3852
|
+
* - `false`: Enable. Play/pause the video on mounse click for the PCs.
|
|
3853
|
+
* @default false
|
|
3854
|
+
*/
|
|
3855
|
+
closeVideoClick?: boolean;
|
|
3856
|
+
/** {zh}
|
|
3857
|
+
* @brief PC 端时表示是否关闭双击播放器进入全屏的能力;移动端时表示是否关闭双击切换播放/暂停的能力。
|
|
3858
|
+
* - `true`: 关闭;
|
|
3859
|
+
* - `false`: 开启。
|
|
3860
|
+
* @default false
|
|
3861
|
+
*/
|
|
3862
|
+
/** {en}
|
|
3863
|
+
* @brief Whether to disable the double-click/tap action.
|
|
3864
|
+
* - `true`: Disable.
|
|
3865
|
+
* - `false`: Enable.
|
|
3866
|
+
* - For the PCs, double click on the video to enter or exit the full screen mode.
|
|
3867
|
+
* - For the mobiles, play/pause the video with double tap.
|
|
3868
|
+
* @default false
|
|
3869
|
+
*/
|
|
3870
|
+
closeVideoDblclick?: boolean;
|
|
3815
3871
|
}
|
|
3816
3872
|
/** {zh}
|
|
3817
3873
|
* @list option
|
|
@@ -5219,6 +5275,7 @@ interface LiveVePlayerOptions extends VePlayerBaseOptions {
|
|
|
5219
5275
|
*/
|
|
5220
5276
|
icons?: any;
|
|
5221
5277
|
/** {zh}
|
|
5278
|
+
* @hidden
|
|
5222
5279
|
* @brief 商业 DRM 播放配置。
|
|
5223
5280
|
* @default -
|
|
5224
5281
|
*/
|
|
@@ -5228,6 +5285,15 @@ interface LiveVePlayerOptions extends VePlayerBaseOptions {
|
|
|
5228
5285
|
*/
|
|
5229
5286
|
drm?: Drm;
|
|
5230
5287
|
}
|
|
5288
|
+
/** {zh}
|
|
5289
|
+
* @hidden
|
|
5290
|
+
* @list option
|
|
5291
|
+
* @kind property
|
|
5292
|
+
*/
|
|
5293
|
+
/** {en}
|
|
5294
|
+
* @list option
|
|
5295
|
+
* @kind property
|
|
5296
|
+
*/
|
|
5231
5297
|
interface Drm {
|
|
5232
5298
|
/** {zh}
|
|
5233
5299
|
* @brief FairPlay DRM 配置
|
|
@@ -5237,8 +5303,18 @@ interface Drm {
|
|
|
5237
5303
|
*/
|
|
5238
5304
|
fairplay?: FairplayDrm;
|
|
5239
5305
|
}
|
|
5306
|
+
/** {zh}
|
|
5307
|
+
* @hidden
|
|
5308
|
+
* @list option
|
|
5309
|
+
* @kind property
|
|
5310
|
+
*/
|
|
5311
|
+
/** {en}
|
|
5312
|
+
* @list option
|
|
5313
|
+
* @kind property
|
|
5314
|
+
*/
|
|
5240
5315
|
interface FairplayDrm extends FairplayDrmConfig {
|
|
5241
5316
|
/** {zh}
|
|
5317
|
+
* @hidden
|
|
5242
5318
|
* @brief 获取 DRM 配置的方法,用于更新 DRM 配置。
|
|
5243
5319
|
* @param config
|
|
5244
5320
|
* @returns 证书的请求地址和内容密钥许可证的请求地址。
|
|
@@ -5252,6 +5328,15 @@ interface FairplayDrm extends FairplayDrmConfig {
|
|
|
5252
5328
|
url: string;
|
|
5253
5329
|
}) => Promise<FairplayDrmConfig>;
|
|
5254
5330
|
}
|
|
5331
|
+
/** {zh}
|
|
5332
|
+
* @hidden
|
|
5333
|
+
* @list option
|
|
5334
|
+
* @kind property
|
|
5335
|
+
*/
|
|
5336
|
+
/** {en}
|
|
5337
|
+
* @list option
|
|
5338
|
+
* @kind property
|
|
5339
|
+
*/
|
|
5255
5340
|
interface FairplayDrmConfig {
|
|
5256
5341
|
/** {zh}
|
|
5257
5342
|
* @brief 获取证书的请求地址
|
|
@@ -5284,6 +5369,10 @@ interface TimeShiftConfig {
|
|
|
5284
5369
|
* @brief 直播开始时间,Unix 时间戳,单位为 s,需要传入浏览器本地时间。
|
|
5285
5370
|
* @default Date.now() / 1000
|
|
5286
5371
|
*/
|
|
5372
|
+
/** {en}
|
|
5373
|
+
* @brief The time the live stream session started. Unix timestamp in seconds. The time must be specified according to the time zone of the browser.
|
|
5374
|
+
* @default Date.now() / 1000
|
|
5375
|
+
*/
|
|
5287
5376
|
liveStartTime?: number;
|
|
5288
5377
|
/** {zh}
|
|
5289
5378
|
* @brief 最大时移时间,单位为 s,取值范围为 [6,604800]。
|
|
@@ -8035,6 +8124,34 @@ declare namespace live {
|
|
|
8035
8124
|
* @hidden
|
|
8036
8125
|
*/
|
|
8037
8126
|
preparePlugins?: PreparePlugins;
|
|
8127
|
+
/** {zh}
|
|
8128
|
+
* @brief 是否关闭 PC 端单击播放区域切换播放/暂停的能力,开启时,点击播放器区域可实现播放或暂停。
|
|
8129
|
+
* - `true`: 关闭;
|
|
8130
|
+
* - `false`: 开启。
|
|
8131
|
+
* @default false
|
|
8132
|
+
*/
|
|
8133
|
+
/** {en}
|
|
8134
|
+
* @brief Whether to disable the click-to-play feature.
|
|
8135
|
+
* - `true`: Disable.
|
|
8136
|
+
* - `false`: Enable. Play/pause the video on mounse click for the PCs.
|
|
8137
|
+
* @default false
|
|
8138
|
+
*/
|
|
8139
|
+
closeVideoClick?: boolean;
|
|
8140
|
+
/** {zh}
|
|
8141
|
+
* @brief PC 端时表示是否关闭双击播放器进入全屏的能力;移动端时表示是否关闭双击切换播放/暂停的能力。
|
|
8142
|
+
* - `true`: 关闭;
|
|
8143
|
+
* - `false`: 开启。
|
|
8144
|
+
* @default false
|
|
8145
|
+
*/
|
|
8146
|
+
/** {en}
|
|
8147
|
+
* @brief Whether to disable the double-click/tap action.
|
|
8148
|
+
* - `true`: Disable.
|
|
8149
|
+
* - `false`: Enable.
|
|
8150
|
+
* - For the PCs, double click on the video to enter or exit the full screen mode.
|
|
8151
|
+
* - For the mobiles, play/pause the video with double tap.
|
|
8152
|
+
* @default false
|
|
8153
|
+
*/
|
|
8154
|
+
closeVideoDblclick?: boolean;
|
|
8038
8155
|
}
|
|
8039
8156
|
/** {zh}
|
|
8040
8157
|
* @list option
|
|
@@ -8571,7 +8688,7 @@ declare namespace live {
|
|
|
8571
8688
|
* @param callback 表示事件的回调函数。
|
|
8572
8689
|
*/
|
|
8573
8690
|
/** {en}
|
|
8574
|
-
* @brief
|
|
8691
|
+
* @brief Add a one-time listener function for the specified event.
|
|
8575
8692
|
* @param event The event name.
|
|
8576
8693
|
* @param callback The callback function for the event.
|
|
8577
8694
|
*/
|
|
@@ -9641,6 +9758,7 @@ declare namespace live {
|
|
|
9641
9758
|
*/
|
|
9642
9759
|
icons?: any;
|
|
9643
9760
|
/** {zh}
|
|
9761
|
+
* @hidden
|
|
9644
9762
|
* @brief 商业 DRM 播放配置。
|
|
9645
9763
|
* @default -
|
|
9646
9764
|
*/
|
|
@@ -9650,6 +9768,15 @@ declare namespace live {
|
|
|
9650
9768
|
*/
|
|
9651
9769
|
drm?: Drm;
|
|
9652
9770
|
}
|
|
9771
|
+
/** {zh}
|
|
9772
|
+
* @hidden
|
|
9773
|
+
* @list option
|
|
9774
|
+
* @kind property
|
|
9775
|
+
*/
|
|
9776
|
+
/** {en}
|
|
9777
|
+
* @list option
|
|
9778
|
+
* @kind property
|
|
9779
|
+
*/
|
|
9653
9780
|
interface Drm {
|
|
9654
9781
|
/** {zh}
|
|
9655
9782
|
* @brief FairPlay DRM 配置
|
|
@@ -9659,8 +9786,18 @@ declare namespace live {
|
|
|
9659
9786
|
*/
|
|
9660
9787
|
fairplay?: FairplayDrm;
|
|
9661
9788
|
}
|
|
9789
|
+
/** {zh}
|
|
9790
|
+
* @hidden
|
|
9791
|
+
* @list option
|
|
9792
|
+
* @kind property
|
|
9793
|
+
*/
|
|
9794
|
+
/** {en}
|
|
9795
|
+
* @list option
|
|
9796
|
+
* @kind property
|
|
9797
|
+
*/
|
|
9662
9798
|
interface FairplayDrm extends FairplayDrmConfig {
|
|
9663
9799
|
/** {zh}
|
|
9800
|
+
* @hidden
|
|
9664
9801
|
* @brief 获取 DRM 配置的方法,用于更新 DRM 配置。
|
|
9665
9802
|
* @param config
|
|
9666
9803
|
* @returns 证书的请求地址和内容密钥许可证的请求地址。
|
|
@@ -9674,6 +9811,15 @@ declare namespace live {
|
|
|
9674
9811
|
url: string;
|
|
9675
9812
|
}) => Promise<FairplayDrmConfig>;
|
|
9676
9813
|
}
|
|
9814
|
+
/** {zh}
|
|
9815
|
+
* @hidden
|
|
9816
|
+
* @list option
|
|
9817
|
+
* @kind property
|
|
9818
|
+
*/
|
|
9819
|
+
/** {en}
|
|
9820
|
+
* @list option
|
|
9821
|
+
* @kind property
|
|
9822
|
+
*/
|
|
9677
9823
|
interface FairplayDrmConfig {
|
|
9678
9824
|
/** {zh}
|
|
9679
9825
|
* @brief 获取证书的请求地址
|
|
@@ -9706,6 +9852,10 @@ declare namespace live {
|
|
|
9706
9852
|
* @brief 直播开始时间,Unix 时间戳,单位为 s,需要传入浏览器本地时间。
|
|
9707
9853
|
* @default Date.now() / 1000
|
|
9708
9854
|
*/
|
|
9855
|
+
/** {en}
|
|
9856
|
+
* @brief The time the live stream session started. Unix timestamp in seconds. The time must be specified according to the time zone of the browser.
|
|
9857
|
+
* @default Date.now() / 1000
|
|
9858
|
+
*/
|
|
9709
9859
|
liveStartTime?: number;
|
|
9710
9860
|
/** {zh}
|
|
9711
9861
|
* @brief 最大时移时间,单位为 s,取值范围为 [6,604800]。
|
|
@@ -13432,6 +13432,10 @@ class VePlayerBase {
|
|
|
13432
13432
|
plugins.forEach((plugin) => {
|
|
13433
13433
|
TopRightBar.isTopRightPlugin(plugin, options) ? topRightPlugins.push(plugin) : normalPlugins.push(plugin);
|
|
13434
13434
|
});
|
|
13435
|
+
window._veplayer_test_log["startxgplayer"] = {
|
|
13436
|
+
msg: "start to new XGPlayer",
|
|
13437
|
+
timestamp: performance.now()
|
|
13438
|
+
};
|
|
13435
13439
|
this._player = new Player({
|
|
13436
13440
|
...DEFAULT_OPTIONS,
|
|
13437
13441
|
...xgOptions,
|
|
@@ -13802,7 +13806,7 @@ class VePlayerBase {
|
|
|
13802
13806
|
* @param callback 表示事件的回调函数。
|
|
13803
13807
|
*/
|
|
13804
13808
|
/** {en}
|
|
13805
|
-
* @brief
|
|
13809
|
+
* @brief Add a one-time listener function for the specified event.
|
|
13806
13810
|
* @param event The event name.
|
|
13807
13811
|
* @param callback The callback function for the event.
|
|
13808
13812
|
*/
|
|
@@ -18725,10 +18729,25 @@ const getFlvStrategy = async (options) => {
|
|
|
18725
18729
|
if (!mseStrategy && !softStrategy) {
|
|
18726
18730
|
return {};
|
|
18727
18731
|
}
|
|
18732
|
+
window._veplayer_test_log["beforefetch"] = {
|
|
18733
|
+
msg: "start to load cdn",
|
|
18734
|
+
timestamp: performance.now()
|
|
18735
|
+
};
|
|
18728
18736
|
const [mseModule, softModule] = await Promise.all([
|
|
18729
18737
|
(mseStrategy == null ? void 0 : mseStrategy.module) && load(mseStrategy.module).catch(() => void 0),
|
|
18730
18738
|
(softStrategy == null ? void 0 : softStrategy.module) && load(softStrategy.module).catch(() => void 0)
|
|
18731
18739
|
]);
|
|
18740
|
+
if (mseModule) {
|
|
18741
|
+
window._veplayer_test_log["fetched"] = {
|
|
18742
|
+
msg: "cdn loaded",
|
|
18743
|
+
timestamp: performance.now()
|
|
18744
|
+
};
|
|
18745
|
+
} else {
|
|
18746
|
+
window._veplayer_test_log["fetched"] = {
|
|
18747
|
+
msg: "cdn loaded but empty",
|
|
18748
|
+
timestamp: performance.now()
|
|
18749
|
+
};
|
|
18750
|
+
}
|
|
18732
18751
|
(softModule == null ? void 0 : softModule.XGVideoPlugin) && ((_c = softStrategy == null ? void 0 : softStrategy.afterLoad) == null ? void 0 : _c.call(softStrategy, softModule == null ? void 0 : softModule.XGVideoPlugin));
|
|
18733
18752
|
const combineOptions$1 = combineOptions([mseStrategy, softStrategy]);
|
|
18734
18753
|
const plugins = [];
|
|
@@ -21789,8 +21808,8 @@ class Logger extends Plugin {
|
|
|
21789
21808
|
user_id: this._userId,
|
|
21790
21809
|
device_id: this._deviceId,
|
|
21791
21810
|
ext: {
|
|
21792
|
-
veplayer_version: "2.3.0",
|
|
21793
|
-
flv_version: "3.0.
|
|
21811
|
+
veplayer_version: "2.3.1-rc.0",
|
|
21812
|
+
flv_version: "3.0.15-alpha.2",
|
|
21794
21813
|
hls_version: "3.0.12",
|
|
21795
21814
|
rts_version: "0.2.0-alpha.5"
|
|
21796
21815
|
}
|
|
@@ -22170,6 +22189,12 @@ class VePlayerLive extends VePlayerBase {
|
|
|
22170
22189
|
async function createLivePlayer(options) {
|
|
22171
22190
|
var _a, _b;
|
|
22172
22191
|
let player = void 0;
|
|
22192
|
+
window._veplayer_test_log = {
|
|
22193
|
+
start: {
|
|
22194
|
+
msg: "start to create veplayer",
|
|
22195
|
+
timestamp: performance.now()
|
|
22196
|
+
}
|
|
22197
|
+
};
|
|
22173
22198
|
if (!options || !options.url && !options.playlist) {
|
|
22174
22199
|
throw create(ErrorCode.INVALID_PARAMETER, new VeI18n());
|
|
22175
22200
|
}
|