@byteplus/react-native-live-push 1.3.3-rc.0 → 1.4.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.
@@ -221,38 +221,37 @@ export declare enum VeLiveVideoCaptureType {
221
221
  * @brief Capture the video with dual cameras.
222
222
  *
223
223
  */
224
- VeLiveVideoCaptureDualCamera = 2,
225
224
 
226
225
  /** {en}
227
226
  * @platform android
228
227
  * @brief Capture the screen.
229
228
  *
230
229
  */
231
- VeLiveVideoCaptureScreen = 3,
230
+ VeLiveVideoCaptureScreen = 2,
232
231
 
233
232
  /** {en}
234
233
  * @brief Capture the video with an external device or source.
235
234
  *
236
235
  */
237
- VeLiveVideoCaptureExternal = 4,
236
+ VeLiveVideoCaptureExternal = 3,
238
237
 
239
238
  /** {en}
240
239
  * @brief Use a static image as the video source.
241
240
  *
242
241
  */
243
- VeLiveVideoCaptureCustomImage = 5,
242
+ VeLiveVideoCaptureCustomImage = 4,
244
243
 
245
244
  /** {en}
246
245
  * @brief Use the last frame as the video source.
247
246
  *
248
247
  */
249
- VeLiveVideoCaptureLastFrame = 6,
248
+ VeLiveVideoCaptureLastFrame = 5,
250
249
 
251
250
  /** {en}
252
251
  * @brief Use a black frame as the video source. This is usually used for debugging purposes or in special circumstances.
253
252
  *
254
253
  */
255
- VeLiveVideoCaptureDummyFrame = 7
254
+ VeLiveVideoCaptureDummyFrame = 6
256
255
  }
257
256
 
258
257
  export declare enum VeLiveVideoRotation {
@@ -6,4 +6,5 @@ export declare class VeLivePushHelper {
6
6
  static setVeLivePusher(pusher: VeLivePusher, viewId: string): void;
7
7
  static removeVeLivePusher(viewId: string): void;
8
8
  static getResourcePath(subPath: string): string;
9
+ static startWithConfiguration(cfg: any): void;
9
10
  }
@@ -3257,6 +3257,7 @@ var VeLivePushHelper = function () {
3257
3257
  var _static_setVeLivePusher_decorators;
3258
3258
  var _static_removeVeLivePusher_decorators;
3259
3259
  var _static_getResourcePath_decorators;
3260
+ var _static_startWithConfiguration_decorators;
3260
3261
  var VeLivePushHelper = _classThis = /** @class */ (function () {
3261
3262
  function VeLivePushHelper_1() {
3262
3263
  }
@@ -3280,6 +3281,9 @@ var VeLivePushHelper = function () {
3280
3281
  VeLivePushHelper_1.getResourcePath = function (subPath) {
3281
3282
  throw new Error('');
3282
3283
  };
3284
+ VeLivePushHelper_1.startWithConfiguration = function (cfg) {
3285
+ //
3286
+ };
3283
3287
  return VeLivePushHelper_1;
3284
3288
  }());
3285
3289
  __setFunctionName(_classThis, "VeLivePushHelper");
@@ -3288,9 +3292,11 @@ var VeLivePushHelper = function () {
3288
3292
  _static_setVeLivePusher_decorators = [NativeStaticMethodSync('setVeLivePusher:forKey:')];
3289
3293
  _static_removeVeLivePusher_decorators = [NativeStaticMethodSync('removeVeLivePusher:')];
3290
3294
  _static_getResourcePath_decorators = [NativeStaticMethodSync('getResourcePath:')];
3295
+ _static_startWithConfiguration_decorators = [NativeStaticMethodSync('startWithConfiguration:')];
3291
3296
  __esDecorate(_classThis, null, _static_setVeLivePusher_decorators, { kind: "method", name: "setVeLivePusher", static: true, private: false, access: { has: function (obj) { return "setVeLivePusher" in obj; }, get: function (obj) { return obj.setVeLivePusher; } }, metadata: _metadata }, null, _staticExtraInitializers);
3292
3297
  __esDecorate(_classThis, null, _static_removeVeLivePusher_decorators, { kind: "method", name: "removeVeLivePusher", static: true, private: false, access: { has: function (obj) { return "removeVeLivePusher" in obj; }, get: function (obj) { return obj.removeVeLivePusher; } }, metadata: _metadata }, null, _staticExtraInitializers);
3293
3298
  __esDecorate(_classThis, null, _static_getResourcePath_decorators, { kind: "method", name: "getResourcePath", static: true, private: false, access: { has: function (obj) { return "getResourcePath" in obj; }, get: function (obj) { return obj.getResourcePath; } }, metadata: _metadata }, null, _staticExtraInitializers);
3299
+ __esDecorate(_classThis, null, _static_startWithConfiguration_decorators, { kind: "method", name: "startWithConfiguration", static: true, private: false, access: { has: function (obj) { return "startWithConfiguration" in obj; }, get: function (obj) { return obj.startWithConfiguration; } }, metadata: _metadata }, null, _staticExtraInitializers);
3294
3300
  __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
3295
3301
  VeLivePushHelper = _classThis = _classDescriptor.value;
3296
3302
  if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
@@ -4528,7 +4534,7 @@ var VeLiveVideoCaptureType$2;
4528
4534
  * @brief Capture the video with dual cameras.
4529
4535
  *
4530
4536
  */
4531
- VeLiveVideoCaptureType[VeLiveVideoCaptureType["VeLiveVideoCaptureDualCamera"] = 2] = "VeLiveVideoCaptureDualCamera";
4537
+ // VeLiveVideoCaptureDualCamera = 2,
4532
4538
  /** {zh}
4533
4539
  * @brief 使用屏幕采集。
4534
4540
  *
@@ -4537,7 +4543,7 @@ var VeLiveVideoCaptureType$2;
4537
4543
  * @brief Capture the screen.
4538
4544
  *
4539
4545
  */
4540
- VeLiveVideoCaptureType[VeLiveVideoCaptureType["VeLiveVideoCaptureScreen"] = 3] = "VeLiveVideoCaptureScreen";
4546
+ VeLiveVideoCaptureType[VeLiveVideoCaptureType["VeLiveVideoCaptureScreen"] = 2] = "VeLiveVideoCaptureScreen";
4541
4547
  /** {zh}
4542
4548
  * @brief 使用外部设备或源进行视频采集。
4543
4549
  *
@@ -4546,7 +4552,7 @@ var VeLiveVideoCaptureType$2;
4546
4552
  * @brief Capture the video with an external device or source.
4547
4553
  *
4548
4554
  */
4549
- VeLiveVideoCaptureType[VeLiveVideoCaptureType["VeLiveVideoCaptureExternal"] = 4] = "VeLiveVideoCaptureExternal";
4555
+ VeLiveVideoCaptureType[VeLiveVideoCaptureType["VeLiveVideoCaptureExternal"] = 3] = "VeLiveVideoCaptureExternal";
4550
4556
  /** {zh}
4551
4557
  * @brief 使用指定的静态图片作为视频源。
4552
4558
  *
@@ -4555,7 +4561,7 @@ var VeLiveVideoCaptureType$2;
4555
4561
  * @brief Use a static image as the video source.
4556
4562
  *
4557
4563
  */
4558
- VeLiveVideoCaptureType[VeLiveVideoCaptureType["VeLiveVideoCaptureCustomImage"] = 5] = "VeLiveVideoCaptureCustomImage";
4564
+ VeLiveVideoCaptureType[VeLiveVideoCaptureType["VeLiveVideoCaptureCustomImage"] = 4] = "VeLiveVideoCaptureCustomImage";
4559
4565
  /** {zh}
4560
4566
  * @brief 使用最近采集的一帧图像重复作为视频源。
4561
4567
  *
@@ -4564,7 +4570,7 @@ var VeLiveVideoCaptureType$2;
4564
4570
  * @brief Use the last frame as the video source.
4565
4571
  *
4566
4572
  */
4567
- VeLiveVideoCaptureType[VeLiveVideoCaptureType["VeLiveVideoCaptureLastFrame"] = 6] = "VeLiveVideoCaptureLastFrame";
4573
+ VeLiveVideoCaptureType[VeLiveVideoCaptureType["VeLiveVideoCaptureLastFrame"] = 5] = "VeLiveVideoCaptureLastFrame";
4568
4574
  /** {zh}
4569
4575
  * @brief 使用黑色帧作为视频源,一般用于调试或特殊需求。
4570
4576
  *
@@ -4573,7 +4579,7 @@ var VeLiveVideoCaptureType$2;
4573
4579
  * @brief Use a black frame as the video source. This is usually used for debugging purposes or in special circumstances.
4574
4580
  *
4575
4581
  */
4576
- VeLiveVideoCaptureType[VeLiveVideoCaptureType["VeLiveVideoCaptureDummyFrame"] = 7] = "VeLiveVideoCaptureDummyFrame";
4582
+ VeLiveVideoCaptureType[VeLiveVideoCaptureType["VeLiveVideoCaptureDummyFrame"] = 6] = "VeLiveVideoCaptureDummyFrame";
4577
4583
  })(VeLiveVideoCaptureType$2 || (VeLiveVideoCaptureType$2 = {}));
4578
4584
  var VeLiveVideoProfile;
4579
4585
  (function (VeLiveVideoProfile) {
@@ -15831,7 +15837,7 @@ var VeLiveVideoCaptureType;
15831
15837
  * @brief Capture the video with dual cameras.
15832
15838
  *
15833
15839
  */
15834
- VeLiveVideoCaptureType[VeLiveVideoCaptureType["VeLiveVideoCaptureDualCamera"] = 2] = "VeLiveVideoCaptureDualCamera";
15840
+ // VeLiveVideoCaptureDualCamera = 2,
15835
15841
  /** {zh}
15836
15842
  * @platform android
15837
15843
  * @brief 使用屏幕采集。
@@ -15842,7 +15848,7 @@ var VeLiveVideoCaptureType;
15842
15848
  * @brief Capture the screen.
15843
15849
  *
15844
15850
  */
15845
- VeLiveVideoCaptureType[VeLiveVideoCaptureType["VeLiveVideoCaptureScreen"] = 3] = "VeLiveVideoCaptureScreen";
15851
+ VeLiveVideoCaptureType[VeLiveVideoCaptureType["VeLiveVideoCaptureScreen"] = 2] = "VeLiveVideoCaptureScreen";
15846
15852
  /** {zh}
15847
15853
  * @brief 使用外部设备或源进行视频采集。
15848
15854
  *
@@ -15851,7 +15857,7 @@ var VeLiveVideoCaptureType;
15851
15857
  * @brief Capture the video with an external device or source.
15852
15858
  *
15853
15859
  */
15854
- VeLiveVideoCaptureType[VeLiveVideoCaptureType["VeLiveVideoCaptureExternal"] = 4] = "VeLiveVideoCaptureExternal";
15860
+ VeLiveVideoCaptureType[VeLiveVideoCaptureType["VeLiveVideoCaptureExternal"] = 3] = "VeLiveVideoCaptureExternal";
15855
15861
  /** {zh}
15856
15862
  * @brief 使用指定的静态图片作为视频源。
15857
15863
  *
@@ -15860,7 +15866,7 @@ var VeLiveVideoCaptureType;
15860
15866
  * @brief Use a static image as the video source.
15861
15867
  *
15862
15868
  */
15863
- VeLiveVideoCaptureType[VeLiveVideoCaptureType["VeLiveVideoCaptureCustomImage"] = 5] = "VeLiveVideoCaptureCustomImage";
15869
+ VeLiveVideoCaptureType[VeLiveVideoCaptureType["VeLiveVideoCaptureCustomImage"] = 4] = "VeLiveVideoCaptureCustomImage";
15864
15870
  /** {zh}
15865
15871
  * @brief 使用最近采集的一帧图像重复作为视频源。
15866
15872
  *
@@ -15869,7 +15875,7 @@ var VeLiveVideoCaptureType;
15869
15875
  * @brief Use the last frame as the video source.
15870
15876
  *
15871
15877
  */
15872
- VeLiveVideoCaptureType[VeLiveVideoCaptureType["VeLiveVideoCaptureLastFrame"] = 6] = "VeLiveVideoCaptureLastFrame";
15878
+ VeLiveVideoCaptureType[VeLiveVideoCaptureType["VeLiveVideoCaptureLastFrame"] = 5] = "VeLiveVideoCaptureLastFrame";
15873
15879
  /** {zh}
15874
15880
  * @brief 使用黑色帧作为视频源,一般用于调试或特殊需求。
15875
15881
  *
@@ -15878,7 +15884,7 @@ var VeLiveVideoCaptureType;
15878
15884
  * @brief Use a black frame as the video source. This is usually used for debugging purposes or in special circumstances.
15879
15885
  *
15880
15886
  */
15881
- VeLiveVideoCaptureType[VeLiveVideoCaptureType["VeLiveVideoCaptureDummyFrame"] = 7] = "VeLiveVideoCaptureDummyFrame";
15887
+ VeLiveVideoCaptureType[VeLiveVideoCaptureType["VeLiveVideoCaptureDummyFrame"] = 6] = "VeLiveVideoCaptureDummyFrame";
15882
15888
  })(VeLiveVideoCaptureType || (VeLiveVideoCaptureType = {}));
15883
15889
  /** {zh}
15884
15890
  * @detail keytype
@@ -20478,7 +20484,7 @@ var t_VeLiveVideoCaptureType = /** @class */ (function () {
20478
20484
  var $m = (_a = {},
20479
20485
  _a[VeLiveVideoCaptureType.VeLiveVideoCaptureFrontCamera] = VeLiveVideoCaptureType$2.VeLiveVideoCaptureFrontCamera,
20480
20486
  _a[VeLiveVideoCaptureType.VeLiveVideoCaptureBackCamera] = VeLiveVideoCaptureType$2.VeLiveVideoCaptureBackCamera,
20481
- _a[VeLiveVideoCaptureType.VeLiveVideoCaptureDualCamera] = VeLiveVideoCaptureType$2.VeLiveVideoCaptureDualCamera,
20487
+ // [VeLiveVideoCaptureType.VeLiveVideoCaptureDualCamera]: $p_a.VeLiveVideoCaptureType.VeLiveVideoCaptureDualCamera,
20482
20488
  _a[VeLiveVideoCaptureType.VeLiveVideoCaptureScreen] = VeLiveVideoCaptureType$2.VeLiveVideoCaptureScreen,
20483
20489
  _a[VeLiveVideoCaptureType.VeLiveVideoCaptureExternal] = VeLiveVideoCaptureType$2.VeLiveVideoCaptureExternal,
20484
20490
  _a[VeLiveVideoCaptureType.VeLiveVideoCaptureCustomImage] = VeLiveVideoCaptureType$2.VeLiveVideoCaptureCustomImage,
@@ -20496,7 +20502,7 @@ var t_VeLiveVideoCaptureType = /** @class */ (function () {
20496
20502
  var $m = (_a = {},
20497
20503
  _a[VeLiveVideoCaptureType$2.VeLiveVideoCaptureFrontCamera] = VeLiveVideoCaptureType.VeLiveVideoCaptureFrontCamera,
20498
20504
  _a[VeLiveVideoCaptureType$2.VeLiveVideoCaptureBackCamera] = VeLiveVideoCaptureType.VeLiveVideoCaptureBackCamera,
20499
- _a[VeLiveVideoCaptureType$2.VeLiveVideoCaptureDualCamera] = VeLiveVideoCaptureType.VeLiveVideoCaptureDualCamera,
20505
+ // [$p_a.VeLiveVideoCaptureType.VeLiveVideoCaptureDualCamera]: VeLiveVideoCaptureType.VeLiveVideoCaptureDualCamera,
20500
20506
  _a[VeLiveVideoCaptureType$2.VeLiveVideoCaptureScreen] = VeLiveVideoCaptureType.VeLiveVideoCaptureScreen,
20501
20507
  _a[VeLiveVideoCaptureType$2.VeLiveVideoCaptureExternal] = VeLiveVideoCaptureType.VeLiveVideoCaptureExternal,
20502
20508
  _a[VeLiveVideoCaptureType$2.VeLiveVideoCaptureCustomImage] = VeLiveVideoCaptureType.VeLiveVideoCaptureCustomImage,
@@ -20514,7 +20520,7 @@ var t_VeLiveVideoCaptureType = /** @class */ (function () {
20514
20520
  var $m = (_a = {},
20515
20521
  _a[VeLiveVideoCaptureType.VeLiveVideoCaptureFrontCamera] = VeLiveVideoCaptureType$1.VeLiveVideoCaptureFrontCamera,
20516
20522
  _a[VeLiveVideoCaptureType.VeLiveVideoCaptureBackCamera] = VeLiveVideoCaptureType$1.VeLiveVideoCaptureBackCamera,
20517
- _a[VeLiveVideoCaptureType.VeLiveVideoCaptureDualCamera] = VeLiveVideoCaptureType$1.VeLiveVideoCaptureDualCamera,
20523
+ // [VeLiveVideoCaptureType.VeLiveVideoCaptureDualCamera]: $p_i.VeLiveVideoCaptureType.VeLiveVideoCaptureDualCamera,
20518
20524
  _a[VeLiveVideoCaptureType.VeLiveVideoCaptureExternal] = VeLiveVideoCaptureType$1.VeLiveVideoCaptureExternal,
20519
20525
  _a[VeLiveVideoCaptureType.VeLiveVideoCaptureCustomImage] = VeLiveVideoCaptureType$1.VeLiveVideoCaptureCustomImage,
20520
20526
  _a[VeLiveVideoCaptureType.VeLiveVideoCaptureLastFrame] = VeLiveVideoCaptureType$1.VeLiveVideoCaptureLastFrame,
@@ -20531,7 +20537,7 @@ var t_VeLiveVideoCaptureType = /** @class */ (function () {
20531
20537
  var $m = (_a = {},
20532
20538
  _a[VeLiveVideoCaptureType$1.VeLiveVideoCaptureFrontCamera] = VeLiveVideoCaptureType.VeLiveVideoCaptureFrontCamera,
20533
20539
  _a[VeLiveVideoCaptureType$1.VeLiveVideoCaptureBackCamera] = VeLiveVideoCaptureType.VeLiveVideoCaptureBackCamera,
20534
- _a[VeLiveVideoCaptureType$1.VeLiveVideoCaptureDualCamera] = VeLiveVideoCaptureType.VeLiveVideoCaptureDualCamera,
20540
+ // [$p_i.VeLiveVideoCaptureType.VeLiveVideoCaptureDualCamera]: VeLiveVideoCaptureType.VeLiveVideoCaptureDualCamera,
20535
20541
  _a[VeLiveVideoCaptureType$1.VeLiveVideoCaptureExternal] = VeLiveVideoCaptureType.VeLiveVideoCaptureExternal,
20536
20542
  _a[VeLiveVideoCaptureType$1.VeLiveVideoCaptureCustomImage] = VeLiveVideoCaptureType.VeLiveVideoCaptureCustomImage,
20537
20543
  _a[VeLiveVideoCaptureType$1.VeLiveVideoCaptureLastFrame] = VeLiveVideoCaptureType.VeLiveVideoCaptureLastFrame,
@@ -26499,6 +26505,34 @@ var Env = function () {
26499
26505
  })();
26500
26506
  return _classThis;
26501
26507
  }();
26508
+ var EnvHelper = function () {
26509
+ var _classDecorators = [NativeClass('com.volcengine.velive.rn.push.EnvHelper')];
26510
+ var _classDescriptor;
26511
+ var _classExtraInitializers = [];
26512
+ var _classThis;
26513
+ var _staticExtraInitializers = [];
26514
+ var _static_init_decorators;
26515
+ _classThis = /** @class */ (function () {
26516
+ function EnvHelper_1() {
26517
+ }
26518
+ EnvHelper_1.init = function (cfg, logHeaders) {
26519
+ throw new Error('');
26520
+ };
26521
+ return EnvHelper_1;
26522
+ }());
26523
+ __setFunctionName(_classThis, "EnvHelper");
26524
+ (function () {
26525
+ var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
26526
+ _static_init_decorators = [NativeStaticMethodSync()];
26527
+ __esDecorate(_classThis, null, _static_init_decorators, { kind: "method", name: "init", static: true, private: false, access: { has: function (obj) { return "init" in obj; }, get: function (obj) { return obj.init; } }, metadata: _metadata }, null, _staticExtraInitializers);
26528
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
26529
+ _classThis = _classDescriptor.value;
26530
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
26531
+ __runInitializers(_classThis, _staticExtraInitializers);
26532
+ __runInitializers(_classThis, _classExtraInitializers);
26533
+ })();
26534
+ return _classThis;
26535
+ }();
26502
26536
  var ConfigBuilder = function () {
26503
26537
  var _classDecorators = [NativeClass('com.pandora.common.env.config.Config$Builder')];
26504
26538
  var _classDescriptor;
@@ -26575,6 +26609,69 @@ var Config = /** @class */ (function () {
26575
26609
  return Config;
26576
26610
  }());
26577
26611
 
26612
+ function initAndroidEnv(config) {
26613
+ return __awaiter(this, void 0, void 0, function () {
26614
+ var builder, context, androidEnv;
26615
+ return __generator(this, function (_a) {
26616
+ switch (_a.label) {
26617
+ case 0:
26618
+ builder = new Config.Builder();
26619
+ return [4 /*yield*/, NativeVariables.getApplicationContext()];
26620
+ case 1:
26621
+ context = _a.sent();
26622
+ builder
26623
+ .setApplicationContext(context)
26624
+ .setAppID(config.AppID)
26625
+ .setAppName(config.AppName)
26626
+ .setAppVersion(config.AppVersion) // 合法版本号应大于、等于 2 个分隔符,如:"1.3.2"
26627
+ .setAppChannel(config.AppChannel)
26628
+ .setLicenseUri(config.LicenseUri.android);
26629
+ androidEnv = builder.build();
26630
+ EnvHelper.init(androidEnv, {
26631
+ hybrid_ua: "rn|push|".concat("1.4.0"),
26632
+ });
26633
+ Env.openAppLog(config.openLog);
26634
+ TTNetManager.initTTNet(context);
26635
+ return [2 /*return*/];
26636
+ }
26637
+ });
26638
+ });
26639
+ }
26640
+ function initIOSEnv(config) {
26641
+ return __awaiter(this, void 0, void 0, function () {
26642
+ return __generator(this, function (_a) {
26643
+ VeLivePushHelper.startWithConfiguration(__assign(__assign({}, config), { LicenseUri: config.LicenseUri.ios, appLogAid: '500808' , hybrid_ua: "rn|push|".concat("1.4.0") }));
26644
+ return [2 /*return*/];
26645
+ });
26646
+ });
26647
+ }
26648
+ var hasInitEnv = false;
26649
+ function initEnv(config) {
26650
+ return __awaiter(this, void 0, void 0, function () {
26651
+ var mergedConfig;
26652
+ return __generator(this, function (_a) {
26653
+ if (hasInitEnv) {
26654
+ return [2 /*return*/];
26655
+ }
26656
+ mergedConfig = Object.assign({
26657
+ openLog: true,
26658
+ }, config);
26659
+ switch (Platform.OS) {
26660
+ case 'android':
26661
+ initAndroidEnv(mergedConfig);
26662
+ break;
26663
+ case 'ios':
26664
+ initIOSEnv(mergedConfig);
26665
+ break;
26666
+ default:
26667
+ throw new Error('Unsupported platform');
26668
+ }
26669
+ hasInitEnv = true;
26670
+ return [2 /*return*/];
26671
+ });
26672
+ });
26673
+ }
26674
+
26578
26675
  var IosUIView = function () {
26579
26676
  var _a;
26580
26677
  var _classSuper = NativeView;
@@ -26638,7 +26735,7 @@ var IosUIView = function () {
26638
26735
  // export class TVLPlayerItem extends TVLManager {
26639
26736
  // //
26640
26737
  // }
26641
- var TTSDKLogConfiguration = function () {
26738
+ (function () {
26642
26739
  var _classDecorators = [NativeClass('TTSDKLogConfiguration')];
26643
26740
  var _classDescriptor;
26644
26741
  var _classExtraInitializers = [];
@@ -26678,8 +26775,8 @@ var TTSDKLogConfiguration = function () {
26678
26775
  __runInitializers(_classThis, _classExtraInitializers);
26679
26776
  })();
26680
26777
  return _classThis;
26681
- }();
26682
- var TTSDKConfiguration = function () {
26778
+ })();
26779
+ (function () {
26683
26780
  var _classDecorators = [NativeClass('TTSDKConfiguration')];
26684
26781
  var _classDescriptor;
26685
26782
  var _classExtraInitializers = [];
@@ -26755,8 +26852,8 @@ var TTSDKConfiguration = function () {
26755
26852
  __runInitializers(_classThis, _classExtraInitializers);
26756
26853
  })();
26757
26854
  return TTSDKConfiguration = _classThis;
26758
- }();
26759
- var TTSDKManager = function () {
26855
+ })();
26856
+ (function () {
26760
26857
  var _classDecorators = [NativeClass('TTSDKManager')];
26761
26858
  var _classDescriptor;
26762
26859
  var _classExtraInitializers = [];
@@ -26801,7 +26898,7 @@ var TTSDKManager = function () {
26801
26898
  __runInitializers(_classThis, _classExtraInitializers);
26802
26899
  })();
26803
26900
  return _classThis;
26804
- }();
26901
+ })();
26805
26902
  (function () {
26806
26903
  var _classDecorators = [NativeClass('VeLivePlayerConfiguration')];
26807
26904
  var _classDescriptor;
@@ -26846,83 +26943,6 @@ var TTSDKServiceVendor;
26846
26943
  TTSDKServiceVendor[TTSDKServiceVendor["TTSDKServiceVendorCN"] = 1] = "TTSDKServiceVendorCN";
26847
26944
  })(TTSDKServiceVendor || (TTSDKServiceVendor = {}));
26848
26945
 
26849
- function initAndroidEnv(config) {
26850
- return __awaiter(this, void 0, void 0, function () {
26851
- var builder, context, androidEnv;
26852
- return __generator(this, function (_a) {
26853
- switch (_a.label) {
26854
- case 0:
26855
- builder = new Config.Builder();
26856
- return [4 /*yield*/, NativeVariables.getApplicationContext()];
26857
- case 1:
26858
- context = _a.sent();
26859
- builder
26860
- .setApplicationContext(context)
26861
- .setAppID(config.AppID)
26862
- .setAppName(config.AppName)
26863
- .setAppVersion(config.AppVersion) // 合法版本号应大于、等于 2 个分隔符,如:"1.3.2"
26864
- .setAppChannel(config.AppChannel)
26865
- .setLicenseUri(config.LicenseUri.android);
26866
- androidEnv = builder.build();
26867
- Env.init(androidEnv);
26868
- Env.openAppLog(config.openLog);
26869
- TTNetManager.initTTNet(context);
26870
- return [2 /*return*/];
26871
- }
26872
- });
26873
- });
26874
- }
26875
- function initIOSEnv(config) {
26876
- return __awaiter(this, void 0, void 0, function () {
26877
- var logCfg, cfg;
26878
- var _a;
26879
- return __generator(this, function (_b) {
26880
- logCfg = new TTSDKLogConfiguration();
26881
- logCfg.enableConsole = true;
26882
- logCfg.enableLogFile = true;
26883
- logCfg.enable = true;
26884
- cfg = TTSDKConfiguration.defaultConfigurationWithAppID(config.AppID, config.LicenseUri.ios);
26885
- cfg.channel = config.AppChannel;
26886
- cfg.appName = config.AppName;
26887
- cfg.appVersion = config.AppVersion;
26888
- cfg.shouldInitAppLog = (_a = config.openLog) !== null && _a !== void 0 ? _a : true;
26889
- cfg.logConfiguration = logCfg;
26890
- TTSDKManager.setShouldReportToAppLog(true);
26891
- if (config.UserUniqueID) {
26892
- TTSDKManager.setCurrentUserUniqueID(config.UserUniqueID);
26893
- }
26894
- TTSDKManager.startWithConfiguration(cfg);
26895
- return [2 /*return*/];
26896
- });
26897
- });
26898
- }
26899
- var hasInitEnv = false;
26900
- function initEnv(config) {
26901
- return __awaiter(this, void 0, void 0, function () {
26902
- var mergedConfig;
26903
- return __generator(this, function (_a) {
26904
- if (hasInitEnv) {
26905
- return [2 /*return*/];
26906
- }
26907
- mergedConfig = Object.assign({
26908
- openLog: true,
26909
- }, config);
26910
- switch (Platform.OS) {
26911
- case 'android':
26912
- initAndroidEnv(mergedConfig);
26913
- break;
26914
- case 'ios':
26915
- initIOSEnv(mergedConfig);
26916
- break;
26917
- default:
26918
- throw new Error('Unsupported platform');
26919
- }
26920
- hasInitEnv = true;
26921
- return [2 /*return*/];
26922
- });
26923
- });
26924
- }
26925
-
26926
26946
  var defaultConfig = {};
26927
26947
  function initAndroidPusher(options) {
26928
26948
  return __awaiter(this, void 0, void 0, function () {
@@ -29,6 +29,9 @@ export declare class Env {
29
29
  static openAppLog(cfg: any): void;
30
30
  static getApplicationContext(): ApplicationContext;
31
31
  }
32
+ export declare class EnvHelper {
33
+ static init(cfg: any, logHeaders: any): void;
34
+ }
32
35
  declare class ConfigBuilder {
33
36
  setApplicationContext(appContext: ApplicationContext): ConfigBuilder;
34
37
  setAppID(appId: string): ConfigBuilder;
@@ -566,37 +566,36 @@ export declare enum VeLiveVideoCaptureType {
566
566
  * @brief Capture the video with dual cameras.
567
567
  *
568
568
  */
569
- VeLiveVideoCaptureDualCamera = 2,
570
569
 
571
570
  /** {en}
572
571
  * @brief Capture the screen.
573
572
  *
574
573
  */
575
- VeLiveVideoCaptureScreen = 3,
574
+ VeLiveVideoCaptureScreen = 2,
576
575
 
577
576
  /** {en}
578
577
  * @brief Capture the video with an external device or source.
579
578
  *
580
579
  */
581
- VeLiveVideoCaptureExternal = 4,
580
+ VeLiveVideoCaptureExternal = 3,
582
581
 
583
582
  /** {en}
584
583
  * @brief Use a static image as the video source.
585
584
  *
586
585
  */
587
- VeLiveVideoCaptureCustomImage = 5,
586
+ VeLiveVideoCaptureCustomImage = 4,
588
587
 
589
588
  /** {en}
590
589
  * @brief Use the last frame as the video source.
591
590
  *
592
591
  */
593
- VeLiveVideoCaptureLastFrame = 6,
592
+ VeLiveVideoCaptureLastFrame = 5,
594
593
 
595
594
  /** {en}
596
595
  * @brief Use a black frame as the video source. This is usually used for debugging purposes or in special circumstances.
597
596
  *
598
597
  */
599
- VeLiveVideoCaptureDummyFrame = 7
598
+ VeLiveVideoCaptureDummyFrame = 6
600
599
  }
601
600
  export declare enum VeLiveVideoProfile {
602
601
 
@@ -221,38 +221,37 @@ export declare enum VeLiveVideoCaptureType {
221
221
  * @brief Capture the video with dual cameras.
222
222
  *
223
223
  */
224
- VeLiveVideoCaptureDualCamera = 2,
225
224
 
226
225
  /** {en}
227
226
  * @platform android
228
227
  * @brief Capture the screen.
229
228
  *
230
229
  */
231
- VeLiveVideoCaptureScreen = 3,
230
+ VeLiveVideoCaptureScreen = 2,
232
231
 
233
232
  /** {en}
234
233
  * @brief Capture the video with an external device or source.
235
234
  *
236
235
  */
237
- VeLiveVideoCaptureExternal = 4,
236
+ VeLiveVideoCaptureExternal = 3,
238
237
 
239
238
  /** {en}
240
239
  * @brief Use a static image as the video source.
241
240
  *
242
241
  */
243
- VeLiveVideoCaptureCustomImage = 5,
242
+ VeLiveVideoCaptureCustomImage = 4,
244
243
 
245
244
  /** {en}
246
245
  * @brief Use the last frame as the video source.
247
246
  *
248
247
  */
249
- VeLiveVideoCaptureLastFrame = 6,
248
+ VeLiveVideoCaptureLastFrame = 5,
250
249
 
251
250
  /** {en}
252
251
  * @brief Use a black frame as the video source. This is usually used for debugging purposes or in special circumstances.
253
252
  *
254
253
  */
255
- VeLiveVideoCaptureDummyFrame = 7
254
+ VeLiveVideoCaptureDummyFrame = 6
256
255
  }
257
256
 
258
257
  export declare enum VeLiveVideoRotation {
@@ -6,4 +6,5 @@ export declare class VeLivePushHelper {
6
6
  static setVeLivePusher(pusher: VeLivePusher, viewId: string): void;
7
7
  static removeVeLivePusher(viewId: string): void;
8
8
  static getResourcePath(subPath: string): string;
9
+ static startWithConfiguration(cfg: any): void;
9
10
  }
@@ -29,6 +29,9 @@ export declare class Env {
29
29
  static openAppLog(cfg: any): void;
30
30
  static getApplicationContext(): ApplicationContext;
31
31
  }
32
+ export declare class EnvHelper {
33
+ static init(cfg: any, logHeaders: any): void;
34
+ }
32
35
  declare class ConfigBuilder {
33
36
  setApplicationContext(appContext: ApplicationContext): ConfigBuilder;
34
37
  setAppID(appId: string): ConfigBuilder;
@@ -566,37 +566,36 @@ export declare enum VeLiveVideoCaptureType {
566
566
  * @brief Capture the video with dual cameras.
567
567
  *
568
568
  */
569
- VeLiveVideoCaptureDualCamera = 2,
570
569
 
571
570
  /** {en}
572
571
  * @brief Capture the screen.
573
572
  *
574
573
  */
575
- VeLiveVideoCaptureScreen = 3,
574
+ VeLiveVideoCaptureScreen = 2,
576
575
 
577
576
  /** {en}
578
577
  * @brief Capture the video with an external device or source.
579
578
  *
580
579
  */
581
- VeLiveVideoCaptureExternal = 4,
580
+ VeLiveVideoCaptureExternal = 3,
582
581
 
583
582
  /** {en}
584
583
  * @brief Use a static image as the video source.
585
584
  *
586
585
  */
587
- VeLiveVideoCaptureCustomImage = 5,
586
+ VeLiveVideoCaptureCustomImage = 4,
588
587
 
589
588
  /** {en}
590
589
  * @brief Use the last frame as the video source.
591
590
  *
592
591
  */
593
- VeLiveVideoCaptureLastFrame = 6,
592
+ VeLiveVideoCaptureLastFrame = 5,
594
593
 
595
594
  /** {en}
596
595
  * @brief Use a black frame as the video source. This is usually used for debugging purposes or in special circumstances.
597
596
  *
598
597
  */
599
- VeLiveVideoCaptureDummyFrame = 7
598
+ VeLiveVideoCaptureDummyFrame = 6
600
599
  }
601
600
  export declare enum VeLiveVideoProfile {
602
601
 
@@ -221,38 +221,37 @@ export declare enum VeLiveVideoCaptureType {
221
221
  * @brief Capture the video with dual cameras.
222
222
  *
223
223
  */
224
- VeLiveVideoCaptureDualCamera = 2,
225
224
 
226
225
  /** {en}
227
226
  * @platform android
228
227
  * @brief Capture the screen.
229
228
  *
230
229
  */
231
- VeLiveVideoCaptureScreen = 3,
230
+ VeLiveVideoCaptureScreen = 2,
232
231
 
233
232
  /** {en}
234
233
  * @brief Capture the video with an external device or source.
235
234
  *
236
235
  */
237
- VeLiveVideoCaptureExternal = 4,
236
+ VeLiveVideoCaptureExternal = 3,
238
237
 
239
238
  /** {en}
240
239
  * @brief Use a static image as the video source.
241
240
  *
242
241
  */
243
- VeLiveVideoCaptureCustomImage = 5,
242
+ VeLiveVideoCaptureCustomImage = 4,
244
243
 
245
244
  /** {en}
246
245
  * @brief Use the last frame as the video source.
247
246
  *
248
247
  */
249
- VeLiveVideoCaptureLastFrame = 6,
248
+ VeLiveVideoCaptureLastFrame = 5,
250
249
 
251
250
  /** {en}
252
251
  * @brief Use a black frame as the video source. This is usually used for debugging purposes or in special circumstances.
253
252
  *
254
253
  */
255
- VeLiveVideoCaptureDummyFrame = 7
254
+ VeLiveVideoCaptureDummyFrame = 6
256
255
  }
257
256
 
258
257
  export declare enum VeLiveVideoRotation {
@@ -6,4 +6,5 @@ export declare class VeLivePushHelper {
6
6
  static setVeLivePusher(pusher: VeLivePusher, viewId: string): void;
7
7
  static removeVeLivePusher(viewId: string): void;
8
8
  static getResourcePath(subPath: string): string;
9
+ static startWithConfiguration(cfg: any): void;
9
10
  }