@volcengine/veplayer 2.10.2-rc.0 → 2.10.2
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 +1 -1
- package/esm/veplayer.biz.live.development.js +52 -20
- package/esm/veplayer.biz.live.production.js +1 -1
- package/esm/veplayer.d.ts +18 -2
- package/esm/veplayer.development.js +88 -23
- package/esm/veplayer.live.d.ts +18 -2
- package/esm/veplayer.live.development.js +88 -23
- package/esm/veplayer.live.production.js +3 -5
- package/esm/veplayer.production.js +3 -5
- package/esm/veplayer.vod.d.ts +1 -1
- package/esm/veplayer.vod.development.js +37 -4
- package/esm/veplayer.vod.production.js +2 -4
- package/package.json +1 -1
- package/umd/index.d.ts +1 -1
- package/umd/veplayer.biz.live.development.js +52 -20
- package/umd/veplayer.biz.live.production.js +1 -1
- package/umd/veplayer.d.ts +18 -2
- package/umd/veplayer.development.js +88 -23
- package/umd/veplayer.live.d.ts +18 -2
- package/umd/veplayer.live.development.js +88 -23
- package/umd/veplayer.live.production.js +1 -1
- package/umd/veplayer.production.js +1 -1
- package/umd/veplayer.vod.d.ts +1 -1
- package/umd/veplayer.vod.development.js +37 -4
- package/umd/veplayer.vod.production.js +1 -1
- package/veplayer.d.ts +18 -2
- package/veplayer.live.d.ts +18 -2
- package/veplayer.vod.d.ts +1 -1
package/umd/veplayer.vod.d.ts
CHANGED
|
@@ -13322,7 +13322,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13322
13322
|
var lodash_curry = curry;
|
|
13323
13323
|
var curry$1 = /* @__PURE__ */ getDefaultExportFromCjs(lodash_curry);
|
|
13324
13324
|
const src = typeof document === "undefined" && typeof location === "undefined" ? require("url").pathToFileURL(__filename).href : typeof document === "undefined" ? location.href : document.currentScript && document.currentScript.src || new URL("umd/veplayer.vod.development.js", document.baseURI).href;
|
|
13325
|
-
const baseUrl = src
|
|
13325
|
+
const baseUrl = src.slice(0, src.lastIndexOf("/"));
|
|
13326
13326
|
const loader = new Loader({
|
|
13327
13327
|
baseUrl
|
|
13328
13328
|
});
|
|
@@ -13613,11 +13613,17 @@ var __publicField = (obj, key, value) => {
|
|
|
13613
13613
|
}
|
|
13614
13614
|
// 自动播放失败事件回调
|
|
13615
13615
|
handleAutoplayPrevented() {
|
|
13616
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
13616
13617
|
if (this._state.mode === 0) {
|
|
13617
13618
|
console.warn("unmute autoplay fail");
|
|
13618
13619
|
this.player.emit(BaseEvents.AUTOPLAY_FAIL, {
|
|
13619
13620
|
mode: "unmute"
|
|
13620
13621
|
});
|
|
13622
|
+
(_d = (_c = (_b = (_a = this.player) == null ? void 0 : _a.config) == null ? void 0 : _b.teaTracker) == null ? void 0 : _c.liveLogger) == null ? void 0 : _d.sendLog({
|
|
13623
|
+
event_key: "autoplay_error",
|
|
13624
|
+
message: BaseEvents.AUTOPLAY_FAIL,
|
|
13625
|
+
mode: "unmute"
|
|
13626
|
+
});
|
|
13621
13627
|
if (isAndroid && isWeixin) {
|
|
13622
13628
|
this._state.mode = 2;
|
|
13623
13629
|
return;
|
|
@@ -13633,12 +13639,22 @@ var __publicField = (obj, key, value) => {
|
|
|
13633
13639
|
mode: "mute"
|
|
13634
13640
|
});
|
|
13635
13641
|
this._state.mode = 2;
|
|
13642
|
+
(_h = (_g = (_f = (_e = this.player) == null ? void 0 : _e.config) == null ? void 0 : _f.teaTracker) == null ? void 0 : _g.liveLogger) == null ? void 0 : _h.sendLog({
|
|
13643
|
+
event_key: "autoplay_error",
|
|
13644
|
+
message: BaseEvents.AUTOPLAY_FAIL,
|
|
13645
|
+
mode: "mute"
|
|
13646
|
+
});
|
|
13636
13647
|
return;
|
|
13637
13648
|
}
|
|
13638
13649
|
if (this._state.mode === 2) {
|
|
13639
13650
|
this.player.emit(BaseEvents.AUTOPLAY_FAIL, {
|
|
13640
13651
|
mode: "noSupport"
|
|
13641
13652
|
});
|
|
13653
|
+
(_l = (_k = (_j = (_i = this.player) == null ? void 0 : _i.config) == null ? void 0 : _j.teaTracker) == null ? void 0 : _k.liveLogger) == null ? void 0 : _l.sendLog({
|
|
13654
|
+
event_key: "autoplay_error",
|
|
13655
|
+
message: BaseEvents.AUTOPLAY_FAIL,
|
|
13656
|
+
mode: "noSupport"
|
|
13657
|
+
});
|
|
13642
13658
|
console.warn("not support autoplay");
|
|
13643
13659
|
return;
|
|
13644
13660
|
}
|
|
@@ -14383,7 +14399,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14383
14399
|
* @brief Retrieve the player SDK version number.
|
|
14384
14400
|
*/
|
|
14385
14401
|
get playerVersion() {
|
|
14386
|
-
return "2.10.2
|
|
14402
|
+
return "2.10.2";
|
|
14387
14403
|
}
|
|
14388
14404
|
/** {zh}
|
|
14389
14405
|
* @brief 获取当前播放视频的清晰度唯一标识(definition)。
|
|
@@ -14663,9 +14679,26 @@ var __publicField = (obj, key, value) => {
|
|
|
14663
14679
|
/** {en}
|
|
14664
14680
|
* @brief Starts playback.
|
|
14665
14681
|
*/
|
|
14666
|
-
play() {
|
|
14682
|
+
async play() {
|
|
14683
|
+
var _a, _b, _c, _d, _e, _f;
|
|
14667
14684
|
/* istanbul ignore next -- @preserve */
|
|
14668
|
-
|
|
14685
|
+
try {
|
|
14686
|
+
if ((_c = (_b = (_a = this._player) == null ? void 0 : _a.config) == null ? void 0 : _b.teaTracker) == null ? void 0 : _c.liveLogger) {
|
|
14687
|
+
this._player.config.teaTracker.liveLogger.sendLog({
|
|
14688
|
+
event_key: "play_method_call"
|
|
14689
|
+
});
|
|
14690
|
+
}
|
|
14691
|
+
const result = await this._player.play();
|
|
14692
|
+
return result;
|
|
14693
|
+
} catch (error2) {
|
|
14694
|
+
if ((_f = (_e = (_d = this._player) == null ? void 0 : _d.config) == null ? void 0 : _e.teaTracker) == null ? void 0 : _f.liveLogger) {
|
|
14695
|
+
this._player.config.teaTracker.liveLogger.sendLog({
|
|
14696
|
+
event_key: "play_method_call_error",
|
|
14697
|
+
error: error2.message || String(error2)
|
|
14698
|
+
});
|
|
14699
|
+
}
|
|
14700
|
+
throw error2;
|
|
14701
|
+
}
|
|
14669
14702
|
}
|
|
14670
14703
|
/** {zh}
|
|
14671
14704
|
* @brief 调用此方法暂停播放。
|