@volcengine/veplayer 2.10.0-rc.0 → 2.10.0-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/veplayer.biz.live.development.js +26 -16
- package/esm/veplayer.biz.live.production.js +1 -1
- package/esm/veplayer.d.ts +7 -2
- package/esm/veplayer.development.js +29 -19
- package/esm/veplayer.live.d.ts +7 -2
- package/esm/veplayer.live.development.js +29 -19
- package/esm/veplayer.live.production.js +2 -2
- package/esm/veplayer.production.js +2 -2
- package/esm/veplayer.vod.development.js +1 -1
- package/esm/veplayer.vod.production.js +1 -1
- package/package.json +1 -1
- package/umd/veplayer.biz.live.development.js +26 -16
- package/umd/veplayer.biz.live.production.js +1 -1
- package/umd/veplayer.d.ts +7 -2
- package/umd/veplayer.development.js +29 -19
- package/umd/veplayer.live.d.ts +7 -2
- package/umd/veplayer.live.development.js +29 -19
- package/umd/veplayer.live.production.js +1 -1
- package/umd/veplayer.production.js +1 -1
- package/umd/veplayer.vod.development.js +1 -1
- package/umd/veplayer.vod.production.js +1 -1
- package/veplayer.d.ts +7 -2
- package/veplayer.live.d.ts +7 -2
package/esm/veplayer.d.ts
CHANGED
|
@@ -23,6 +23,9 @@ import MiniScreen from "xgplayer/es/plugins/miniScreen";
|
|
|
23
23
|
import PIPIcon from "xgplayer/es/plugins/pip";
|
|
24
24
|
import VeStrategy from "@byted/volcengine-vestrategy";
|
|
25
25
|
import { StrategyRecommendation, BaseStrategy, VeStrategyConfig, VideoType } from "@byted/volcengine-vestrategy";
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
import { IInitParam } from "byted-tea-sdk/es/index-base.min.js";
|
|
26
29
|
import { HLS } from "@byted/xgplayer-hls.js";
|
|
27
30
|
declare const EN: {
|
|
28
31
|
DEFINITION_FALLBACK_TOAST: string;
|
|
@@ -5740,7 +5743,7 @@ type Stats = {
|
|
|
5740
5743
|
* @list option
|
|
5741
5744
|
* @kind property
|
|
5742
5745
|
*/
|
|
5743
|
-
interface LoggerConfig {
|
|
5746
|
+
interface LoggerConfig extends Partial<IInitParam> {
|
|
5744
5747
|
/** {zh}
|
|
5745
5748
|
* @brief 是否开启日志上报。
|
|
5746
5749
|
* @default true
|
|
@@ -5965,6 +5968,7 @@ interface PrepareOptions {
|
|
|
5965
5968
|
rtmAdaptiveBuffer?: boolean;
|
|
5966
5969
|
};
|
|
5967
5970
|
syncWaitSettings?: boolean;
|
|
5971
|
+
logger?: LoggerConfig;
|
|
5968
5972
|
}
|
|
5969
5973
|
/** {zh}
|
|
5970
5974
|
* @list option
|
|
@@ -10633,7 +10637,7 @@ declare namespace live {
|
|
|
10633
10637
|
* @list option
|
|
10634
10638
|
* @kind property
|
|
10635
10639
|
*/
|
|
10636
|
-
interface LoggerConfig {
|
|
10640
|
+
interface LoggerConfig extends Partial<IInitParam> {
|
|
10637
10641
|
/** {zh}
|
|
10638
10642
|
* @brief 是否开启日志上报。
|
|
10639
10643
|
* @default true
|
|
@@ -10875,6 +10879,7 @@ declare namespace live {
|
|
|
10875
10879
|
rtmAdaptiveBuffer?: boolean;
|
|
10876
10880
|
};
|
|
10877
10881
|
syncWaitSettings?: boolean;
|
|
10882
|
+
logger?: LoggerConfig;
|
|
10878
10883
|
}
|
|
10879
10884
|
/** {zh}
|
|
10880
10885
|
* @list option
|
|
@@ -14560,7 +14560,7 @@ class VePlayerBase {
|
|
|
14560
14560
|
* @brief Retrieve the player SDK version number.
|
|
14561
14561
|
*/
|
|
14562
14562
|
get playerVersion() {
|
|
14563
|
-
return "2.10.0-rc.
|
|
14563
|
+
return "2.10.0-rc.1";
|
|
14564
14564
|
}
|
|
14565
14565
|
/** {zh}
|
|
14566
14566
|
* @brief 获取当前播放视频的清晰度唯一标识(definition)。
|
|
@@ -55332,7 +55332,7 @@ class Logger2 extends Plugin {
|
|
|
55332
55332
|
};
|
|
55333
55333
|
}
|
|
55334
55334
|
afterCreate() {
|
|
55335
|
-
if (!this.player.config.teaTracker) {
|
|
55335
|
+
if (!this.player.config.teaTracker.tea) {
|
|
55336
55336
|
return;
|
|
55337
55337
|
}
|
|
55338
55338
|
this.open();
|
|
@@ -55361,18 +55361,19 @@ class Logger2 extends Plugin {
|
|
|
55361
55361
|
}
|
|
55362
55362
|
}
|
|
55363
55363
|
_start() {
|
|
55364
|
-
var _a, _b, _c, _d, _e2
|
|
55365
|
-
|
|
55366
|
-
|
|
55364
|
+
var _a, _b, _c, _d, _e2;
|
|
55365
|
+
const { userId, deviceId, appId } = ((_a = this.player.config) == null ? void 0 : _a.teaTracker) || {};
|
|
55366
|
+
this._liveLogger = (_e2 = (_b = this.player.config) == null ? void 0 : _b.teaTracker) == null ? void 0 : _e2.createPlayerLogger({
|
|
55367
|
+
Tea: (_d = (_c = this.player.config) == null ? void 0 : _c.teaTracker) == null ? void 0 : _d.tea,
|
|
55367
55368
|
player: this.player,
|
|
55368
|
-
aid:
|
|
55369
|
-
project_key:
|
|
55370
|
-
app_name: this.config.appName ||
|
|
55371
|
-
user_id:
|
|
55372
|
-
device_id:
|
|
55369
|
+
aid: appId,
|
|
55370
|
+
project_key: appId,
|
|
55371
|
+
app_name: this.config.appName || appId,
|
|
55372
|
+
user_id: userId,
|
|
55373
|
+
device_id: deviceId,
|
|
55373
55374
|
error_report_stop: true,
|
|
55374
55375
|
ext: {
|
|
55375
|
-
veplayer_version: "2.10.0-rc.
|
|
55376
|
+
veplayer_version: "2.10.0-rc.1",
|
|
55376
55377
|
flv_version: "3.0.23-rc.6",
|
|
55377
55378
|
hls_version: "3.0.21-rc.21",
|
|
55378
55379
|
rts_version: "0.2.1-alpha.47"
|
|
@@ -62189,6 +62190,7 @@ class TeaTracker {
|
|
|
62189
62190
|
__publicField(this, "liveLogger");
|
|
62190
62191
|
__publicField(this, "_userId");
|
|
62191
62192
|
__publicField(this, "_deviceId");
|
|
62193
|
+
__publicField(this, "_appId");
|
|
62192
62194
|
}
|
|
62193
62195
|
get userId() {
|
|
62194
62196
|
return this._userId;
|
|
@@ -62199,21 +62201,27 @@ class TeaTracker {
|
|
|
62199
62201
|
get channel() {
|
|
62200
62202
|
return "cn";
|
|
62201
62203
|
}
|
|
62204
|
+
get appId() {
|
|
62205
|
+
return this._appId;
|
|
62206
|
+
}
|
|
62202
62207
|
init(logger2) {
|
|
62203
|
-
|
|
62204
|
-
this.
|
|
62205
|
-
|
|
62208
|
+
const { userId, deviceId, enable: enable2, appId, ...teaOptions } = logger2 ?? {};
|
|
62209
|
+
this._userId = userId || getUserId$1();
|
|
62210
|
+
this._deviceId = deviceId || getDeviceID$1();
|
|
62211
|
+
this._appId = appId || 654925;
|
|
62212
|
+
if (enable2 === false) {
|
|
62206
62213
|
return;
|
|
62207
62214
|
}
|
|
62208
|
-
this.tea = this._createTea();
|
|
62215
|
+
this.tea = this._createTea(teaOptions);
|
|
62209
62216
|
}
|
|
62210
62217
|
createPlayerLogger(options) {
|
|
62211
62218
|
this.liveLogger = new LoggerControl(options);
|
|
62212
62219
|
return this.liveLogger;
|
|
62213
62220
|
}
|
|
62214
|
-
_createTea() {
|
|
62221
|
+
_createTea(teaOptions) {
|
|
62215
62222
|
const Tea = new Wi$1("player_track");
|
|
62216
62223
|
Tea.init({
|
|
62224
|
+
...teaOptions,
|
|
62217
62225
|
app_id: 468759,
|
|
62218
62226
|
channel: "cn"
|
|
62219
62227
|
});
|
|
@@ -67208,7 +67216,7 @@ async function createLivePlayer(options) {
|
|
|
67208
67216
|
console.warn(create(ErrorCode.INVALID_LOGGER, i18n).message);
|
|
67209
67217
|
}
|
|
67210
67218
|
await prepare({
|
|
67211
|
-
|
|
67219
|
+
logger: options.logger,
|
|
67212
67220
|
appId: ((_c = options.logger) == null ? void 0 : _c.appId) || 654925,
|
|
67213
67221
|
syncWaitSettings: false,
|
|
67214
67222
|
strategies: {
|
|
@@ -67297,7 +67305,9 @@ async function prepare(options) {
|
|
|
67297
67305
|
if (!teaTracker.tea) {
|
|
67298
67306
|
teaTracker.init({
|
|
67299
67307
|
userId: options.userId,
|
|
67300
|
-
deviceId: options.deviceId
|
|
67308
|
+
deviceId: options.deviceId,
|
|
67309
|
+
appId: options.appId,
|
|
67310
|
+
...options.logger
|
|
67301
67311
|
});
|
|
67302
67312
|
}
|
|
67303
67313
|
if (!liveVeStrategy.veStrategyManager) {
|
|
@@ -67305,7 +67315,7 @@ async function prepare(options) {
|
|
|
67305
67315
|
}
|
|
67306
67316
|
await ((_a = liveVeStrategy.veStrategyManager) == null ? void 0 : _a.init({
|
|
67307
67317
|
...options,
|
|
67308
|
-
playerVersion: "2.10.0-rc.
|
|
67318
|
+
playerVersion: "2.10.0-rc.1",
|
|
67309
67319
|
type: "LIVE"
|
|
67310
67320
|
}));
|
|
67311
67321
|
return liveVeStrategy.veStrategyManager;
|
package/esm/veplayer.live.d.ts
CHANGED
|
@@ -23,6 +23,9 @@ import MiniScreen from "xgplayer/es/plugins/miniScreen";
|
|
|
23
23
|
import PIPIcon from "xgplayer/es/plugins/pip";
|
|
24
24
|
import VeStrategy from "@byted/volcengine-vestrategy";
|
|
25
25
|
import { StrategyRecommendation, BaseStrategy, VeStrategyConfig, VideoType } from "@byted/volcengine-vestrategy";
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
import { IInitParam } from "byted-tea-sdk/es/index-base.min.js";
|
|
26
29
|
import { HLS } from "@byted/xgplayer-hls.js";
|
|
27
30
|
declare const EN: {
|
|
28
31
|
DEFINITION_FALLBACK_TOAST: string;
|
|
@@ -5740,7 +5743,7 @@ type Stats = {
|
|
|
5740
5743
|
* @list option
|
|
5741
5744
|
* @kind property
|
|
5742
5745
|
*/
|
|
5743
|
-
interface LoggerConfig {
|
|
5746
|
+
interface LoggerConfig extends Partial<IInitParam> {
|
|
5744
5747
|
/** {zh}
|
|
5745
5748
|
* @brief 是否开启日志上报。
|
|
5746
5749
|
* @default true
|
|
@@ -5965,6 +5968,7 @@ interface PrepareOptions {
|
|
|
5965
5968
|
rtmAdaptiveBuffer?: boolean;
|
|
5966
5969
|
};
|
|
5967
5970
|
syncWaitSettings?: boolean;
|
|
5971
|
+
logger?: LoggerConfig;
|
|
5968
5972
|
}
|
|
5969
5973
|
/** {zh}
|
|
5970
5974
|
* @list option
|
|
@@ -10633,7 +10637,7 @@ declare namespace live {
|
|
|
10633
10637
|
* @list option
|
|
10634
10638
|
* @kind property
|
|
10635
10639
|
*/
|
|
10636
|
-
interface LoggerConfig {
|
|
10640
|
+
interface LoggerConfig extends Partial<IInitParam> {
|
|
10637
10641
|
/** {zh}
|
|
10638
10642
|
* @brief 是否开启日志上报。
|
|
10639
10643
|
* @default true
|
|
@@ -10875,6 +10879,7 @@ declare namespace live {
|
|
|
10875
10879
|
rtmAdaptiveBuffer?: boolean;
|
|
10876
10880
|
};
|
|
10877
10881
|
syncWaitSettings?: boolean;
|
|
10882
|
+
logger?: LoggerConfig;
|
|
10878
10883
|
}
|
|
10879
10884
|
/** {zh}
|
|
10880
10885
|
* @list option
|
|
@@ -14560,7 +14560,7 @@ class VePlayerBase {
|
|
|
14560
14560
|
* @brief Retrieve the player SDK version number.
|
|
14561
14561
|
*/
|
|
14562
14562
|
get playerVersion() {
|
|
14563
|
-
return "2.10.0-rc.
|
|
14563
|
+
return "2.10.0-rc.1";
|
|
14564
14564
|
}
|
|
14565
14565
|
/** {zh}
|
|
14566
14566
|
* @brief 获取当前播放视频的清晰度唯一标识(definition)。
|
|
@@ -55332,7 +55332,7 @@ class Logger2 extends Plugin {
|
|
|
55332
55332
|
};
|
|
55333
55333
|
}
|
|
55334
55334
|
afterCreate() {
|
|
55335
|
-
if (!this.player.config.teaTracker) {
|
|
55335
|
+
if (!this.player.config.teaTracker.tea) {
|
|
55336
55336
|
return;
|
|
55337
55337
|
}
|
|
55338
55338
|
this.open();
|
|
@@ -55361,18 +55361,19 @@ class Logger2 extends Plugin {
|
|
|
55361
55361
|
}
|
|
55362
55362
|
}
|
|
55363
55363
|
_start() {
|
|
55364
|
-
var _a, _b, _c, _d, _e2
|
|
55365
|
-
|
|
55366
|
-
|
|
55364
|
+
var _a, _b, _c, _d, _e2;
|
|
55365
|
+
const { userId, deviceId, appId } = ((_a = this.player.config) == null ? void 0 : _a.teaTracker) || {};
|
|
55366
|
+
this._liveLogger = (_e2 = (_b = this.player.config) == null ? void 0 : _b.teaTracker) == null ? void 0 : _e2.createPlayerLogger({
|
|
55367
|
+
Tea: (_d = (_c = this.player.config) == null ? void 0 : _c.teaTracker) == null ? void 0 : _d.tea,
|
|
55367
55368
|
player: this.player,
|
|
55368
|
-
aid:
|
|
55369
|
-
project_key:
|
|
55370
|
-
app_name: this.config.appName ||
|
|
55371
|
-
user_id:
|
|
55372
|
-
device_id:
|
|
55369
|
+
aid: appId,
|
|
55370
|
+
project_key: appId,
|
|
55371
|
+
app_name: this.config.appName || appId,
|
|
55372
|
+
user_id: userId,
|
|
55373
|
+
device_id: deviceId,
|
|
55373
55374
|
error_report_stop: true,
|
|
55374
55375
|
ext: {
|
|
55375
|
-
veplayer_version: "2.10.0-rc.
|
|
55376
|
+
veplayer_version: "2.10.0-rc.1",
|
|
55376
55377
|
flv_version: "3.0.23-rc.6",
|
|
55377
55378
|
hls_version: "3.0.21-rc.21",
|
|
55378
55379
|
rts_version: "0.2.1-alpha.47"
|
|
@@ -62195,6 +62196,7 @@ class TeaTracker {
|
|
|
62195
62196
|
__publicField(this, "liveLogger");
|
|
62196
62197
|
__publicField(this, "_userId");
|
|
62197
62198
|
__publicField(this, "_deviceId");
|
|
62199
|
+
__publicField(this, "_appId");
|
|
62198
62200
|
}
|
|
62199
62201
|
get userId() {
|
|
62200
62202
|
return this._userId;
|
|
@@ -62205,21 +62207,27 @@ class TeaTracker {
|
|
|
62205
62207
|
get channel() {
|
|
62206
62208
|
return "cn";
|
|
62207
62209
|
}
|
|
62210
|
+
get appId() {
|
|
62211
|
+
return this._appId;
|
|
62212
|
+
}
|
|
62208
62213
|
init(logger2) {
|
|
62209
|
-
|
|
62210
|
-
this.
|
|
62211
|
-
|
|
62214
|
+
const { userId, deviceId, enable: enable2, appId, ...teaOptions } = logger2 ?? {};
|
|
62215
|
+
this._userId = userId || getUserId$1();
|
|
62216
|
+
this._deviceId = deviceId || getDeviceID$1();
|
|
62217
|
+
this._appId = appId || 654925;
|
|
62218
|
+
if (enable2 === false) {
|
|
62212
62219
|
return;
|
|
62213
62220
|
}
|
|
62214
|
-
this.tea = this._createTea();
|
|
62221
|
+
this.tea = this._createTea(teaOptions);
|
|
62215
62222
|
}
|
|
62216
62223
|
createPlayerLogger(options) {
|
|
62217
62224
|
this.liveLogger = new LoggerControl(options);
|
|
62218
62225
|
return this.liveLogger;
|
|
62219
62226
|
}
|
|
62220
|
-
_createTea() {
|
|
62227
|
+
_createTea(teaOptions) {
|
|
62221
62228
|
const Tea = new Wi$1("player_track");
|
|
62222
62229
|
Tea.init({
|
|
62230
|
+
...teaOptions,
|
|
62223
62231
|
app_id: 468759,
|
|
62224
62232
|
channel: "cn"
|
|
62225
62233
|
});
|
|
@@ -67214,7 +67222,7 @@ async function createLivePlayer(options) {
|
|
|
67214
67222
|
console.warn(create(ErrorCode.INVALID_LOGGER, i18n).message);
|
|
67215
67223
|
}
|
|
67216
67224
|
await prepare({
|
|
67217
|
-
|
|
67225
|
+
logger: options.logger,
|
|
67218
67226
|
appId: ((_c = options.logger) == null ? void 0 : _c.appId) || 654925,
|
|
67219
67227
|
syncWaitSettings: false,
|
|
67220
67228
|
strategies: {
|
|
@@ -67303,7 +67311,9 @@ async function prepare(options) {
|
|
|
67303
67311
|
if (!teaTracker.tea) {
|
|
67304
67312
|
teaTracker.init({
|
|
67305
67313
|
userId: options.userId,
|
|
67306
|
-
deviceId: options.deviceId
|
|
67314
|
+
deviceId: options.deviceId,
|
|
67315
|
+
appId: options.appId,
|
|
67316
|
+
...options.logger
|
|
67307
67317
|
});
|
|
67308
67318
|
}
|
|
67309
67319
|
if (!liveVeStrategy.veStrategyManager) {
|
|
@@ -67311,7 +67321,7 @@ async function prepare(options) {
|
|
|
67311
67321
|
}
|
|
67312
67322
|
await ((_a = liveVeStrategy.veStrategyManager) == null ? void 0 : _a.init({
|
|
67313
67323
|
...options,
|
|
67314
|
-
playerVersion: "2.10.0-rc.
|
|
67324
|
+
playerVersion: "2.10.0-rc.1",
|
|
67315
67325
|
type: "LIVE"
|
|
67316
67326
|
}));
|
|
67317
67327
|
return liveVeStrategy.veStrategyManager;
|