@volcengine/veplayer 2.10.0-rc.0 → 2.10.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/veplayer.biz.live.development.js +28 -18
- 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 +28 -18
- 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/umd/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
|
|
@@ -14564,7 +14564,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14564
14564
|
* @brief Retrieve the player SDK version number.
|
|
14565
14565
|
*/
|
|
14566
14566
|
get playerVersion() {
|
|
14567
|
-
return "2.10.0
|
|
14567
|
+
return "2.10.0";
|
|
14568
14568
|
}
|
|
14569
14569
|
/** {zh}
|
|
14570
14570
|
* @brief 获取当前播放视频的清晰度唯一标识(definition)。
|
|
@@ -55336,7 +55336,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
55336
55336
|
};
|
|
55337
55337
|
}
|
|
55338
55338
|
afterCreate() {
|
|
55339
|
-
if (!this.player.config.teaTracker) {
|
|
55339
|
+
if (!this.player.config.teaTracker.tea) {
|
|
55340
55340
|
return;
|
|
55341
55341
|
}
|
|
55342
55342
|
this.open();
|
|
@@ -55365,18 +55365,19 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
55365
55365
|
}
|
|
55366
55366
|
}
|
|
55367
55367
|
_start() {
|
|
55368
|
-
var _a, _b, _c, _d, _e2
|
|
55369
|
-
|
|
55370
|
-
|
|
55368
|
+
var _a, _b, _c, _d, _e2;
|
|
55369
|
+
const { userId, deviceId, appId } = ((_a = this.player.config) == null ? void 0 : _a.teaTracker) || {};
|
|
55370
|
+
this._liveLogger = (_e2 = (_b = this.player.config) == null ? void 0 : _b.teaTracker) == null ? void 0 : _e2.createPlayerLogger({
|
|
55371
|
+
Tea: (_d = (_c = this.player.config) == null ? void 0 : _c.teaTracker) == null ? void 0 : _d.tea,
|
|
55371
55372
|
player: this.player,
|
|
55372
|
-
aid:
|
|
55373
|
-
project_key:
|
|
55374
|
-
app_name: this.config.appName ||
|
|
55375
|
-
user_id:
|
|
55376
|
-
device_id:
|
|
55373
|
+
aid: appId,
|
|
55374
|
+
project_key: appId,
|
|
55375
|
+
app_name: this.config.appName || appId,
|
|
55376
|
+
user_id: userId,
|
|
55377
|
+
device_id: deviceId,
|
|
55377
55378
|
error_report_stop: true,
|
|
55378
55379
|
ext: {
|
|
55379
|
-
veplayer_version: "2.10.0
|
|
55380
|
+
veplayer_version: "2.10.0",
|
|
55380
55381
|
flv_version: "3.0.23-rc.6",
|
|
55381
55382
|
hls_version: "3.0.21-rc.21",
|
|
55382
55383
|
rts_version: "0.2.1-alpha.47"
|
|
@@ -62193,6 +62194,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
62193
62194
|
__publicField(this, "liveLogger");
|
|
62194
62195
|
__publicField(this, "_userId");
|
|
62195
62196
|
__publicField(this, "_deviceId");
|
|
62197
|
+
__publicField(this, "_appId");
|
|
62196
62198
|
}
|
|
62197
62199
|
get userId() {
|
|
62198
62200
|
return this._userId;
|
|
@@ -62203,21 +62205,27 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
62203
62205
|
get channel() {
|
|
62204
62206
|
return "cn";
|
|
62205
62207
|
}
|
|
62208
|
+
get appId() {
|
|
62209
|
+
return this._appId;
|
|
62210
|
+
}
|
|
62206
62211
|
init(logger2) {
|
|
62207
|
-
|
|
62208
|
-
this.
|
|
62209
|
-
|
|
62212
|
+
const { userId, deviceId, enable: enable2, appId, ...teaOptions } = logger2 ?? {};
|
|
62213
|
+
this._userId = userId || getUserId$1();
|
|
62214
|
+
this._deviceId = deviceId || getDeviceID$1();
|
|
62215
|
+
this._appId = appId || 654925;
|
|
62216
|
+
if (enable2 === false) {
|
|
62210
62217
|
return;
|
|
62211
62218
|
}
|
|
62212
|
-
this.tea = this._createTea();
|
|
62219
|
+
this.tea = this._createTea(teaOptions);
|
|
62213
62220
|
}
|
|
62214
62221
|
createPlayerLogger(options) {
|
|
62215
62222
|
this.liveLogger = new LoggerControl(options);
|
|
62216
62223
|
return this.liveLogger;
|
|
62217
62224
|
}
|
|
62218
|
-
_createTea() {
|
|
62225
|
+
_createTea(teaOptions) {
|
|
62219
62226
|
const Tea = new Wi$1("player_track");
|
|
62220
62227
|
Tea.init({
|
|
62228
|
+
...teaOptions,
|
|
62221
62229
|
app_id: 468759,
|
|
62222
62230
|
channel: "cn"
|
|
62223
62231
|
});
|
|
@@ -67212,7 +67220,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
67212
67220
|
console.warn(create(ErrorCode.INVALID_LOGGER, i18n).message);
|
|
67213
67221
|
}
|
|
67214
67222
|
await prepare({
|
|
67215
|
-
|
|
67223
|
+
logger: options.logger,
|
|
67216
67224
|
appId: ((_c = options.logger) == null ? void 0 : _c.appId) || 654925,
|
|
67217
67225
|
syncWaitSettings: false,
|
|
67218
67226
|
strategies: {
|
|
@@ -67301,7 +67309,9 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
67301
67309
|
if (!teaTracker.tea) {
|
|
67302
67310
|
teaTracker.init({
|
|
67303
67311
|
userId: options.userId,
|
|
67304
|
-
deviceId: options.deviceId
|
|
67312
|
+
deviceId: options.deviceId,
|
|
67313
|
+
appId: options.appId,
|
|
67314
|
+
...options.logger
|
|
67305
67315
|
});
|
|
67306
67316
|
}
|
|
67307
67317
|
if (!liveVeStrategy.veStrategyManager) {
|
|
@@ -67309,7 +67319,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
67309
67319
|
}
|
|
67310
67320
|
await ((_a = liveVeStrategy.veStrategyManager) == null ? void 0 : _a.init({
|
|
67311
67321
|
...options,
|
|
67312
|
-
playerVersion: "2.10.0
|
|
67322
|
+
playerVersion: "2.10.0",
|
|
67313
67323
|
type: "LIVE"
|
|
67314
67324
|
}));
|
|
67315
67325
|
return liveVeStrategy.veStrategyManager;
|
package/umd/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
|
|
@@ -14564,7 +14564,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14564
14564
|
* @brief Retrieve the player SDK version number.
|
|
14565
14565
|
*/
|
|
14566
14566
|
get playerVersion() {
|
|
14567
|
-
return "2.10.0
|
|
14567
|
+
return "2.10.0";
|
|
14568
14568
|
}
|
|
14569
14569
|
/** {zh}
|
|
14570
14570
|
* @brief 获取当前播放视频的清晰度唯一标识(definition)。
|
|
@@ -55336,7 +55336,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
55336
55336
|
};
|
|
55337
55337
|
}
|
|
55338
55338
|
afterCreate() {
|
|
55339
|
-
if (!this.player.config.teaTracker) {
|
|
55339
|
+
if (!this.player.config.teaTracker.tea) {
|
|
55340
55340
|
return;
|
|
55341
55341
|
}
|
|
55342
55342
|
this.open();
|
|
@@ -55365,18 +55365,19 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
55365
55365
|
}
|
|
55366
55366
|
}
|
|
55367
55367
|
_start() {
|
|
55368
|
-
var _a, _b, _c, _d, _e2
|
|
55369
|
-
|
|
55370
|
-
|
|
55368
|
+
var _a, _b, _c, _d, _e2;
|
|
55369
|
+
const { userId, deviceId, appId } = ((_a = this.player.config) == null ? void 0 : _a.teaTracker) || {};
|
|
55370
|
+
this._liveLogger = (_e2 = (_b = this.player.config) == null ? void 0 : _b.teaTracker) == null ? void 0 : _e2.createPlayerLogger({
|
|
55371
|
+
Tea: (_d = (_c = this.player.config) == null ? void 0 : _c.teaTracker) == null ? void 0 : _d.tea,
|
|
55371
55372
|
player: this.player,
|
|
55372
|
-
aid:
|
|
55373
|
-
project_key:
|
|
55374
|
-
app_name: this.config.appName ||
|
|
55375
|
-
user_id:
|
|
55376
|
-
device_id:
|
|
55373
|
+
aid: appId,
|
|
55374
|
+
project_key: appId,
|
|
55375
|
+
app_name: this.config.appName || appId,
|
|
55376
|
+
user_id: userId,
|
|
55377
|
+
device_id: deviceId,
|
|
55377
55378
|
error_report_stop: true,
|
|
55378
55379
|
ext: {
|
|
55379
|
-
veplayer_version: "2.10.0
|
|
55380
|
+
veplayer_version: "2.10.0",
|
|
55380
55381
|
flv_version: "3.0.23-rc.6",
|
|
55381
55382
|
hls_version: "3.0.21-rc.21",
|
|
55382
55383
|
rts_version: "0.2.1-alpha.47"
|
|
@@ -62193,6 +62194,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
62193
62194
|
__publicField(this, "liveLogger");
|
|
62194
62195
|
__publicField(this, "_userId");
|
|
62195
62196
|
__publicField(this, "_deviceId");
|
|
62197
|
+
__publicField(this, "_appId");
|
|
62196
62198
|
}
|
|
62197
62199
|
get userId() {
|
|
62198
62200
|
return this._userId;
|
|
@@ -62203,21 +62205,27 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
62203
62205
|
get channel() {
|
|
62204
62206
|
return "cn";
|
|
62205
62207
|
}
|
|
62208
|
+
get appId() {
|
|
62209
|
+
return this._appId;
|
|
62210
|
+
}
|
|
62206
62211
|
init(logger2) {
|
|
62207
|
-
|
|
62208
|
-
this.
|
|
62209
|
-
|
|
62212
|
+
const { userId, deviceId, enable: enable2, appId, ...teaOptions } = logger2 ?? {};
|
|
62213
|
+
this._userId = userId || getUserId$1();
|
|
62214
|
+
this._deviceId = deviceId || getDeviceID$1();
|
|
62215
|
+
this._appId = appId || 654925;
|
|
62216
|
+
if (enable2 === false) {
|
|
62210
62217
|
return;
|
|
62211
62218
|
}
|
|
62212
|
-
this.tea = this._createTea();
|
|
62219
|
+
this.tea = this._createTea(teaOptions);
|
|
62213
62220
|
}
|
|
62214
62221
|
createPlayerLogger(options) {
|
|
62215
62222
|
this.liveLogger = new LoggerControl(options);
|
|
62216
62223
|
return this.liveLogger;
|
|
62217
62224
|
}
|
|
62218
|
-
_createTea() {
|
|
62225
|
+
_createTea(teaOptions) {
|
|
62219
62226
|
const Tea = new Wi$1("player_track");
|
|
62220
62227
|
Tea.init({
|
|
62228
|
+
...teaOptions,
|
|
62221
62229
|
app_id: 468759,
|
|
62222
62230
|
channel: "cn"
|
|
62223
62231
|
});
|
|
@@ -67212,7 +67220,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
67212
67220
|
console.warn(create(ErrorCode.INVALID_LOGGER, i18n).message);
|
|
67213
67221
|
}
|
|
67214
67222
|
await prepare({
|
|
67215
|
-
|
|
67223
|
+
logger: options.logger,
|
|
67216
67224
|
appId: ((_c = options.logger) == null ? void 0 : _c.appId) || 654925,
|
|
67217
67225
|
syncWaitSettings: false,
|
|
67218
67226
|
strategies: {
|
|
@@ -67301,7 +67309,9 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
67301
67309
|
if (!teaTracker.tea) {
|
|
67302
67310
|
teaTracker.init({
|
|
67303
67311
|
userId: options.userId,
|
|
67304
|
-
deviceId: options.deviceId
|
|
67312
|
+
deviceId: options.deviceId,
|
|
67313
|
+
appId: options.appId,
|
|
67314
|
+
...options.logger
|
|
67305
67315
|
});
|
|
67306
67316
|
}
|
|
67307
67317
|
if (!liveVeStrategy.veStrategyManager) {
|
|
@@ -67309,7 +67319,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
67309
67319
|
}
|
|
67310
67320
|
await ((_a = liveVeStrategy.veStrategyManager) == null ? void 0 : _a.init({
|
|
67311
67321
|
...options,
|
|
67312
|
-
playerVersion: "2.10.0
|
|
67322
|
+
playerVersion: "2.10.0",
|
|
67313
67323
|
type: "LIVE"
|
|
67314
67324
|
}));
|
|
67315
67325
|
return liveVeStrategy.veStrategyManager;
|