@volcengine/veplayer 2.8.0-rc.1 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/index.d.ts +523 -130
- package/esm/veplayer.biz.live.development.js +370 -123
- package/esm/veplayer.biz.live.production.js +1 -1
- package/esm/veplayer.d.ts +1205 -264
- package/esm/veplayer.development.js +352 -89
- package/esm/veplayer.live.d.ts +1211 -265
- package/esm/veplayer.live.development.js +360 -90
- package/esm/veplayer.live.production.js +3 -3
- package/esm/veplayer.production.js +3 -3
- package/esm/veplayer.vod.d.ts +523 -130
- package/esm/veplayer.vod.development.js +96 -8
- package/esm/veplayer.vod.production.js +3 -3
- package/package.json +1 -1
- package/umd/index.d.ts +523 -130
- package/umd/veplayer.biz.live.development.js +363 -123
- package/umd/veplayer.biz.live.production.js +1 -1
- package/umd/veplayer.d.ts +1205 -264
- package/umd/veplayer.development.js +352 -89
- package/umd/veplayer.live.d.ts +1211 -265
- package/umd/veplayer.live.development.js +352 -89
- package/umd/veplayer.live.production.js +1 -1
- package/umd/veplayer.production.js +1 -1
- package/umd/veplayer.vod.d.ts +523 -130
- package/umd/veplayer.vod.development.js +96 -8
- package/umd/veplayer.vod.production.js +1 -1
- package/veplayer.d.ts +1205 -264
- package/veplayer.live.d.ts +1211 -265
- package/veplayer.vod.d.ts +523 -130
|
@@ -6528,11 +6528,20 @@ var ErrorCode = /* @__PURE__ */ ((ErrorCode2) => {
|
|
|
6528
6528
|
ErrorCode2[ErrorCode2["MEDIA_MSE_HIJACK"] = 5204] = "MEDIA_MSE_HIJACK";
|
|
6529
6529
|
ErrorCode2[ErrorCode2["MEDIA_EME_HIJACK"] = 5301] = "MEDIA_EME_HIJACK";
|
|
6530
6530
|
ErrorCode2[ErrorCode2["DRM_LICENSE"] = 7100] = "DRM_LICENSE";
|
|
6531
|
+
ErrorCode2[ErrorCode2["DRM_UNSUPPORTED"] = 7101] = "DRM_UNSUPPORTED";
|
|
6532
|
+
ErrorCode2[ErrorCode2["DRM_NO_MEDIA_KEY"] = 7103] = "DRM_NO_MEDIA_KEY";
|
|
6533
|
+
ErrorCode2[ErrorCode2["DRM_NO_KEY_SESSION"] = 7104] = "DRM_NO_KEY_SESSION";
|
|
6534
|
+
ErrorCode2[ErrorCode2["DRM_GENERATE_QUEST_FAIL"] = 7105] = "DRM_GENERATE_QUEST_FAIL";
|
|
6535
|
+
ErrorCode2[ErrorCode2["DRM_LACK_SERVER_CERTIFICATE_PATH"] = 7106] = "DRM_LACK_SERVER_CERTIFICATE_PATH";
|
|
6536
|
+
ErrorCode2[ErrorCode2["DRM_LACK_SERVER_PROCESS_SPC_PATH"] = 7107] = "DRM_LACK_SERVER_PROCESS_SPC_PATH";
|
|
6537
|
+
ErrorCode2[ErrorCode2["DRM_LICENSE_FAIL"] = 7108] = "DRM_LICENSE_FAIL";
|
|
6538
|
+
ErrorCode2[ErrorCode2["DRM_KEY_ERROR"] = 7109] = "DRM_KEY_ERROR";
|
|
6539
|
+
ErrorCode2[ErrorCode2["DRM_CERT_FAIL"] = 7110] = "DRM_CERT_FAIL";
|
|
6531
6540
|
ErrorCode2[ErrorCode2["DRM_CUSTOM_LICENSE"] = 7200] = "DRM_CUSTOM_LICENSE";
|
|
6532
6541
|
ErrorCode2[ErrorCode2["OTHER"] = 8e3] = "OTHER";
|
|
6533
6542
|
ErrorCode2[ErrorCode2["RUNTIME_NO_CANPLAY_ERROR"] = 9001] = "RUNTIME_NO_CANPLAY_ERROR";
|
|
6534
6543
|
ErrorCode2[ErrorCode2["RUNTIME_BUFFERBREAK_ERROR"] = 9002] = "RUNTIME_BUFFERBREAK_ERROR";
|
|
6535
|
-
ErrorCode2[ErrorCode2["
|
|
6544
|
+
ErrorCode2[ErrorCode2["RUNTIME_WAITING_TIMEOUT_ERROR"] = 9003] = "RUNTIME_WAITING_TIMEOUT_ERROR";
|
|
6536
6545
|
ErrorCode2[ErrorCode2["MODULE_LOAD_ERROR"] = 110] = "MODULE_LOAD_ERROR";
|
|
6537
6546
|
ErrorCode2["UNKNOWN"] = "UNKNOWN";
|
|
6538
6547
|
return ErrorCode2;
|
|
@@ -6633,6 +6642,78 @@ const ERROR_INFO = {
|
|
|
6633
6642
|
messageTextKey: "DRM_LICENSE",
|
|
6634
6643
|
level: "Fatal"
|
|
6635
6644
|
/* Fatal */
|
|
6645
|
+
},
|
|
6646
|
+
[
|
|
6647
|
+
7101
|
|
6648
|
+
/* DRM_UNSUPPORTED */
|
|
6649
|
+
]: {
|
|
6650
|
+
messageTextKey: "DRM_UNSUPPORTED",
|
|
6651
|
+
level: "Fatal"
|
|
6652
|
+
/* Fatal */
|
|
6653
|
+
},
|
|
6654
|
+
[
|
|
6655
|
+
7103
|
|
6656
|
+
/* DRM_NO_MEDIA_KEY */
|
|
6657
|
+
]: {
|
|
6658
|
+
messageTextKey: "DRM_NO_MEDIA_KEY",
|
|
6659
|
+
level: "Fatal"
|
|
6660
|
+
/* Fatal */
|
|
6661
|
+
},
|
|
6662
|
+
[
|
|
6663
|
+
7104
|
|
6664
|
+
/* DRM_NO_KEY_SESSION */
|
|
6665
|
+
]: {
|
|
6666
|
+
messageTextKey: "DRM_NO_KEY_SESSION",
|
|
6667
|
+
level: "Fatal"
|
|
6668
|
+
/* Fatal */
|
|
6669
|
+
},
|
|
6670
|
+
[
|
|
6671
|
+
7105
|
|
6672
|
+
/* DRM_GENERATE_QUEST_FAIL */
|
|
6673
|
+
]: {
|
|
6674
|
+
messageTextKey: "DRM_GENERATE_QUEST_FAIL",
|
|
6675
|
+
level: "Fatal"
|
|
6676
|
+
/* Fatal */
|
|
6677
|
+
},
|
|
6678
|
+
[
|
|
6679
|
+
7106
|
|
6680
|
+
/* DRM_LACK_SERVER_CERTIFICATE_PATH */
|
|
6681
|
+
]: {
|
|
6682
|
+
messageTextKey: "DRM_LACK_SERVER_CERTIFICATE_PATH",
|
|
6683
|
+
level: "Fatal"
|
|
6684
|
+
/* Fatal */
|
|
6685
|
+
},
|
|
6686
|
+
[
|
|
6687
|
+
7107
|
|
6688
|
+
/* DRM_LACK_SERVER_PROCESS_SPC_PATH */
|
|
6689
|
+
]: {
|
|
6690
|
+
messageTextKey: "DRM_LACK_SERVER_PROCESS_SPC_PATH",
|
|
6691
|
+
level: "Fatal"
|
|
6692
|
+
/* Fatal */
|
|
6693
|
+
},
|
|
6694
|
+
[
|
|
6695
|
+
7108
|
|
6696
|
+
/* DRM_LICENSE_FAIL */
|
|
6697
|
+
]: {
|
|
6698
|
+
messageTextKey: "DRM_LICENSE_FAIL",
|
|
6699
|
+
level: "Fatal"
|
|
6700
|
+
/* Fatal */
|
|
6701
|
+
},
|
|
6702
|
+
[
|
|
6703
|
+
7109
|
|
6704
|
+
/* DRM_KEY_ERROR */
|
|
6705
|
+
]: {
|
|
6706
|
+
messageTextKey: "DRM_KEY_ERROR",
|
|
6707
|
+
level: "Fatal"
|
|
6708
|
+
/* Fatal */
|
|
6709
|
+
},
|
|
6710
|
+
[
|
|
6711
|
+
7110
|
|
6712
|
+
/* DRM_CERT_FAIL */
|
|
6713
|
+
]: {
|
|
6714
|
+
messageTextKey: "DRM_CERT_FAIL",
|
|
6715
|
+
level: "Fatal"
|
|
6716
|
+
/* Fatal */
|
|
6636
6717
|
}
|
|
6637
6718
|
};
|
|
6638
6719
|
const ERROR_TYPE_INFO = {
|
|
@@ -12608,6 +12689,7 @@ const NAME_MAP = {
|
|
|
12608
12689
|
"plugin:mp4": "veplayer.plugin.mp4.[env].[ext]",
|
|
12609
12690
|
"plugin:hls": "veplayer.plugin.hls.[env].[ext]",
|
|
12610
12691
|
"plugin:hlsjs": "veplayer.plugin.hlsjs.[env].[ext]",
|
|
12692
|
+
"plugin:dashjs": "veplayer.plugin.dashjs.[env].[ext]",
|
|
12611
12693
|
"plugin:shaka": "veplayer.plugin.shaka.[env].[ext]",
|
|
12612
12694
|
"plugin:rtm": "veplayer.plugin.rtm.[env].[ext]",
|
|
12613
12695
|
"plugin:xgvideo": "veplayer.plugin.xgvideo.[env].[ext]",
|
|
@@ -12623,6 +12705,7 @@ var DynamicModule = /* @__PURE__ */ ((DynamicModule2) => {
|
|
|
12623
12705
|
DynamicModule2["PluginMp4"] = "plugin:mp4";
|
|
12624
12706
|
DynamicModule2["PluginHls"] = "plugin:hls";
|
|
12625
12707
|
DynamicModule2["PluginHlsJs"] = "plugin:hlsjs";
|
|
12708
|
+
DynamicModule2["PluginDashJs"] = "plugin:dashjs";
|
|
12626
12709
|
DynamicModule2["PluginShaka"] = "plugin:shaka";
|
|
12627
12710
|
DynamicModule2["PluginRtm"] = "plugin:rtm";
|
|
12628
12711
|
DynamicModule2["PluginXgvideo"] = "plugin:xgvideo";
|
|
@@ -14036,10 +14119,15 @@ const transformOption = (
|
|
|
14036
14119
|
* @param options 更多配置信息。
|
|
14037
14120
|
*/
|
|
14038
14121
|
(options) => {
|
|
14122
|
+
var _a, _b;
|
|
14039
14123
|
const { autoplay: autoplay2, ...rest } = options;
|
|
14040
14124
|
const xgOptions = rest;
|
|
14041
14125
|
if (xgOptions.poster) {
|
|
14042
|
-
xgOptions.poster
|
|
14126
|
+
if (typeof xgOptions.poster === "string") {
|
|
14127
|
+
xgOptions.poster = escapeHtml(xgOptions.poster);
|
|
14128
|
+
} else if (typeof ((_a = xgOptions.poster) == null ? void 0 : _a.poster) === "string") {
|
|
14129
|
+
xgOptions.poster.poster = escapeHtml((_b = xgOptions.poster) == null ? void 0 : _b.poster);
|
|
14130
|
+
}
|
|
14043
14131
|
}
|
|
14044
14132
|
xgOptions.icons = {
|
|
14045
14133
|
...DEFAULT_ICONS,
|
|
@@ -14291,7 +14379,7 @@ class VePlayerBase {
|
|
|
14291
14379
|
* @brief Retrieve the player SDK version number.
|
|
14292
14380
|
*/
|
|
14293
14381
|
get playerVersion() {
|
|
14294
|
-
return "2.8.0
|
|
14382
|
+
return "2.8.0";
|
|
14295
14383
|
}
|
|
14296
14384
|
/** {zh}
|
|
14297
14385
|
* @brief 获取当前播放视频的清晰度唯一标识(definition)。
|
|
@@ -14566,7 +14654,7 @@ class VePlayerBase {
|
|
|
14566
14654
|
}
|
|
14567
14655
|
}
|
|
14568
14656
|
/** {zh}
|
|
14569
|
-
* @brief
|
|
14657
|
+
* @brief 调用此方法开始播放。
|
|
14570
14658
|
*/
|
|
14571
14659
|
/** {en}
|
|
14572
14660
|
* @brief Starts playback.
|
|
@@ -14850,7 +14938,7 @@ class VePlayerBase {
|
|
|
14850
14938
|
return transform(event, callback);
|
|
14851
14939
|
}
|
|
14852
14940
|
async _switch(targetDefinition) {
|
|
14853
|
-
var _a, _b, _c, _d, _e, _f;
|
|
14941
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
14854
14942
|
const preDefinition = clonedeep(this._sourceManager.definition);
|
|
14855
14943
|
const isPaused = this._player.paused && !this._player.isError;
|
|
14856
14944
|
const {
|
|
@@ -14863,9 +14951,9 @@ class VePlayerBase {
|
|
|
14863
14951
|
targetDefinition.url = options == null ? void 0 : options.url;
|
|
14864
14952
|
}
|
|
14865
14953
|
this._sourceManager.switch(targetDefinition);
|
|
14866
|
-
(_b = (_a = this._player) == null ? void 0 : _a.plugins) == null ? void 0 : _b.sources.renderItemList();
|
|
14867
|
-
(
|
|
14868
|
-
const isSourceSwitching = ((
|
|
14954
|
+
(_c = (_b = (_a = this._player) == null ? void 0 : _a.plugins) == null ? void 0 : _b.sources) == null ? void 0 : _c.renderItemList();
|
|
14955
|
+
(_f = (_e = (_d = this._player) == null ? void 0 : _d.plugins) == null ? void 0 : _e.definition) == null ? void 0 : _f.renderItemList();
|
|
14956
|
+
const isSourceSwitching = ((_g = targetDefinition == null ? void 0 : targetDefinition.source) == null ? void 0 : _g.name) !== ((_h = preDefinition == null ? void 0 : preDefinition.source) == null ? void 0 : _h.name);
|
|
14869
14957
|
this._player.config.url = targetDefinition.url;
|
|
14870
14958
|
if (isSameProtocol) {
|
|
14871
14959
|
if (isSourceSwitching) {
|