@byteplus/react-native-live-push 1.4.0 → 1.5.1-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.
Files changed (36) hide show
  1. package/android/build.gradle +15 -3
  2. package/android/src/main/java/com/volcengine/velive/rn/push/EnvHelper.java +1 -1
  3. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushImpl.java +73 -0
  4. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushPackage.java +36 -11
  5. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushView.java +1 -0
  6. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/TextureMgr.java +1 -1
  7. package/android/src/newarch/com/volcengine/velive/rn/push/VeLivePushModule.java +92 -0
  8. package/android/src/{main/java → oldarch}/com/volcengine/velive/rn/push/VeLivePushModule.java +12 -48
  9. package/ios/RCTVeLivePush/RCTVeLivePush.h +22 -0
  10. package/ios/RCTVeLivePush/RCTVeLivePush.mm +141 -0
  11. package/ios/VeLivePushImpl.h +38 -0
  12. package/ios/VeLivePushImpl.m +51 -0
  13. package/lib/commonjs/index.js +462 -256
  14. package/lib/commonjs/typescript/index.d.ts +1 -0
  15. package/lib/commonjs/typescript/module.d.ts +4 -0
  16. package/lib/commonjs/typescript/platforms/TurboModule/NativeVeLivePush.d.ts +193 -0
  17. package/lib/commonjs/typescript/platforms/TurboModule/index.d.ts +1 -0
  18. package/lib/commonjs/typescript/utils/index.d.ts +1 -0
  19. package/lib/module/index.js +486 -282
  20. package/lib/module/typescript/index.d.ts +1 -0
  21. package/lib/module/typescript/module.d.ts +4 -0
  22. package/lib/module/typescript/platforms/TurboModule/NativeVeLivePush.d.ts +193 -0
  23. package/lib/module/typescript/platforms/TurboModule/index.d.ts +1 -0
  24. package/lib/module/typescript/utils/index.d.ts +1 -0
  25. package/lib/typescript/index.d.ts +1 -0
  26. package/lib/typescript/module.d.ts +4 -0
  27. package/lib/typescript/platforms/TurboModule/NativeVeLivePush.d.ts +193 -0
  28. package/lib/typescript/platforms/TurboModule/index.d.ts +1 -0
  29. package/lib/typescript/utils/index.d.ts +1 -0
  30. package/package.json +14 -5
  31. package/react-native-velive-push.podspec +9 -5
  32. package/src/platforms/TurboModule/NativeVeLivePush.ts +242 -0
  33. package/src/platforms/TurboModule/index.ts +1 -0
  34. package/ios/VeLivePushSDK.h +0 -24
  35. package/ios/VeLivePushSDK.m +0 -98
  36. /package/android/src/{main/java → oldarch}/com/volcengine/velive/rn/push/VeLivePushModuleSpec.java +0 -0
@@ -570,13 +570,13 @@ var CALL_TYPE$1;
570
570
  */
571
571
  CALL_TYPE["CALLBACK_EMIT"] = "callback_emit";
572
572
  })(CALL_TYPE$1 || (CALL_TYPE$1 = {}));
573
- var RETURN_STATUS$1;
573
+ var RETURN_STATUS$2;
574
574
  (function (RETURN_STATUS) {
575
575
  RETURN_STATUS["SUCCESS"] = "success";
576
576
  RETURN_STATUS["FAILED"] = "failed";
577
577
  RETURN_STATUS["NOT_IMPLEMENTED"] = "not_implemented";
578
- })(RETURN_STATUS$1 || (RETURN_STATUS$1 = {}));
579
- var INSTANCE_TYPE$1;
578
+ })(RETURN_STATUS$2 || (RETURN_STATUS$2 = {}));
579
+ var INSTANCE_TYPE$2;
580
580
  (function (INSTANCE_TYPE) {
581
581
  /**
582
582
  * 自动 GC 类型
@@ -586,7 +586,7 @@ var INSTANCE_TYPE$1;
586
586
  * 手动 GC 类型
587
587
  */
588
588
  INSTANCE_TYPE[INSTANCE_TYPE["MANUAL"] = 1] = "MANUAL";
589
- })(INSTANCE_TYPE$1 || (INSTANCE_TYPE$1 = {}));
589
+ })(INSTANCE_TYPE$2 || (INSTANCE_TYPE$2 = {}));
590
590
 
591
591
  var DefaultBridgeImpl = /** @class */ (function () {
592
592
  function DefaultBridgeImpl() {
@@ -846,7 +846,7 @@ function assertReturn(ret) {
846
846
  if (!ret || typeof ret !== 'object') {
847
847
  return;
848
848
  }
849
- if (ret.status === RETURN_STATUS$1.FAILED) {
849
+ if (ret.status === RETURN_STATUS$2.FAILED) {
850
850
  throw new Error(String(ret.msg));
851
851
  }
852
852
  return ret.decoded || ret.msg;
@@ -907,7 +907,7 @@ var getRegistry = function () {
907
907
  };
908
908
  var NativeObserverClass = function (className, opt) {
909
909
  if (opt === void 0) { opt = {
910
- instanceType: INSTANCE_TYPE$1.AUTOMATIC,
910
+ instanceType: INSTANCE_TYPE$2.AUTOMATIC,
911
911
  }; }
912
912
  return function (target, ctx) {
913
913
  ctx.addInitializer(function () {
@@ -933,7 +933,7 @@ var NativeObserverClass = function (className, opt) {
933
933
  t.instanceId = instanceId;
934
934
  t.messageClient = getMessageClient(t);
935
935
  t.options = opt;
936
- t.instanceType = opt.instanceType || INSTANCE_TYPE$1.AUTOMATIC;
936
+ t.instanceType = opt.instanceType || INSTANCE_TYPE$2.AUTOMATIC;
937
937
  (_a = getRegistry()) === null || _a === void 0 ? void 0 : _a.register(_this, "".concat(instanceId, "::").concat(className));
938
938
  // custom consume native event
939
939
  /**
@@ -977,7 +977,7 @@ var NativeObserverClass = function (className, opt) {
977
977
  };
978
978
  var NativeClass = function (className, opt) {
979
979
  if (opt === void 0) { opt = {
980
- instanceType: INSTANCE_TYPE$1.AUTOMATIC,
980
+ instanceType: INSTANCE_TYPE$2.AUTOMATIC,
981
981
  }; }
982
982
  return function (target, ctx) {
983
983
  ctx.addInitializer(function () {
@@ -1002,7 +1002,7 @@ var NativeClass = function (className, opt) {
1002
1002
  t.namespace = className;
1003
1003
  t.instanceId = instanceId;
1004
1004
  t.messageClient = getMessageClient(t);
1005
- t.instanceType = opt.instanceType || INSTANCE_TYPE$1.AUTOMATIC;
1005
+ t.instanceType = opt.instanceType || INSTANCE_TYPE$2.AUTOMATIC;
1006
1006
  (_a = getRegistry()) === null || _a === void 0 ? void 0 : _a.register(_this, "".concat(instanceId, "::").concat(className));
1007
1007
  var _init = function () {
1008
1008
  t.messageClient.sendNewInstanceCall(className, args.filter(function (v) { return v !== undefined; }), instanceId, t);
@@ -2094,7 +2094,7 @@ var MessageSenderImpl = function () {
2094
2094
  };
2095
2095
  MessageSenderImpl.prototype._resolveReturn = function (res, req) {
2096
2096
  switch (res.status) {
2097
- case RETURN_STATUS$1.SUCCESS:
2097
+ case RETURN_STATUS$2.SUCCESS:
2098
2098
  this.logger.info('[message-sender] Decode return:', res.msg);
2099
2099
  if (res.msg) {
2100
2100
  Object.defineProperty(res, 'decoded', {
@@ -2104,10 +2104,10 @@ var MessageSenderImpl = function () {
2104
2104
  });
2105
2105
  }
2106
2106
  break;
2107
- case RETURN_STATUS$1.NOT_IMPLEMENTED:
2107
+ case RETURN_STATUS$2.NOT_IMPLEMENTED:
2108
2108
  this.logger.error('[message-sender] Native method not implemented:', req);
2109
2109
  break;
2110
- case RETURN_STATUS$1.FAILED:
2110
+ case RETURN_STATUS$2.FAILED:
2111
2111
  this.logger.error('[message-sender] Decode return failed:', res);
2112
2112
  break;
2113
2113
  default:
@@ -2409,7 +2409,7 @@ var MessageClientImpl = function () {
2409
2409
  else {
2410
2410
  this.logger.debug("[message-client] Unknown event \"".concat(eventName, "\""));
2411
2411
  returnParams = {
2412
- status: RETURN_STATUS$1.NOT_IMPLEMENTED,
2412
+ status: RETURN_STATUS$2.NOT_IMPLEMENTED,
2413
2413
  msg: {},
2414
2414
  };
2415
2415
  }
@@ -2417,7 +2417,7 @@ var MessageClientImpl = function () {
2417
2417
  catch (err) {
2418
2418
  this.logger.error("[message-client] Event emit failed: ".concat(eventName), err);
2419
2419
  returnParams = {
2420
- status: RETURN_STATUS$1.FAILED,
2420
+ status: RETURN_STATUS$2.FAILED,
2421
2421
  msg: {
2422
2422
  errorMessage: (err === null || err === void 0 ? void 0 : err.message) || '',
2423
2423
  errorCode: -1,
@@ -2474,7 +2474,7 @@ var MessageClientImpl = function () {
2474
2474
  this.logger.debug('[message-client] response:', response);
2475
2475
  var encodeResponse = this.proto.encodeArg(response);
2476
2476
  var returnVal = {
2477
- status: RETURN_STATUS$1.SUCCESS,
2477
+ status: RETURN_STATUS$2.SUCCESS,
2478
2478
  msg: encodeResponse === undefined
2479
2479
  ? null
2480
2480
  : encodeResponse === null
@@ -2588,6 +2588,7 @@ var MessageProtoImpl = function () {
2588
2588
  var buf = bufferLike.buffer || bufferLike;
2589
2589
  return {
2590
2590
  _type: "base64" /* ARG_TYPE.BASE64 */,
2591
+ // @ts-ignore
2591
2592
  _value: buf2base64(buf),
2592
2593
  };
2593
2594
  };
@@ -2834,13 +2835,13 @@ var CALL_TYPE;
2834
2835
  */
2835
2836
  CALL_TYPE["CALLBACK_EMIT"] = "callback_emit";
2836
2837
  })(CALL_TYPE || (CALL_TYPE = {}));
2837
- var RETURN_STATUS;
2838
+ var RETURN_STATUS$1;
2838
2839
  (function (RETURN_STATUS) {
2839
2840
  RETURN_STATUS["SUCCESS"] = "success";
2840
2841
  RETURN_STATUS["FAILED"] = "failed";
2841
2842
  RETURN_STATUS["NOT_IMPLEMENTED"] = "not_implemented";
2842
- })(RETURN_STATUS || (RETURN_STATUS = {}));
2843
- var INSTANCE_TYPE;
2843
+ })(RETURN_STATUS$1 || (RETURN_STATUS$1 = {}));
2844
+ var INSTANCE_TYPE$1;
2844
2845
  (function (INSTANCE_TYPE) {
2845
2846
  /**
2846
2847
  * 自动 GC 类型
@@ -2850,7 +2851,7 @@ var INSTANCE_TYPE;
2850
2851
  * 手动 GC 类型
2851
2852
  */
2852
2853
  INSTANCE_TYPE[INSTANCE_TYPE["MANUAL"] = 1] = "MANUAL";
2853
- })(INSTANCE_TYPE || (INSTANCE_TYPE = {}));
2854
+ })(INSTANCE_TYPE$1 || (INSTANCE_TYPE$1 = {}));
2854
2855
 
2855
2856
  var ReactNativeBridge = /** @class */ (function () {
2856
2857
  function ReactNativeBridge(BridgeModule, NativeEventName) {
@@ -2895,7 +2896,7 @@ var ReactNativeBridge = /** @class */ (function () {
2895
2896
  return;
2896
2897
  }
2897
2898
  resolve({
2898
- status: RETURN_STATUS.SUCCESS,
2899
+ status: RETURN_STATUS$1.SUCCESS,
2899
2900
  msg: 'over timeout and auto success',
2900
2901
  });
2901
2902
  }, 1000 * 60 * 5);
@@ -2929,6 +2930,77 @@ var ReactNativeBridge = /** @class */ (function () {
2929
2930
  return ReactNativeBridge;
2930
2931
  }());
2931
2932
 
2933
+ var ReactNativeTurboBridge = /** @class */ (function () {
2934
+ function ReactNativeTurboBridge(BridgeModule, NativeEventName) {
2935
+ this.BridgeModule = BridgeModule;
2936
+ this.NativeEventName = NativeEventName;
2937
+ this._handlers = {};
2938
+ if (BridgeModule === undefined) {
2939
+ throw new Error("can't find module \"".concat(BridgeModule, "\", please enure install the module correctly"));
2940
+ }
2941
+ // this._nativeEventEmitter = new NativeEventEmitter(BridgeModule);
2942
+ this._nativeEventEmitter = new reactNative.NativeEventEmitter(BridgeModule);
2943
+ this._init();
2944
+ }
2945
+ ReactNativeTurboBridge.prototype._init = function () {
2946
+ var _this = this;
2947
+ this._nativeEventEmitter.addListener(this.NativeEventName, function (ev) {
2948
+ var _a, _b;
2949
+ try {
2950
+ var eventName = ev.event;
2951
+ var eventData = typeof ev.data === 'string' ? JSON.parse(ev.data) : ev.data;
2952
+ (_b = (_a = _this._handlers)[eventName]) === null || _b === void 0 ? void 0 : _b.call(_a, eventData);
2953
+ }
2954
+ catch (err) {
2955
+ console.error('handle native event fail:', err);
2956
+ }
2957
+ });
2958
+ };
2959
+ ReactNativeTurboBridge.prototype.call = function (params) {
2960
+ var _this = this;
2961
+ return new Promise(function (resolve, reject) {
2962
+ try {
2963
+ var resolved_1 = false;
2964
+ _this.BridgeModule.call(JSON.stringify(params), function (res) {
2965
+ var val = typeof res === 'string' ? JSON.parse(res) : res;
2966
+ resolved_1 = true;
2967
+ resolve(val);
2968
+ });
2969
+ setTimeout(function () {
2970
+ if (resolved_1) {
2971
+ return;
2972
+ }
2973
+ resolve({
2974
+ status: RETURN_STATUS$1.SUCCESS,
2975
+ msg: 'over timeout and auto success',
2976
+ });
2977
+ }, 1000 * 60 * 5);
2978
+ }
2979
+ catch (err) {
2980
+ // console.error(`<RNBridge> call native "${handlerName}()" fail`, err);
2981
+ reject(err);
2982
+ }
2983
+ });
2984
+ };
2985
+ ReactNativeTurboBridge.prototype.callSync = function (params) {
2986
+ try {
2987
+ var res = this.BridgeModule.callSync(JSON.stringify(params));
2988
+ return typeof res === 'string' ? JSON.parse(res) : res;
2989
+ }
2990
+ catch (err) {
2991
+ // console.error(`<RNBridge> call native "${handlerName}()" fail`, err);
2992
+ throw err;
2993
+ }
2994
+ };
2995
+ ReactNativeTurboBridge.prototype.registerHandler = function (handlerName, handler) {
2996
+ this._handlers[handlerName] = handler;
2997
+ };
2998
+ ReactNativeTurboBridge.prototype.registerAsyncHandler = function (handlerName, handler) {
2999
+ this._handlers[handlerName] = handler;
3000
+ };
3001
+ return ReactNativeTurboBridge;
3002
+ }());
3003
+
2932
3004
  /******************************************************************************
2933
3005
  Copyright (c) Microsoft Corporation.
2934
3006
 
@@ -2975,6 +3047,107 @@ var ReactNativeEnv = /** @class */ (function () {
2975
3047
  return ReactNativeEnv;
2976
3048
  }());
2977
3049
 
3050
+ exports.CALL_TYPE = void 0;
3051
+ (function (CALL_TYPE) {
3052
+ /**
3053
+ * 获取动态变量
3054
+ */
3055
+ CALL_TYPE["VAR_GETTER"] = "var_get";
3056
+ /**
3057
+ * 调用静态方法
3058
+ */
3059
+ CALL_TYPE["PLAIN_API_CALL"] = "plain_api_call";
3060
+ /**
3061
+ * 实例化对象
3062
+ */
3063
+ CALL_TYPE["NEW_INSTANCE"] = "new_instance";
3064
+ /**
3065
+ * 调用 api 上的方法
3066
+ */
3067
+ CALL_TYPE["INSTANCE_METHOD_INVOKE"] = "instance_method_invoke";
3068
+ /**
3069
+ * 设置属性
3070
+ */
3071
+ CALL_TYPE["INSTANCE_MEMBER_SET"] = "instance_member_set";
3072
+ /**
3073
+ * 设置属性
3074
+ */
3075
+ CALL_TYPE["INSTANCE_MEMBER_GET"] = "instance_member_get";
3076
+ /**
3077
+ * 注册回调函数
3078
+ */
3079
+ CALL_TYPE["INSTANCE_EVENT_LISTENER_ADD"] = "instance_event_add";
3080
+ /**
3081
+ * 移除回调函数
3082
+ */
3083
+ CALL_TYPE["INSTANCE_EVENT_LISTENER_REMOVE"] = "instance_event_remove";
3084
+ /**
3085
+ * 触发事件
3086
+ */
3087
+ CALL_TYPE["INSTANCE_EVENT_EMIT"] = "instance_event_emit";
3088
+ /**
3089
+ * 事件执行后的返回值
3090
+ */
3091
+ CALL_TYPE["INSTANCE_EVENT_RESULT"] = "instance_event_result";
3092
+ /**
3093
+ * 销毁实例
3094
+ */
3095
+ CALL_TYPE["DESTROY_INSTANCE"] = "destroy_instance";
3096
+ /**
3097
+ * 触发事件
3098
+ */
3099
+ CALL_TYPE["CALLBACK_EMIT"] = "callback_emit";
3100
+ })(exports.CALL_TYPE || (exports.CALL_TYPE = {}));
3101
+ var ARG_TYPE;
3102
+ (function (ARG_TYPE) {
3103
+ /**
3104
+ * 类的实例
3105
+ */
3106
+ ARG_TYPE["INSTANCE"] = "instance";
3107
+ /**
3108
+ * callback 函数
3109
+ */
3110
+ ARG_TYPE["CALLBACK"] = "callback";
3111
+ /**
3112
+ * 枚举
3113
+ */
3114
+ ARG_TYPE["ENUM"] = "enum";
3115
+ /**
3116
+ * 运行时变量
3117
+ * 比如:android 的 ApplicationContext
3118
+ */
3119
+ ARG_TYPE["VARIABLE"] = "variable";
3120
+ /**
3121
+ * 二进制数据
3122
+ */
3123
+ ARG_TYPE["BASE64"] = "base64";
3124
+ /**
3125
+ *
3126
+ */
3127
+ ARG_TYPE["IMAGE_RESOURCE"] = "image_resource";
3128
+ })(ARG_TYPE || (ARG_TYPE = {}));
3129
+ var RETURN_STATUS;
3130
+ (function (RETURN_STATUS) {
3131
+ RETURN_STATUS["SUCCESS"] = "success";
3132
+ RETURN_STATUS["FAILED"] = "failed";
3133
+ RETURN_STATUS["NOT_IMPLEMENTED"] = "not_implemented";
3134
+ })(RETURN_STATUS || (RETURN_STATUS = {}));
3135
+ var INSTANCE_TYPE;
3136
+ (function (INSTANCE_TYPE) {
3137
+ /**
3138
+ * 自动 GC 类型
3139
+ */
3140
+ INSTANCE_TYPE[INSTANCE_TYPE["AUTOMATIC"] = 0] = "AUTOMATIC";
3141
+ /**
3142
+ * 手动 GC 类型
3143
+ */
3144
+ INSTANCE_TYPE[INSTANCE_TYPE["MANUAL"] = 1] = "MANUAL";
3145
+ })(INSTANCE_TYPE || (INSTANCE_TYPE = {}));
3146
+ /**
3147
+ * 获取NativeBridgeModule实例
3148
+ */
3149
+ var NativeVeLivePush = reactNative.TurboModuleRegistry.get('VeLivePush');
3150
+
2978
3151
  /******************************************************************************
2979
3152
  Copyright (c) Microsoft Corporation.
2980
3153
 
@@ -3091,224 +3264,34 @@ function __generator(thisArg, body) {
3091
3264
  case 4: _.label++; return { value: op[1], done: false };
3092
3265
  case 5: _.label++; y = op[1]; op = [0]; continue;
3093
3266
  case 7: op = _.ops.pop(); _.trys.pop(); continue;
3094
- default:
3095
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
3096
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
3097
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
3098
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
3099
- if (t[2]) _.ops.pop();
3100
- _.trys.pop(); continue;
3101
- }
3102
- op = body.call(thisArg, _);
3103
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
3104
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
3105
- }
3106
- }
3107
-
3108
- function __spreadArray(to, from, pack) {
3109
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
3110
- if (ar || !(i in from)) {
3111
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
3112
- ar[i] = from[i];
3113
- }
3114
- }
3115
- return to.concat(ar || Array.prototype.slice.call(from));
3116
- }
3117
-
3118
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
3119
- var e = new Error(message);
3120
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
3121
- };
3122
-
3123
- var VolcView = reactNative.requireNativeComponent('VeLivePushView');
3124
- var NativeViewComponent = /** @class */ (function (_super) {
3125
- __extends(NativeViewComponent, _super);
3126
- function NativeViewComponent() {
3127
- return _super !== null && _super.apply(this, arguments) || this;
3128
- }
3129
- NativeViewComponent.prototype.render = function () {
3130
- var _a = this.props, viewId = _a.viewId, kind = _a.kind, children = _a.children, style = _a.style, onLoad = _a.onLoad;
3131
- return React.createElement(VolcView, {
3132
- viewId: viewId,
3133
- kind: kind,
3134
- style: style,
3135
- onViewLoad: onLoad,
3136
- }, children);
3137
- };
3138
- return NativeViewComponent;
3139
- }(React.Component));
3140
-
3141
- var VeLivePushHelper$1 = function () {
3142
- var _classDecorators = [NativeClass('com.volcengine.velive.rn.push.VeLivePushHelper')];
3143
- var _classDescriptor;
3144
- var _classExtraInitializers = [];
3145
- var _classThis;
3146
- var _staticExtraInitializers = [];
3147
- var _static_setVeLivePusher_decorators;
3148
- var _static_removeVeLivePusher_decorators;
3149
- var VeLivePushHelper = _classThis = /** @class */ (function () {
3150
- function VeLivePushHelper_1() {
3151
- }
3152
- VeLivePushHelper_1.setPusher = function (viewId, pusher) {
3153
- VeLivePushHelper.pusherMap.set(pusher, viewId);
3154
- this.setVeLivePusher(viewId, pusher);
3155
- };
3156
- VeLivePushHelper_1.removePusher = function (pusher) {
3157
- var viewId = VeLivePushHelper.pusherMap.get(pusher);
3158
- if (viewId) {
3159
- VeLivePushHelper.pusherMap.delete(pusher);
3160
- this.removeVeLivePusher(viewId);
3161
- }
3162
- };
3163
- VeLivePushHelper_1.setVeLivePusher = function (viewId, pusher) {
3164
- throw new Error('');
3165
- };
3166
- VeLivePushHelper_1.removeVeLivePusher = function (viewId) {
3167
- throw new Error('');
3168
- };
3169
- return VeLivePushHelper_1;
3170
- }());
3171
- __setFunctionName(_classThis, "VeLivePushHelper");
3172
- (function () {
3173
- var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
3174
- _static_setVeLivePusher_decorators = [NativeStaticMethodSync()];
3175
- _static_removeVeLivePusher_decorators = [NativeStaticMethodSync()];
3176
- __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);
3177
- __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);
3178
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
3179
- VeLivePushHelper = _classThis = _classDescriptor.value;
3180
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
3181
- })();
3182
- _classThis.pusherMap = (__runInitializers(_classThis, _staticExtraInitializers), new WeakMap());
3183
- (function () {
3184
- __runInitializers(_classThis, _classExtraInitializers);
3185
- })();
3186
- return VeLivePushHelper = _classThis;
3187
- }();
3188
- var VeLiveEffectHelper = function () {
3189
- var _classDecorators = [NativeClass('com.volcengine.velive.rn.push.VeLiveEffectHelper')];
3190
- var _classDescriptor;
3191
- var _classExtraInitializers = [];
3192
- var _classThis;
3193
- var _staticExtraInitializers = [];
3194
- var _static_getLicensePath_decorators;
3195
- var _static_getModelPath_decorators;
3196
- var _static_getBeautyPathByName_decorators;
3197
- var _static_getStickerPathByName_decorators;
3198
- var _static_getFilterPathByName_decorators;
3199
- var _static_initVideoEffectResource_decorators;
3200
- var _static_copyAssetFolder_decorators;
3201
- _classThis = /** @class */ (function () {
3202
- function VeLiveEffectHelper_1() {
3203
- }
3204
- VeLiveEffectHelper_1.getLicensePath = function (name) {
3205
- throw new Error('');
3206
- };
3207
- VeLiveEffectHelper_1.getModelPath = function () {
3208
- throw new Error('');
3209
- };
3210
- VeLiveEffectHelper_1.getBeautyPathByName = function (subPath) {
3211
- throw new Error('');
3212
- };
3213
- VeLiveEffectHelper_1.getStickerPathByName = function (name) {
3214
- throw new Error('');
3215
- };
3216
- VeLiveEffectHelper_1.getFilterPathByName = function (name) {
3217
- throw new Error('');
3218
- };
3219
- VeLiveEffectHelper_1.initVideoEffectResource = function () {
3220
- throw new Error('');
3221
- };
3222
- VeLiveEffectHelper_1.copyAssetFolder = function (context, srcName, dstName) {
3223
- throw new Error('');
3224
- };
3225
- return VeLiveEffectHelper_1;
3226
- }());
3227
- __setFunctionName(_classThis, "VeLiveEffectHelper");
3228
- (function () {
3229
- var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
3230
- _static_getLicensePath_decorators = [NativeStaticMethodSync()];
3231
- _static_getModelPath_decorators = [NativeStaticMethodSync()];
3232
- _static_getBeautyPathByName_decorators = [NativeStaticMethodSync()];
3233
- _static_getStickerPathByName_decorators = [NativeStaticMethodSync()];
3234
- _static_getFilterPathByName_decorators = [NativeStaticMethodSync()];
3235
- _static_initVideoEffectResource_decorators = [NativeStaticMethodSync()];
3236
- _static_copyAssetFolder_decorators = [NativeStaticMethodSync()];
3237
- __esDecorate(_classThis, null, _static_getLicensePath_decorators, { kind: "method", name: "getLicensePath", static: true, private: false, access: { has: function (obj) { return "getLicensePath" in obj; }, get: function (obj) { return obj.getLicensePath; } }, metadata: _metadata }, null, _staticExtraInitializers);
3238
- __esDecorate(_classThis, null, _static_getModelPath_decorators, { kind: "method", name: "getModelPath", static: true, private: false, access: { has: function (obj) { return "getModelPath" in obj; }, get: function (obj) { return obj.getModelPath; } }, metadata: _metadata }, null, _staticExtraInitializers);
3239
- __esDecorate(_classThis, null, _static_getBeautyPathByName_decorators, { kind: "method", name: "getBeautyPathByName", static: true, private: false, access: { has: function (obj) { return "getBeautyPathByName" in obj; }, get: function (obj) { return obj.getBeautyPathByName; } }, metadata: _metadata }, null, _staticExtraInitializers);
3240
- __esDecorate(_classThis, null, _static_getStickerPathByName_decorators, { kind: "method", name: "getStickerPathByName", static: true, private: false, access: { has: function (obj) { return "getStickerPathByName" in obj; }, get: function (obj) { return obj.getStickerPathByName; } }, metadata: _metadata }, null, _staticExtraInitializers);
3241
- __esDecorate(_classThis, null, _static_getFilterPathByName_decorators, { kind: "method", name: "getFilterPathByName", static: true, private: false, access: { has: function (obj) { return "getFilterPathByName" in obj; }, get: function (obj) { return obj.getFilterPathByName; } }, metadata: _metadata }, null, _staticExtraInitializers);
3242
- __esDecorate(_classThis, null, _static_initVideoEffectResource_decorators, { kind: "method", name: "initVideoEffectResource", static: true, private: false, access: { has: function (obj) { return "initVideoEffectResource" in obj; }, get: function (obj) { return obj.initVideoEffectResource; } }, metadata: _metadata }, null, _staticExtraInitializers);
3243
- __esDecorate(_classThis, null, _static_copyAssetFolder_decorators, { kind: "method", name: "copyAssetFolder", static: true, private: false, access: { has: function (obj) { return "copyAssetFolder" in obj; }, get: function (obj) { return obj.copyAssetFolder; } }, metadata: _metadata }, null, _staticExtraInitializers);
3244
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
3245
- _classThis = _classDescriptor.value;
3246
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
3247
- __runInitializers(_classThis, _staticExtraInitializers);
3248
- __runInitializers(_classThis, _classExtraInitializers);
3249
- })();
3250
- return _classThis;
3251
- }();
3252
-
3253
- var VeLivePushHelper = function () {
3254
- var _classDecorators = [NativeClass('VeLivePushHelper')];
3255
- var _classDescriptor;
3256
- var _classExtraInitializers = [];
3257
- var _classThis;
3258
- var _staticExtraInitializers = [];
3259
- var _static_setVeLivePusher_decorators;
3260
- var _static_removeVeLivePusher_decorators;
3261
- var _static_getResourcePath_decorators;
3262
- var _static_startWithConfiguration_decorators;
3263
- var VeLivePushHelper = _classThis = /** @class */ (function () {
3264
- function VeLivePushHelper_1() {
3265
- }
3266
- VeLivePushHelper_1.setPusher = function (viewId, pusher) {
3267
- VeLivePushHelper.pusherMap.set(pusher, viewId);
3268
- this.setVeLivePusher(pusher, viewId);
3269
- };
3270
- VeLivePushHelper_1.removePusher = function (pusher) {
3271
- var viewId = VeLivePushHelper.pusherMap.get(pusher);
3272
- if (viewId) {
3273
- VeLivePushHelper.pusherMap.delete(pusher);
3274
- this.removeVeLivePusher(viewId);
3275
- }
3276
- };
3277
- VeLivePushHelper_1.setVeLivePusher = function (pusher, viewId) {
3278
- throw new Error('');
3279
- };
3280
- VeLivePushHelper_1.removeVeLivePusher = function (viewId) {
3281
- throw new Error('');
3282
- };
3283
- VeLivePushHelper_1.getResourcePath = function (subPath) {
3284
- throw new Error('');
3285
- };
3286
- VeLivePushHelper_1.startWithConfiguration = function (cfg) {
3287
- //
3288
- };
3289
- return VeLivePushHelper_1;
3290
- }());
3291
- __setFunctionName(_classThis, "VeLivePushHelper");
3292
- (function () {
3293
- var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
3294
- _static_setVeLivePusher_decorators = [NativeStaticMethodSync('setVeLivePusher:forKey:')];
3295
- _static_removeVeLivePusher_decorators = [NativeStaticMethodSync('removeVeLivePusher:')];
3296
- _static_getResourcePath_decorators = [NativeStaticMethodSync('getResourcePath:')];
3297
- _static_startWithConfiguration_decorators = [NativeStaticMethodSync('startWithConfiguration:')];
3298
- __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);
3299
- __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);
3300
- __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);
3301
- __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);
3302
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
3303
- VeLivePushHelper = _classThis = _classDescriptor.value;
3304
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
3305
- })();
3306
- _classThis.pusherMap = (__runInitializers(_classThis, _staticExtraInitializers), new WeakMap());
3307
- (function () {
3308
- __runInitializers(_classThis, _classExtraInitializers);
3309
- })();
3310
- return VeLivePushHelper = _classThis;
3311
- }();
3267
+ default:
3268
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
3269
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
3270
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
3271
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
3272
+ if (t[2]) _.ops.pop();
3273
+ _.trys.pop(); continue;
3274
+ }
3275
+ op = body.call(thisArg, _);
3276
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
3277
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
3278
+ }
3279
+ }
3280
+
3281
+ function __spreadArray(to, from, pack) {
3282
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
3283
+ if (ar || !(i in from)) {
3284
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
3285
+ ar[i] = from[i];
3286
+ }
3287
+ }
3288
+ return to.concat(ar || Array.prototype.slice.call(from));
3289
+ }
3290
+
3291
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
3292
+ var e = new Error(message);
3293
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
3294
+ };
3312
3295
 
3313
3296
  var VeLiveVideoEncoderConfiguration$2 = function () {
3314
3297
  var _classDecorators = [NativeClass('com.ss.avframework.live.VeLivePusherDef$VeLiveVideoEncoderConfiguration')];
@@ -15216,6 +15199,234 @@ var NativeUIView = function () {
15216
15199
  return UIView;
15217
15200
  })(NativeUIView));
15218
15201
 
15202
+ var _isNewArch;
15203
+ function runImpl(context, androidImpl, iosImpl) {
15204
+ if (env.getOS() === 'android') {
15205
+ var androidEngine = unpackObject(context);
15206
+ return androidImpl(androidEngine);
15207
+ }
15208
+ else if (env.getOS() === 'ios') {
15209
+ var iosEngine = unpackObject(context);
15210
+ return iosImpl(iosEngine);
15211
+ }
15212
+ else {
15213
+ throw new Error("not support: ".concat(env.getOS()));
15214
+ }
15215
+ }
15216
+ function isNewArch() {
15217
+ if (_isNewArch !== undefined) {
15218
+ return _isNewArch;
15219
+ }
15220
+ else {
15221
+ try {
15222
+ // Check for Fabric UI Manager
15223
+ var hasFabricUIManager = Boolean(global === null || global === void 0 ? void 0 : global.nativeFabricUIManager);
15224
+ // Check for TurboModule system
15225
+ var hasTurboModule = Boolean(global === null || global === void 0 ? void 0 : global.__turboModuleProxy);
15226
+ _isNewArch = hasFabricUIManager || hasTurboModule;
15227
+ }
15228
+ catch (_a) {
15229
+ _isNewArch = true;
15230
+ }
15231
+ }
15232
+ return _isNewArch;
15233
+ }
15234
+
15235
+ var isTurboModuleEnabled = isNewArch();
15236
+ var VeLivePush = isTurboModuleEnabled
15237
+ ? NativeVeLivePush
15238
+ : reactNative.NativeModules.VeLivePush;
15239
+
15240
+ var VolcView = reactNative.requireNativeComponent('VeLivePushView');
15241
+ var NativeViewComponent = /** @class */ (function (_super) {
15242
+ __extends(NativeViewComponent, _super);
15243
+ function NativeViewComponent() {
15244
+ return _super !== null && _super.apply(this, arguments) || this;
15245
+ }
15246
+ NativeViewComponent.prototype.render = function () {
15247
+ var _a = this.props, viewId = _a.viewId, kind = _a.kind, children = _a.children, style = _a.style, onLoad = _a.onLoad;
15248
+ return React.createElement(VolcView, {
15249
+ viewId: viewId,
15250
+ kind: kind,
15251
+ style: style,
15252
+ onViewLoad: onLoad,
15253
+ }, children);
15254
+ };
15255
+ return NativeViewComponent;
15256
+ }(React.Component));
15257
+
15258
+ var VeLivePushHelper$1 = function () {
15259
+ var _classDecorators = [NativeClass('com.volcengine.velive.rn.push.VeLivePushHelper')];
15260
+ var _classDescriptor;
15261
+ var _classExtraInitializers = [];
15262
+ var _classThis;
15263
+ var _staticExtraInitializers = [];
15264
+ var _static_setVeLivePusher_decorators;
15265
+ var _static_removeVeLivePusher_decorators;
15266
+ var VeLivePushHelper = _classThis = /** @class */ (function () {
15267
+ function VeLivePushHelper_1() {
15268
+ }
15269
+ VeLivePushHelper_1.setPusher = function (viewId, pusher) {
15270
+ VeLivePushHelper.pusherMap.set(pusher, viewId);
15271
+ this.setVeLivePusher(viewId, pusher);
15272
+ };
15273
+ VeLivePushHelper_1.removePusher = function (pusher) {
15274
+ var viewId = VeLivePushHelper.pusherMap.get(pusher);
15275
+ if (viewId) {
15276
+ VeLivePushHelper.pusherMap.delete(pusher);
15277
+ this.removeVeLivePusher(viewId);
15278
+ }
15279
+ };
15280
+ VeLivePushHelper_1.setVeLivePusher = function (viewId, pusher) {
15281
+ throw new Error('');
15282
+ };
15283
+ VeLivePushHelper_1.removeVeLivePusher = function (viewId) {
15284
+ throw new Error('');
15285
+ };
15286
+ return VeLivePushHelper_1;
15287
+ }());
15288
+ __setFunctionName(_classThis, "VeLivePushHelper");
15289
+ (function () {
15290
+ var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
15291
+ _static_setVeLivePusher_decorators = [NativeStaticMethodSync()];
15292
+ _static_removeVeLivePusher_decorators = [NativeStaticMethodSync()];
15293
+ __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);
15294
+ __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);
15295
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
15296
+ VeLivePushHelper = _classThis = _classDescriptor.value;
15297
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
15298
+ })();
15299
+ _classThis.pusherMap = (__runInitializers(_classThis, _staticExtraInitializers), new WeakMap());
15300
+ (function () {
15301
+ __runInitializers(_classThis, _classExtraInitializers);
15302
+ })();
15303
+ return VeLivePushHelper = _classThis;
15304
+ }();
15305
+ var VeLiveEffectHelper = function () {
15306
+ var _classDecorators = [NativeClass('com.volcengine.velive.rn.push.VeLiveEffectHelper')];
15307
+ var _classDescriptor;
15308
+ var _classExtraInitializers = [];
15309
+ var _classThis;
15310
+ var _staticExtraInitializers = [];
15311
+ var _static_getLicensePath_decorators;
15312
+ var _static_getModelPath_decorators;
15313
+ var _static_getBeautyPathByName_decorators;
15314
+ var _static_getStickerPathByName_decorators;
15315
+ var _static_getFilterPathByName_decorators;
15316
+ var _static_initVideoEffectResource_decorators;
15317
+ var _static_copyAssetFolder_decorators;
15318
+ _classThis = /** @class */ (function () {
15319
+ function VeLiveEffectHelper_1() {
15320
+ }
15321
+ VeLiveEffectHelper_1.getLicensePath = function (name) {
15322
+ throw new Error('');
15323
+ };
15324
+ VeLiveEffectHelper_1.getModelPath = function () {
15325
+ throw new Error('');
15326
+ };
15327
+ VeLiveEffectHelper_1.getBeautyPathByName = function (subPath) {
15328
+ throw new Error('');
15329
+ };
15330
+ VeLiveEffectHelper_1.getStickerPathByName = function (name) {
15331
+ throw new Error('');
15332
+ };
15333
+ VeLiveEffectHelper_1.getFilterPathByName = function (name) {
15334
+ throw new Error('');
15335
+ };
15336
+ VeLiveEffectHelper_1.initVideoEffectResource = function () {
15337
+ throw new Error('');
15338
+ };
15339
+ VeLiveEffectHelper_1.copyAssetFolder = function (context, srcName, dstName) {
15340
+ throw new Error('');
15341
+ };
15342
+ return VeLiveEffectHelper_1;
15343
+ }());
15344
+ __setFunctionName(_classThis, "VeLiveEffectHelper");
15345
+ (function () {
15346
+ var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
15347
+ _static_getLicensePath_decorators = [NativeStaticMethodSync()];
15348
+ _static_getModelPath_decorators = [NativeStaticMethodSync()];
15349
+ _static_getBeautyPathByName_decorators = [NativeStaticMethodSync()];
15350
+ _static_getStickerPathByName_decorators = [NativeStaticMethodSync()];
15351
+ _static_getFilterPathByName_decorators = [NativeStaticMethodSync()];
15352
+ _static_initVideoEffectResource_decorators = [NativeStaticMethodSync()];
15353
+ _static_copyAssetFolder_decorators = [NativeStaticMethodSync()];
15354
+ __esDecorate(_classThis, null, _static_getLicensePath_decorators, { kind: "method", name: "getLicensePath", static: true, private: false, access: { has: function (obj) { return "getLicensePath" in obj; }, get: function (obj) { return obj.getLicensePath; } }, metadata: _metadata }, null, _staticExtraInitializers);
15355
+ __esDecorate(_classThis, null, _static_getModelPath_decorators, { kind: "method", name: "getModelPath", static: true, private: false, access: { has: function (obj) { return "getModelPath" in obj; }, get: function (obj) { return obj.getModelPath; } }, metadata: _metadata }, null, _staticExtraInitializers);
15356
+ __esDecorate(_classThis, null, _static_getBeautyPathByName_decorators, { kind: "method", name: "getBeautyPathByName", static: true, private: false, access: { has: function (obj) { return "getBeautyPathByName" in obj; }, get: function (obj) { return obj.getBeautyPathByName; } }, metadata: _metadata }, null, _staticExtraInitializers);
15357
+ __esDecorate(_classThis, null, _static_getStickerPathByName_decorators, { kind: "method", name: "getStickerPathByName", static: true, private: false, access: { has: function (obj) { return "getStickerPathByName" in obj; }, get: function (obj) { return obj.getStickerPathByName; } }, metadata: _metadata }, null, _staticExtraInitializers);
15358
+ __esDecorate(_classThis, null, _static_getFilterPathByName_decorators, { kind: "method", name: "getFilterPathByName", static: true, private: false, access: { has: function (obj) { return "getFilterPathByName" in obj; }, get: function (obj) { return obj.getFilterPathByName; } }, metadata: _metadata }, null, _staticExtraInitializers);
15359
+ __esDecorate(_classThis, null, _static_initVideoEffectResource_decorators, { kind: "method", name: "initVideoEffectResource", static: true, private: false, access: { has: function (obj) { return "initVideoEffectResource" in obj; }, get: function (obj) { return obj.initVideoEffectResource; } }, metadata: _metadata }, null, _staticExtraInitializers);
15360
+ __esDecorate(_classThis, null, _static_copyAssetFolder_decorators, { kind: "method", name: "copyAssetFolder", static: true, private: false, access: { has: function (obj) { return "copyAssetFolder" in obj; }, get: function (obj) { return obj.copyAssetFolder; } }, metadata: _metadata }, null, _staticExtraInitializers);
15361
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
15362
+ _classThis = _classDescriptor.value;
15363
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
15364
+ __runInitializers(_classThis, _staticExtraInitializers);
15365
+ __runInitializers(_classThis, _classExtraInitializers);
15366
+ })();
15367
+ return _classThis;
15368
+ }();
15369
+
15370
+ var VeLivePushHelper = function () {
15371
+ var _classDecorators = [NativeClass('VeLivePushHelper')];
15372
+ var _classDescriptor;
15373
+ var _classExtraInitializers = [];
15374
+ var _classThis;
15375
+ var _staticExtraInitializers = [];
15376
+ var _static_setVeLivePusher_decorators;
15377
+ var _static_removeVeLivePusher_decorators;
15378
+ var _static_getResourcePath_decorators;
15379
+ var _static_startWithConfiguration_decorators;
15380
+ var VeLivePushHelper = _classThis = /** @class */ (function () {
15381
+ function VeLivePushHelper_1() {
15382
+ }
15383
+ VeLivePushHelper_1.setPusher = function (viewId, pusher) {
15384
+ VeLivePushHelper.pusherMap.set(pusher, viewId);
15385
+ this.setVeLivePusher(pusher, viewId);
15386
+ };
15387
+ VeLivePushHelper_1.removePusher = function (pusher) {
15388
+ var viewId = VeLivePushHelper.pusherMap.get(pusher);
15389
+ if (viewId) {
15390
+ VeLivePushHelper.pusherMap.delete(pusher);
15391
+ this.removeVeLivePusher(viewId);
15392
+ }
15393
+ };
15394
+ VeLivePushHelper_1.setVeLivePusher = function (pusher, viewId) {
15395
+ throw new Error('');
15396
+ };
15397
+ VeLivePushHelper_1.removeVeLivePusher = function (viewId) {
15398
+ throw new Error('');
15399
+ };
15400
+ VeLivePushHelper_1.getResourcePath = function (subPath) {
15401
+ throw new Error('');
15402
+ };
15403
+ VeLivePushHelper_1.startWithConfiguration = function (cfg) {
15404
+ //
15405
+ };
15406
+ return VeLivePushHelper_1;
15407
+ }());
15408
+ __setFunctionName(_classThis, "VeLivePushHelper");
15409
+ (function () {
15410
+ var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
15411
+ _static_setVeLivePusher_decorators = [NativeStaticMethodSync('setVeLivePusher:forKey:')];
15412
+ _static_removeVeLivePusher_decorators = [NativeStaticMethodSync('removeVeLivePusher:')];
15413
+ _static_getResourcePath_decorators = [NativeStaticMethodSync('getResourcePath:')];
15414
+ _static_startWithConfiguration_decorators = [NativeStaticMethodSync('startWithConfiguration:')];
15415
+ __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);
15416
+ __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);
15417
+ __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);
15418
+ __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);
15419
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
15420
+ VeLivePushHelper = _classThis = _classDescriptor.value;
15421
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
15422
+ })();
15423
+ _classThis.pusherMap = (__runInitializers(_classThis, _staticExtraInitializers), new WeakMap());
15424
+ (function () {
15425
+ __runInitializers(_classThis, _classExtraInitializers);
15426
+ })();
15427
+ return VeLivePushHelper = _classThis;
15428
+ }();
15429
+
15219
15430
  /** {zh}
15220
15431
  * @detail keytype
15221
15432
  * @brief 推流本地文件录制配置。
@@ -26187,20 +26398,6 @@ var VeLiveMixerManager = function () {
26187
26398
  return _classThis;
26188
26399
  }();
26189
26400
 
26190
- function runImpl(context, androidImpl, iosImpl) {
26191
- if (env.getOS() === 'android') {
26192
- var androidEngine = unpackObject(context);
26193
- return androidImpl(androidEngine);
26194
- }
26195
- else if (env.getOS() === 'ios') {
26196
- var iosEngine = unpackObject(context);
26197
- return iosImpl(iosEngine);
26198
- }
26199
- else {
26200
- throw new Error("not support: ".concat(env.getOS()));
26201
- }
26202
- }
26203
-
26204
26401
  extendsClassMethod(VeLivePusher, 'getMixerManager', function (origin) {
26205
26402
  return function getMixerManager() {
26206
26403
  if (Reflect.get(this, '__mixerManager')) {
@@ -26290,7 +26487,7 @@ extendsClassMethod(VeLivePusher, 'setVideoFrameFilter', function () {
26290
26487
  extendsClassMethod(VeLivePusher, 'destroy', function (superFn) {
26291
26488
  return function destroy() {
26292
26489
  superFn();
26293
- reactNative.NativeModules.VeLivePushModule.destroyApiEngine();
26490
+ VeLivePush.destroyApiEngine();
26294
26491
  };
26295
26492
  });
26296
26493
 
@@ -26630,7 +26827,7 @@ function initAndroidEnv(config) {
26630
26827
  .setLicenseUri(config.LicenseUri.android);
26631
26828
  androidEnv = builder.build();
26632
26829
  EnvHelper.init(androidEnv, {
26633
- hybrid_ua: "rn|push|".concat("1.4.0"),
26830
+ hybrid_ua: "rn|push|".concat("1.5.0"),
26634
26831
  });
26635
26832
  Env.openAppLog(config.openLog);
26636
26833
  TTNetManager.initTTNet(context);
@@ -26642,7 +26839,7 @@ function initAndroidEnv(config) {
26642
26839
  function initIOSEnv(config) {
26643
26840
  return __awaiter(this, void 0, void 0, function () {
26644
26841
  return __generator(this, function (_a) {
26645
- VeLivePushHelper.startWithConfiguration(__assign(__assign({}, config), { LicenseUri: config.LicenseUri.ios, appLogAid: '500808' , hybrid_ua: "rn|push|".concat("1.4.0") }));
26842
+ VeLivePushHelper.startWithConfiguration(__assign(__assign({}, config), { LicenseUri: config.LicenseUri.ios, appLogAid: '500808' , hybrid_ua: "rn|push|".concat("1.5.0") }));
26646
26843
  return [2 /*return*/];
26647
26844
  });
26648
26845
  });
@@ -27277,7 +27474,14 @@ var VeWebView = React.forwardRef(function (props, ref) {
27277
27474
  return (jsxRuntime.jsx(MixView, { renderMode: renderMode, captureMode: captureMode, captureFramerate: captureFramerate, viewId: viewId, onViewMount: onViewMount, onViewUnmount: onViewUnmount, children: jsxRuntime.jsx(reactNative.View, __assign({}, viewProps, { ref: ref })) }));
27278
27475
  });
27279
27476
 
27280
- setupJSBridge(new ReactNativeBridge(reactNative.NativeModules.VeLivePushModule, 'VeLivePush:onEvent'));
27477
+ if (isTurboModuleEnabled) {
27478
+ console.log('[VeLivePush TurboModule Enable]', VeLivePush);
27479
+ setupJSBridge(new ReactNativeTurboBridge(VeLivePush, 'VeLivePush:onEvent'));
27480
+ }
27481
+ else {
27482
+ console.log('[VeLivePush NativeModule Enable]', reactNative.NativeModules.VeLivePush);
27483
+ setupJSBridge(new ReactNativeBridge(VeLivePush, 'VeLivePush:onEvent'));
27484
+ }
27281
27485
  setupEnv(new ReactNativeEnv());
27282
27486
 
27283
27487
  exports.MixView = MixView;
@@ -27285,6 +27489,7 @@ exports.NativeMixView = NativeMixView;
27285
27489
  exports.NativeViewComponent = NativeViewComponent;
27286
27490
  exports.ReactNativeBridge = ReactNativeBridge;
27287
27491
  exports.ReactNativeEnv = ReactNativeEnv;
27492
+ exports.ReactNativeTurboBridge = ReactNativeTurboBridge;
27288
27493
  exports.VeImageView = VeImageView;
27289
27494
  exports.VeLiveAudioCaptureConfiguration = VeLiveAudioCaptureConfiguration;
27290
27495
  exports.VeLiveAudioDevice = VeLiveAudioDevice;
@@ -27295,6 +27500,7 @@ exports.VeLiveFileRecorderConfiguration = VeLiveFileRecorderConfiguration;
27295
27500
  exports.VeLiveMediaPlayer = VeLiveMediaPlayer;
27296
27501
  exports.VeLiveMixAudioLayout = VeLiveMixAudioLayout;
27297
27502
  exports.VeLiveMixVideoLayout = VeLiveMixVideoLayout;
27503
+ exports.VeLivePush = NativeVeLivePush;
27298
27504
  exports.VeLivePusher = VeLivePusher;
27299
27505
  exports.VeLivePusherConfiguration = VeLivePusherConfiguration;
27300
27506
  exports.VeLivePusherStatistics = VeLivePusherStatistics;