@volcengine/veplayer 2.10.2-rc.0 → 2.10.2-rc.1
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 +50 -18
- 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 +50 -18
- 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/esm/veplayer.vod.d.ts
CHANGED
|
@@ -13318,7 +13318,7 @@ curry.placeholder = {};
|
|
|
13318
13318
|
var lodash_curry = curry;
|
|
13319
13319
|
var curry$1 = /* @__PURE__ */ getDefaultExportFromCjs(lodash_curry);
|
|
13320
13320
|
const src = import.meta.url;
|
|
13321
|
-
const baseUrl = src
|
|
13321
|
+
const baseUrl = src.slice(0, src.lastIndexOf("/"));
|
|
13322
13322
|
const loader = new Loader({
|
|
13323
13323
|
baseUrl
|
|
13324
13324
|
});
|
|
@@ -13609,11 +13609,17 @@ class Autoplay extends Plugin {
|
|
|
13609
13609
|
}
|
|
13610
13610
|
// 自动播放失败事件回调
|
|
13611
13611
|
handleAutoplayPrevented() {
|
|
13612
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
13612
13613
|
if (this._state.mode === 0) {
|
|
13613
13614
|
console.warn("unmute autoplay fail");
|
|
13614
13615
|
this.player.emit(BaseEvents.AUTOPLAY_FAIL, {
|
|
13615
13616
|
mode: "unmute"
|
|
13616
13617
|
});
|
|
13618
|
+
(_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({
|
|
13619
|
+
event_key: "autoplay_error",
|
|
13620
|
+
message: BaseEvents.AUTOPLAY_FAIL,
|
|
13621
|
+
mode: "unmute"
|
|
13622
|
+
});
|
|
13617
13623
|
if (isAndroid && isWeixin) {
|
|
13618
13624
|
this._state.mode = 2;
|
|
13619
13625
|
return;
|
|
@@ -13629,12 +13635,22 @@ class Autoplay extends Plugin {
|
|
|
13629
13635
|
mode: "mute"
|
|
13630
13636
|
});
|
|
13631
13637
|
this._state.mode = 2;
|
|
13638
|
+
(_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({
|
|
13639
|
+
event_key: "autoplay_error",
|
|
13640
|
+
message: BaseEvents.AUTOPLAY_FAIL,
|
|
13641
|
+
mode: "mute"
|
|
13642
|
+
});
|
|
13632
13643
|
return;
|
|
13633
13644
|
}
|
|
13634
13645
|
if (this._state.mode === 2) {
|
|
13635
13646
|
this.player.emit(BaseEvents.AUTOPLAY_FAIL, {
|
|
13636
13647
|
mode: "noSupport"
|
|
13637
13648
|
});
|
|
13649
|
+
(_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({
|
|
13650
|
+
event_key: "autoplay_error",
|
|
13651
|
+
message: BaseEvents.AUTOPLAY_FAIL,
|
|
13652
|
+
mode: "noSupport"
|
|
13653
|
+
});
|
|
13638
13654
|
console.warn("not support autoplay");
|
|
13639
13655
|
return;
|
|
13640
13656
|
}
|
|
@@ -14379,7 +14395,7 @@ class VePlayerBase {
|
|
|
14379
14395
|
* @brief Retrieve the player SDK version number.
|
|
14380
14396
|
*/
|
|
14381
14397
|
get playerVersion() {
|
|
14382
|
-
return "2.10.2-rc.
|
|
14398
|
+
return "2.10.2-rc.1";
|
|
14383
14399
|
}
|
|
14384
14400
|
/** {zh}
|
|
14385
14401
|
* @brief 获取当前播放视频的清晰度唯一标识(definition)。
|
|
@@ -14659,9 +14675,26 @@ class VePlayerBase {
|
|
|
14659
14675
|
/** {en}
|
|
14660
14676
|
* @brief Starts playback.
|
|
14661
14677
|
*/
|
|
14662
|
-
play() {
|
|
14678
|
+
async play() {
|
|
14679
|
+
var _a, _b, _c, _d, _e, _f;
|
|
14663
14680
|
/* istanbul ignore next -- @preserve */
|
|
14664
|
-
|
|
14681
|
+
try {
|
|
14682
|
+
if ((_c = (_b = (_a = this._player) == null ? void 0 : _a.config) == null ? void 0 : _b.teaTracker) == null ? void 0 : _c.liveLogger) {
|
|
14683
|
+
this._player.config.teaTracker.liveLogger.sendLog({
|
|
14684
|
+
event_key: "play_method_call"
|
|
14685
|
+
});
|
|
14686
|
+
}
|
|
14687
|
+
const result = await this._player.play();
|
|
14688
|
+
return result;
|
|
14689
|
+
} catch (error2) {
|
|
14690
|
+
if ((_f = (_e = (_d = this._player) == null ? void 0 : _d.config) == null ? void 0 : _e.teaTracker) == null ? void 0 : _f.liveLogger) {
|
|
14691
|
+
this._player.config.teaTracker.liveLogger.sendLog({
|
|
14692
|
+
event_key: "play_method_call_error",
|
|
14693
|
+
error: error2.message || String(error2)
|
|
14694
|
+
});
|
|
14695
|
+
}
|
|
14696
|
+
throw error2;
|
|
14697
|
+
}
|
|
14665
14698
|
}
|
|
14666
14699
|
/** {zh}
|
|
14667
14700
|
* @brief 调用此方法暂停播放。
|