@byteplus/react-native-live-push 1.4.0-rc.0 → 1.5.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/android/build.gradle +15 -3
- package/android/src/main/java/com/volcengine/velive/rn/push/EnvHelper.java +1 -1
- package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushImpl.java +73 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushPackage.java +36 -11
- package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushView.java +1 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/mixer/TextureMgr.java +1 -1
- package/android/src/newarch/com/volcengine/velive/rn/push/VeLivePushModule.java +92 -0
- package/android/src/{main/java → oldarch}/com/volcengine/velive/rn/push/VeLivePushModule.java +12 -48
- package/ios/RCTVeLivePush/RCTVeLivePush.h +22 -0
- package/ios/RCTVeLivePush/RCTVeLivePush.mm +141 -0
- package/ios/VeLivePushImpl.h +38 -0
- package/ios/VeLivePushImpl.m +51 -0
- package/lib/commonjs/index.js +462 -256
- package/lib/commonjs/typescript/index.d.ts +1 -0
- package/lib/commonjs/typescript/module.d.ts +4 -0
- package/lib/commonjs/typescript/platforms/TurboModule/NativeVeLivePush.d.ts +193 -0
- package/lib/commonjs/typescript/platforms/TurboModule/index.d.ts +1 -0
- package/lib/commonjs/typescript/utils/index.d.ts +1 -0
- package/lib/module/index.js +486 -282
- package/lib/module/typescript/index.d.ts +1 -0
- package/lib/module/typescript/module.d.ts +4 -0
- package/lib/module/typescript/platforms/TurboModule/NativeVeLivePush.d.ts +193 -0
- package/lib/module/typescript/platforms/TurboModule/index.d.ts +1 -0
- package/lib/module/typescript/utils/index.d.ts +1 -0
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/module.d.ts +4 -0
- package/lib/typescript/platforms/TurboModule/NativeVeLivePush.d.ts +193 -0
- package/lib/typescript/platforms/TurboModule/index.d.ts +1 -0
- package/lib/typescript/utils/index.d.ts +1 -0
- package/package.json +14 -5
- package/react-native-velive-push.podspec +9 -5
- package/src/platforms/TurboModule/NativeVeLivePush.ts +242 -0
- package/src/platforms/TurboModule/index.ts +1 -0
- package/ios/VeLivePushSDK.h +0 -24
- package/ios/VeLivePushSDK.m +0 -98
- /package/android/src/{main/java → oldarch}/com/volcengine/velive/rn/push/VeLivePushModuleSpec.java +0 -0
package/lib/module/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NativeEventEmitter, Image, Platform,
|
|
1
|
+
import { NativeEventEmitter, Image, Platform, TurboModuleRegistry, NativeModules, requireNativeComponent, findNodeHandle, UIManager, View, Text, StyleSheet } from 'react-native';
|
|
2
2
|
import React, { useMemo, useEffect, useRef } from 'react';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
@@ -517,7 +517,7 @@ var BRIDGE_NATIVE_API$1;
|
|
|
517
517
|
BRIDGE_NATIVE_API["CALL_API"] = "callApi";
|
|
518
518
|
BRIDGE_NATIVE_API["CALL_API_SYNC"] = "callApiSync";
|
|
519
519
|
})(BRIDGE_NATIVE_API$1 || (BRIDGE_NATIVE_API$1 = {}));
|
|
520
|
-
var CALL_TYPE$
|
|
520
|
+
var CALL_TYPE$2;
|
|
521
521
|
(function (CALL_TYPE) {
|
|
522
522
|
/**
|
|
523
523
|
* 获取动态变量
|
|
@@ -567,14 +567,14 @@ var CALL_TYPE$1;
|
|
|
567
567
|
* 触发事件
|
|
568
568
|
*/
|
|
569
569
|
CALL_TYPE["CALLBACK_EMIT"] = "callback_emit";
|
|
570
|
-
})(CALL_TYPE$
|
|
571
|
-
var RETURN_STATUS$
|
|
570
|
+
})(CALL_TYPE$2 || (CALL_TYPE$2 = {}));
|
|
571
|
+
var RETURN_STATUS$2;
|
|
572
572
|
(function (RETURN_STATUS) {
|
|
573
573
|
RETURN_STATUS["SUCCESS"] = "success";
|
|
574
574
|
RETURN_STATUS["FAILED"] = "failed";
|
|
575
575
|
RETURN_STATUS["NOT_IMPLEMENTED"] = "not_implemented";
|
|
576
|
-
})(RETURN_STATUS$
|
|
577
|
-
var INSTANCE_TYPE$
|
|
576
|
+
})(RETURN_STATUS$2 || (RETURN_STATUS$2 = {}));
|
|
577
|
+
var INSTANCE_TYPE$2;
|
|
578
578
|
(function (INSTANCE_TYPE) {
|
|
579
579
|
/**
|
|
580
580
|
* 自动 GC 类型
|
|
@@ -584,7 +584,7 @@ var INSTANCE_TYPE$1;
|
|
|
584
584
|
* 手动 GC 类型
|
|
585
585
|
*/
|
|
586
586
|
INSTANCE_TYPE[INSTANCE_TYPE["MANUAL"] = 1] = "MANUAL";
|
|
587
|
-
})(INSTANCE_TYPE$
|
|
587
|
+
})(INSTANCE_TYPE$2 || (INSTANCE_TYPE$2 = {}));
|
|
588
588
|
|
|
589
589
|
var DefaultBridgeImpl = /** @class */ (function () {
|
|
590
590
|
function DefaultBridgeImpl() {
|
|
@@ -844,7 +844,7 @@ function assertReturn(ret) {
|
|
|
844
844
|
if (!ret || typeof ret !== 'object') {
|
|
845
845
|
return;
|
|
846
846
|
}
|
|
847
|
-
if (ret.status === RETURN_STATUS$
|
|
847
|
+
if (ret.status === RETURN_STATUS$2.FAILED) {
|
|
848
848
|
throw new Error(String(ret.msg));
|
|
849
849
|
}
|
|
850
850
|
return ret.decoded || ret.msg;
|
|
@@ -905,7 +905,7 @@ var getRegistry = function () {
|
|
|
905
905
|
};
|
|
906
906
|
var NativeObserverClass = function (className, opt) {
|
|
907
907
|
if (opt === void 0) { opt = {
|
|
908
|
-
instanceType: INSTANCE_TYPE$
|
|
908
|
+
instanceType: INSTANCE_TYPE$2.AUTOMATIC,
|
|
909
909
|
}; }
|
|
910
910
|
return function (target, ctx) {
|
|
911
911
|
ctx.addInitializer(function () {
|
|
@@ -931,7 +931,7 @@ var NativeObserverClass = function (className, opt) {
|
|
|
931
931
|
t.instanceId = instanceId;
|
|
932
932
|
t.messageClient = getMessageClient(t);
|
|
933
933
|
t.options = opt;
|
|
934
|
-
t.instanceType = opt.instanceType || INSTANCE_TYPE$
|
|
934
|
+
t.instanceType = opt.instanceType || INSTANCE_TYPE$2.AUTOMATIC;
|
|
935
935
|
(_a = getRegistry()) === null || _a === void 0 ? void 0 : _a.register(_this, "".concat(instanceId, "::").concat(className));
|
|
936
936
|
// custom consume native event
|
|
937
937
|
/**
|
|
@@ -975,7 +975,7 @@ var NativeObserverClass = function (className, opt) {
|
|
|
975
975
|
};
|
|
976
976
|
var NativeClass = function (className, opt) {
|
|
977
977
|
if (opt === void 0) { opt = {
|
|
978
|
-
instanceType: INSTANCE_TYPE$
|
|
978
|
+
instanceType: INSTANCE_TYPE$2.AUTOMATIC,
|
|
979
979
|
}; }
|
|
980
980
|
return function (target, ctx) {
|
|
981
981
|
ctx.addInitializer(function () {
|
|
@@ -1000,7 +1000,7 @@ var NativeClass = function (className, opt) {
|
|
|
1000
1000
|
t.namespace = className;
|
|
1001
1001
|
t.instanceId = instanceId;
|
|
1002
1002
|
t.messageClient = getMessageClient(t);
|
|
1003
|
-
t.instanceType = opt.instanceType || INSTANCE_TYPE$
|
|
1003
|
+
t.instanceType = opt.instanceType || INSTANCE_TYPE$2.AUTOMATIC;
|
|
1004
1004
|
(_a = getRegistry()) === null || _a === void 0 ? void 0 : _a.register(_this, "".concat(instanceId, "::").concat(className));
|
|
1005
1005
|
var _init = function () {
|
|
1006
1006
|
t.messageClient.sendNewInstanceCall(className, args.filter(function (v) { return v !== undefined; }), instanceId, t);
|
|
@@ -1697,7 +1697,7 @@ var MessageSenderImpl = function () {
|
|
|
1697
1697
|
serviceName: varName,
|
|
1698
1698
|
memberName: varName,
|
|
1699
1699
|
args: encodeArgs,
|
|
1700
|
-
callType: CALL_TYPE$
|
|
1700
|
+
callType: CALL_TYPE$2.VAR_GETTER,
|
|
1701
1701
|
_traceId: traceId,
|
|
1702
1702
|
};
|
|
1703
1703
|
span = this.tracer.collectApiCall({
|
|
@@ -1738,7 +1738,7 @@ var MessageSenderImpl = function () {
|
|
|
1738
1738
|
serviceName: serviceName,
|
|
1739
1739
|
methodName: methodName,
|
|
1740
1740
|
args: encodeArgs,
|
|
1741
|
-
callType: CALL_TYPE$
|
|
1741
|
+
callType: CALL_TYPE$2.PLAIN_API_CALL,
|
|
1742
1742
|
_traceId: traceId,
|
|
1743
1743
|
runOnMainThread: true,
|
|
1744
1744
|
};
|
|
@@ -1775,7 +1775,7 @@ var MessageSenderImpl = function () {
|
|
|
1775
1775
|
serviceName: serviceName,
|
|
1776
1776
|
methodName: methodName,
|
|
1777
1777
|
args: encodeArgs,
|
|
1778
|
-
callType: CALL_TYPE$
|
|
1778
|
+
callType: CALL_TYPE$2.PLAIN_API_CALL,
|
|
1779
1779
|
_traceId: traceId,
|
|
1780
1780
|
runOnMainThread: true,
|
|
1781
1781
|
};
|
|
@@ -1804,7 +1804,7 @@ var MessageSenderImpl = function () {
|
|
|
1804
1804
|
var params = {
|
|
1805
1805
|
serviceName: serviceName,
|
|
1806
1806
|
args: encodeArgs,
|
|
1807
|
-
callType: CALL_TYPE$
|
|
1807
|
+
callType: CALL_TYPE$2.NEW_INSTANCE,
|
|
1808
1808
|
_instanceId: instanceId,
|
|
1809
1809
|
_instanceType: instance.instanceType,
|
|
1810
1810
|
_traceId: traceId,
|
|
@@ -1841,7 +1841,7 @@ var MessageSenderImpl = function () {
|
|
|
1841
1841
|
encodeArgs = this.proto.encodeArgs(args);
|
|
1842
1842
|
traceId = getUuid('trace');
|
|
1843
1843
|
params = {
|
|
1844
|
-
callType: CALL_TYPE$
|
|
1844
|
+
callType: CALL_TYPE$2.INSTANCE_METHOD_INVOKE,
|
|
1845
1845
|
_instanceId: instanceId,
|
|
1846
1846
|
serviceName: serviceName,
|
|
1847
1847
|
methodName: methodName,
|
|
@@ -1882,7 +1882,7 @@ var MessageSenderImpl = function () {
|
|
|
1882
1882
|
var encodeArgs = this.proto.encodeArgs(args);
|
|
1883
1883
|
var traceId = getUuid('trace');
|
|
1884
1884
|
var params = {
|
|
1885
|
-
callType: CALL_TYPE$
|
|
1885
|
+
callType: CALL_TYPE$2.INSTANCE_METHOD_INVOKE,
|
|
1886
1886
|
_instanceId: instanceId,
|
|
1887
1887
|
serviceName: serviceName,
|
|
1888
1888
|
args: encodeArgs,
|
|
@@ -1915,7 +1915,7 @@ var MessageSenderImpl = function () {
|
|
|
1915
1915
|
assert(!!instanceId, 'unknown instance');
|
|
1916
1916
|
var traceId = getUuid('trace');
|
|
1917
1917
|
var params = {
|
|
1918
|
-
callType: CALL_TYPE$
|
|
1918
|
+
callType: CALL_TYPE$2.INSTANCE_MEMBER_SET,
|
|
1919
1919
|
_instanceId: instanceId,
|
|
1920
1920
|
serviceName: serviceName,
|
|
1921
1921
|
memberName: memberName,
|
|
@@ -1946,7 +1946,7 @@ var MessageSenderImpl = function () {
|
|
|
1946
1946
|
assert(!!instanceId, 'unknown instance');
|
|
1947
1947
|
var traceId = getUuid('trace');
|
|
1948
1948
|
var params = {
|
|
1949
|
-
callType: CALL_TYPE$
|
|
1949
|
+
callType: CALL_TYPE$2.INSTANCE_MEMBER_GET,
|
|
1950
1950
|
_instanceId: instanceId,
|
|
1951
1951
|
serviceName: serviceName,
|
|
1952
1952
|
memberName: memberName,
|
|
@@ -1977,7 +1977,7 @@ var MessageSenderImpl = function () {
|
|
|
1977
1977
|
assert(!!instanceId, 'unknown instance');
|
|
1978
1978
|
// const encodeCallback = this.proto.encodeCallback(callback);
|
|
1979
1979
|
var params = {
|
|
1980
|
-
callType: CALL_TYPE$
|
|
1980
|
+
callType: CALL_TYPE$2.INSTANCE_EVENT_LISTENER_ADD,
|
|
1981
1981
|
_instanceId: instanceId,
|
|
1982
1982
|
serviceName: serviceName,
|
|
1983
1983
|
methodName: eventName,
|
|
@@ -1995,7 +1995,7 @@ var MessageSenderImpl = function () {
|
|
|
1995
1995
|
assert(!!instanceId, 'unknown instance');
|
|
1996
1996
|
// const encodeCallback = this.proto.encodeCallback(callback);
|
|
1997
1997
|
var params = {
|
|
1998
|
-
callType: CALL_TYPE$
|
|
1998
|
+
callType: CALL_TYPE$2.INSTANCE_EVENT_LISTENER_REMOVE,
|
|
1999
1999
|
_instanceId: instanceId,
|
|
2000
2000
|
serviceName: serviceName,
|
|
2001
2001
|
methodName: eventName,
|
|
@@ -2012,7 +2012,7 @@ var MessageSenderImpl = function () {
|
|
|
2012
2012
|
var instanceId = this._resolveInstanceId(instanceOrId);
|
|
2013
2013
|
assert(!!instanceId, 'unknown instance');
|
|
2014
2014
|
var params = {
|
|
2015
|
-
callType: CALL_TYPE$
|
|
2015
|
+
callType: CALL_TYPE$2.DESTROY_INSTANCE,
|
|
2016
2016
|
_instanceId: instanceId,
|
|
2017
2017
|
serviceName: serviceName,
|
|
2018
2018
|
};
|
|
@@ -2024,7 +2024,7 @@ var MessageSenderImpl = function () {
|
|
|
2024
2024
|
return __generator$1(this, function (_b) {
|
|
2025
2025
|
encodeArgs = this.proto.encodeArgs(args);
|
|
2026
2026
|
params = {
|
|
2027
|
-
callType: CALL_TYPE$
|
|
2027
|
+
callType: CALL_TYPE$2.INSTANCE_EVENT_EMIT,
|
|
2028
2028
|
_instanceId: instanceId,
|
|
2029
2029
|
serviceName: serviceName,
|
|
2030
2030
|
args: __spreadArray$1([
|
|
@@ -2048,7 +2048,7 @@ var MessageSenderImpl = function () {
|
|
|
2048
2048
|
var params;
|
|
2049
2049
|
return __generator$1(this, function (_b) {
|
|
2050
2050
|
params = {
|
|
2051
|
-
callType: CALL_TYPE$
|
|
2051
|
+
callType: CALL_TYPE$2.INSTANCE_EVENT_RESULT,
|
|
2052
2052
|
_instanceId: instanceId,
|
|
2053
2053
|
serviceName: serviceName,
|
|
2054
2054
|
args: [ret],
|
|
@@ -2092,7 +2092,7 @@ var MessageSenderImpl = function () {
|
|
|
2092
2092
|
};
|
|
2093
2093
|
MessageSenderImpl.prototype._resolveReturn = function (res, req) {
|
|
2094
2094
|
switch (res.status) {
|
|
2095
|
-
case RETURN_STATUS$
|
|
2095
|
+
case RETURN_STATUS$2.SUCCESS:
|
|
2096
2096
|
this.logger.info('[message-sender] Decode return:', res.msg);
|
|
2097
2097
|
if (res.msg) {
|
|
2098
2098
|
Object.defineProperty(res, 'decoded', {
|
|
@@ -2102,10 +2102,10 @@ var MessageSenderImpl = function () {
|
|
|
2102
2102
|
});
|
|
2103
2103
|
}
|
|
2104
2104
|
break;
|
|
2105
|
-
case RETURN_STATUS$
|
|
2105
|
+
case RETURN_STATUS$2.NOT_IMPLEMENTED:
|
|
2106
2106
|
this.logger.error('[message-sender] Native method not implemented:', req);
|
|
2107
2107
|
break;
|
|
2108
|
-
case RETURN_STATUS$
|
|
2108
|
+
case RETURN_STATUS$2.FAILED:
|
|
2109
2109
|
this.logger.error('[message-sender] Decode return failed:', res);
|
|
2110
2110
|
break;
|
|
2111
2111
|
default:
|
|
@@ -2185,15 +2185,15 @@ var MessageClientImpl = function () {
|
|
|
2185
2185
|
try {
|
|
2186
2186
|
callType = req.callType;
|
|
2187
2187
|
switch (callType) {
|
|
2188
|
-
case CALL_TYPE$
|
|
2188
|
+
case CALL_TYPE$2.PLAIN_API_CALL:
|
|
2189
2189
|
return [2 /*return*/, this._onCallStaticApi(req)];
|
|
2190
|
-
case CALL_TYPE$
|
|
2190
|
+
case CALL_TYPE$2.INSTANCE_METHOD_INVOKE:
|
|
2191
2191
|
return [2 /*return*/, this._onCallInstanceApi(req)];
|
|
2192
|
-
case CALL_TYPE$
|
|
2192
|
+
case CALL_TYPE$2.INSTANCE_EVENT_LISTENER_ADD:
|
|
2193
2193
|
return [2 /*return*/, this._onCallEventRegister(req)];
|
|
2194
|
-
case CALL_TYPE$
|
|
2194
|
+
case CALL_TYPE$2.INSTANCE_EVENT_EMIT:
|
|
2195
2195
|
return [2 /*return*/, this._onCallEventEmit(req)];
|
|
2196
|
-
case CALL_TYPE$
|
|
2196
|
+
case CALL_TYPE$2.CALLBACK_EMIT:
|
|
2197
2197
|
return [2 /*return*/, this._onCallbackEmit(req)];
|
|
2198
2198
|
default:
|
|
2199
2199
|
throw new Error("unknown callType \"".concat(callType, "\""));
|
|
@@ -2227,7 +2227,7 @@ var MessageClientImpl = function () {
|
|
|
2227
2227
|
source: 'native',
|
|
2228
2228
|
target: 'js',
|
|
2229
2229
|
serviceName: serviceName,
|
|
2230
|
-
callType: CALL_TYPE$
|
|
2230
|
+
callType: CALL_TYPE$2.PLAIN_API_CALL,
|
|
2231
2231
|
args: args,
|
|
2232
2232
|
});
|
|
2233
2233
|
_d.label = 1;
|
|
@@ -2301,7 +2301,7 @@ var MessageClientImpl = function () {
|
|
|
2301
2301
|
source: 'native',
|
|
2302
2302
|
target: 'js',
|
|
2303
2303
|
serviceName: serviceName,
|
|
2304
|
-
callType: CALL_TYPE$
|
|
2304
|
+
callType: CALL_TYPE$2.INSTANCE_METHOD_INVOKE,
|
|
2305
2305
|
args: args,
|
|
2306
2306
|
});
|
|
2307
2307
|
_d.label = 1;
|
|
@@ -2407,7 +2407,7 @@ var MessageClientImpl = function () {
|
|
|
2407
2407
|
else {
|
|
2408
2408
|
this.logger.debug("[message-client] Unknown event \"".concat(eventName, "\""));
|
|
2409
2409
|
returnParams = {
|
|
2410
|
-
status: RETURN_STATUS$
|
|
2410
|
+
status: RETURN_STATUS$2.NOT_IMPLEMENTED,
|
|
2411
2411
|
msg: {},
|
|
2412
2412
|
};
|
|
2413
2413
|
}
|
|
@@ -2415,7 +2415,7 @@ var MessageClientImpl = function () {
|
|
|
2415
2415
|
catch (err) {
|
|
2416
2416
|
this.logger.error("[message-client] Event emit failed: ".concat(eventName), err);
|
|
2417
2417
|
returnParams = {
|
|
2418
|
-
status: RETURN_STATUS$
|
|
2418
|
+
status: RETURN_STATUS$2.FAILED,
|
|
2419
2419
|
msg: {
|
|
2420
2420
|
errorMessage: (err === null || err === void 0 ? void 0 : err.message) || '',
|
|
2421
2421
|
errorCode: -1,
|
|
@@ -2472,7 +2472,7 @@ var MessageClientImpl = function () {
|
|
|
2472
2472
|
this.logger.debug('[message-client] response:', response);
|
|
2473
2473
|
var encodeResponse = this.proto.encodeArg(response);
|
|
2474
2474
|
var returnVal = {
|
|
2475
|
-
status: RETURN_STATUS$
|
|
2475
|
+
status: RETURN_STATUS$2.SUCCESS,
|
|
2476
2476
|
msg: encodeResponse === undefined
|
|
2477
2477
|
? null
|
|
2478
2478
|
: encodeResponse === null
|
|
@@ -2586,6 +2586,7 @@ var MessageProtoImpl = function () {
|
|
|
2586
2586
|
var buf = bufferLike.buffer || bufferLike;
|
|
2587
2587
|
return {
|
|
2588
2588
|
_type: "base64" /* ARG_TYPE.BASE64 */,
|
|
2589
|
+
// @ts-ignore
|
|
2589
2590
|
_value: buf2base64(buf),
|
|
2590
2591
|
};
|
|
2591
2592
|
};
|
|
@@ -2781,7 +2782,7 @@ var BRIDGE_NATIVE_API;
|
|
|
2781
2782
|
BRIDGE_NATIVE_API["CALL_API"] = "callApi";
|
|
2782
2783
|
BRIDGE_NATIVE_API["CALL_API_SYNC"] = "callApiSync";
|
|
2783
2784
|
})(BRIDGE_NATIVE_API || (BRIDGE_NATIVE_API = {}));
|
|
2784
|
-
var CALL_TYPE;
|
|
2785
|
+
var CALL_TYPE$1;
|
|
2785
2786
|
(function (CALL_TYPE) {
|
|
2786
2787
|
/**
|
|
2787
2788
|
* 获取动态变量
|
|
@@ -2831,14 +2832,14 @@ var CALL_TYPE;
|
|
|
2831
2832
|
* 触发事件
|
|
2832
2833
|
*/
|
|
2833
2834
|
CALL_TYPE["CALLBACK_EMIT"] = "callback_emit";
|
|
2834
|
-
})(CALL_TYPE || (CALL_TYPE = {}));
|
|
2835
|
-
var RETURN_STATUS;
|
|
2835
|
+
})(CALL_TYPE$1 || (CALL_TYPE$1 = {}));
|
|
2836
|
+
var RETURN_STATUS$1;
|
|
2836
2837
|
(function (RETURN_STATUS) {
|
|
2837
2838
|
RETURN_STATUS["SUCCESS"] = "success";
|
|
2838
2839
|
RETURN_STATUS["FAILED"] = "failed";
|
|
2839
2840
|
RETURN_STATUS["NOT_IMPLEMENTED"] = "not_implemented";
|
|
2840
|
-
})(RETURN_STATUS || (RETURN_STATUS = {}));
|
|
2841
|
-
var INSTANCE_TYPE;
|
|
2841
|
+
})(RETURN_STATUS$1 || (RETURN_STATUS$1 = {}));
|
|
2842
|
+
var INSTANCE_TYPE$1;
|
|
2842
2843
|
(function (INSTANCE_TYPE) {
|
|
2843
2844
|
/**
|
|
2844
2845
|
* 自动 GC 类型
|
|
@@ -2848,7 +2849,7 @@ var INSTANCE_TYPE;
|
|
|
2848
2849
|
* 手动 GC 类型
|
|
2849
2850
|
*/
|
|
2850
2851
|
INSTANCE_TYPE[INSTANCE_TYPE["MANUAL"] = 1] = "MANUAL";
|
|
2851
|
-
})(INSTANCE_TYPE || (INSTANCE_TYPE = {}));
|
|
2852
|
+
})(INSTANCE_TYPE$1 || (INSTANCE_TYPE$1 = {}));
|
|
2852
2853
|
|
|
2853
2854
|
var ReactNativeBridge = /** @class */ (function () {
|
|
2854
2855
|
function ReactNativeBridge(BridgeModule, NativeEventName) {
|
|
@@ -2893,7 +2894,7 @@ var ReactNativeBridge = /** @class */ (function () {
|
|
|
2893
2894
|
return;
|
|
2894
2895
|
}
|
|
2895
2896
|
resolve({
|
|
2896
|
-
status: RETURN_STATUS.SUCCESS,
|
|
2897
|
+
status: RETURN_STATUS$1.SUCCESS,
|
|
2897
2898
|
msg: 'over timeout and auto success',
|
|
2898
2899
|
});
|
|
2899
2900
|
}, 1000 * 60 * 5);
|
|
@@ -2927,6 +2928,77 @@ var ReactNativeBridge = /** @class */ (function () {
|
|
|
2927
2928
|
return ReactNativeBridge;
|
|
2928
2929
|
}());
|
|
2929
2930
|
|
|
2931
|
+
var ReactNativeTurboBridge = /** @class */ (function () {
|
|
2932
|
+
function ReactNativeTurboBridge(BridgeModule, NativeEventName) {
|
|
2933
|
+
this.BridgeModule = BridgeModule;
|
|
2934
|
+
this.NativeEventName = NativeEventName;
|
|
2935
|
+
this._handlers = {};
|
|
2936
|
+
if (BridgeModule === undefined) {
|
|
2937
|
+
throw new Error("can't find module \"".concat(BridgeModule, "\", please enure install the module correctly"));
|
|
2938
|
+
}
|
|
2939
|
+
// this._nativeEventEmitter = new NativeEventEmitter(BridgeModule);
|
|
2940
|
+
this._nativeEventEmitter = new NativeEventEmitter(BridgeModule);
|
|
2941
|
+
this._init();
|
|
2942
|
+
}
|
|
2943
|
+
ReactNativeTurboBridge.prototype._init = function () {
|
|
2944
|
+
var _this = this;
|
|
2945
|
+
this._nativeEventEmitter.addListener(this.NativeEventName, function (ev) {
|
|
2946
|
+
var _a, _b;
|
|
2947
|
+
try {
|
|
2948
|
+
var eventName = ev.event;
|
|
2949
|
+
var eventData = typeof ev.data === 'string' ? JSON.parse(ev.data) : ev.data;
|
|
2950
|
+
(_b = (_a = _this._handlers)[eventName]) === null || _b === void 0 ? void 0 : _b.call(_a, eventData);
|
|
2951
|
+
}
|
|
2952
|
+
catch (err) {
|
|
2953
|
+
console.error('handle native event fail:', err);
|
|
2954
|
+
}
|
|
2955
|
+
});
|
|
2956
|
+
};
|
|
2957
|
+
ReactNativeTurboBridge.prototype.call = function (params) {
|
|
2958
|
+
var _this = this;
|
|
2959
|
+
return new Promise(function (resolve, reject) {
|
|
2960
|
+
try {
|
|
2961
|
+
var resolved_1 = false;
|
|
2962
|
+
_this.BridgeModule.call(JSON.stringify(params), function (res) {
|
|
2963
|
+
var val = typeof res === 'string' ? JSON.parse(res) : res;
|
|
2964
|
+
resolved_1 = true;
|
|
2965
|
+
resolve(val);
|
|
2966
|
+
});
|
|
2967
|
+
setTimeout(function () {
|
|
2968
|
+
if (resolved_1) {
|
|
2969
|
+
return;
|
|
2970
|
+
}
|
|
2971
|
+
resolve({
|
|
2972
|
+
status: RETURN_STATUS$1.SUCCESS,
|
|
2973
|
+
msg: 'over timeout and auto success',
|
|
2974
|
+
});
|
|
2975
|
+
}, 1000 * 60 * 5);
|
|
2976
|
+
}
|
|
2977
|
+
catch (err) {
|
|
2978
|
+
// console.error(`<RNBridge> call native "${handlerName}()" fail`, err);
|
|
2979
|
+
reject(err);
|
|
2980
|
+
}
|
|
2981
|
+
});
|
|
2982
|
+
};
|
|
2983
|
+
ReactNativeTurboBridge.prototype.callSync = function (params) {
|
|
2984
|
+
try {
|
|
2985
|
+
var res = this.BridgeModule.callSync(JSON.stringify(params));
|
|
2986
|
+
return typeof res === 'string' ? JSON.parse(res) : res;
|
|
2987
|
+
}
|
|
2988
|
+
catch (err) {
|
|
2989
|
+
// console.error(`<RNBridge> call native "${handlerName}()" fail`, err);
|
|
2990
|
+
throw err;
|
|
2991
|
+
}
|
|
2992
|
+
};
|
|
2993
|
+
ReactNativeTurboBridge.prototype.registerHandler = function (handlerName, handler) {
|
|
2994
|
+
this._handlers[handlerName] = handler;
|
|
2995
|
+
};
|
|
2996
|
+
ReactNativeTurboBridge.prototype.registerAsyncHandler = function (handlerName, handler) {
|
|
2997
|
+
this._handlers[handlerName] = handler;
|
|
2998
|
+
};
|
|
2999
|
+
return ReactNativeTurboBridge;
|
|
3000
|
+
}());
|
|
3001
|
+
|
|
2930
3002
|
/******************************************************************************
|
|
2931
3003
|
Copyright (c) Microsoft Corporation.
|
|
2932
3004
|
|
|
@@ -2973,6 +3045,107 @@ var ReactNativeEnv = /** @class */ (function () {
|
|
|
2973
3045
|
return ReactNativeEnv;
|
|
2974
3046
|
}());
|
|
2975
3047
|
|
|
3048
|
+
var CALL_TYPE;
|
|
3049
|
+
(function (CALL_TYPE) {
|
|
3050
|
+
/**
|
|
3051
|
+
* 获取动态变量
|
|
3052
|
+
*/
|
|
3053
|
+
CALL_TYPE["VAR_GETTER"] = "var_get";
|
|
3054
|
+
/**
|
|
3055
|
+
* 调用静态方法
|
|
3056
|
+
*/
|
|
3057
|
+
CALL_TYPE["PLAIN_API_CALL"] = "plain_api_call";
|
|
3058
|
+
/**
|
|
3059
|
+
* 实例化对象
|
|
3060
|
+
*/
|
|
3061
|
+
CALL_TYPE["NEW_INSTANCE"] = "new_instance";
|
|
3062
|
+
/**
|
|
3063
|
+
* 调用 api 上的方法
|
|
3064
|
+
*/
|
|
3065
|
+
CALL_TYPE["INSTANCE_METHOD_INVOKE"] = "instance_method_invoke";
|
|
3066
|
+
/**
|
|
3067
|
+
* 设置属性
|
|
3068
|
+
*/
|
|
3069
|
+
CALL_TYPE["INSTANCE_MEMBER_SET"] = "instance_member_set";
|
|
3070
|
+
/**
|
|
3071
|
+
* 设置属性
|
|
3072
|
+
*/
|
|
3073
|
+
CALL_TYPE["INSTANCE_MEMBER_GET"] = "instance_member_get";
|
|
3074
|
+
/**
|
|
3075
|
+
* 注册回调函数
|
|
3076
|
+
*/
|
|
3077
|
+
CALL_TYPE["INSTANCE_EVENT_LISTENER_ADD"] = "instance_event_add";
|
|
3078
|
+
/**
|
|
3079
|
+
* 移除回调函数
|
|
3080
|
+
*/
|
|
3081
|
+
CALL_TYPE["INSTANCE_EVENT_LISTENER_REMOVE"] = "instance_event_remove";
|
|
3082
|
+
/**
|
|
3083
|
+
* 触发事件
|
|
3084
|
+
*/
|
|
3085
|
+
CALL_TYPE["INSTANCE_EVENT_EMIT"] = "instance_event_emit";
|
|
3086
|
+
/**
|
|
3087
|
+
* 事件执行后的返回值
|
|
3088
|
+
*/
|
|
3089
|
+
CALL_TYPE["INSTANCE_EVENT_RESULT"] = "instance_event_result";
|
|
3090
|
+
/**
|
|
3091
|
+
* 销毁实例
|
|
3092
|
+
*/
|
|
3093
|
+
CALL_TYPE["DESTROY_INSTANCE"] = "destroy_instance";
|
|
3094
|
+
/**
|
|
3095
|
+
* 触发事件
|
|
3096
|
+
*/
|
|
3097
|
+
CALL_TYPE["CALLBACK_EMIT"] = "callback_emit";
|
|
3098
|
+
})(CALL_TYPE || (CALL_TYPE = {}));
|
|
3099
|
+
var ARG_TYPE;
|
|
3100
|
+
(function (ARG_TYPE) {
|
|
3101
|
+
/**
|
|
3102
|
+
* 类的实例
|
|
3103
|
+
*/
|
|
3104
|
+
ARG_TYPE["INSTANCE"] = "instance";
|
|
3105
|
+
/**
|
|
3106
|
+
* callback 函数
|
|
3107
|
+
*/
|
|
3108
|
+
ARG_TYPE["CALLBACK"] = "callback";
|
|
3109
|
+
/**
|
|
3110
|
+
* 枚举
|
|
3111
|
+
*/
|
|
3112
|
+
ARG_TYPE["ENUM"] = "enum";
|
|
3113
|
+
/**
|
|
3114
|
+
* 运行时变量
|
|
3115
|
+
* 比如:android 的 ApplicationContext
|
|
3116
|
+
*/
|
|
3117
|
+
ARG_TYPE["VARIABLE"] = "variable";
|
|
3118
|
+
/**
|
|
3119
|
+
* 二进制数据
|
|
3120
|
+
*/
|
|
3121
|
+
ARG_TYPE["BASE64"] = "base64";
|
|
3122
|
+
/**
|
|
3123
|
+
*
|
|
3124
|
+
*/
|
|
3125
|
+
ARG_TYPE["IMAGE_RESOURCE"] = "image_resource";
|
|
3126
|
+
})(ARG_TYPE || (ARG_TYPE = {}));
|
|
3127
|
+
var RETURN_STATUS;
|
|
3128
|
+
(function (RETURN_STATUS) {
|
|
3129
|
+
RETURN_STATUS["SUCCESS"] = "success";
|
|
3130
|
+
RETURN_STATUS["FAILED"] = "failed";
|
|
3131
|
+
RETURN_STATUS["NOT_IMPLEMENTED"] = "not_implemented";
|
|
3132
|
+
})(RETURN_STATUS || (RETURN_STATUS = {}));
|
|
3133
|
+
var INSTANCE_TYPE;
|
|
3134
|
+
(function (INSTANCE_TYPE) {
|
|
3135
|
+
/**
|
|
3136
|
+
* 自动 GC 类型
|
|
3137
|
+
*/
|
|
3138
|
+
INSTANCE_TYPE[INSTANCE_TYPE["AUTOMATIC"] = 0] = "AUTOMATIC";
|
|
3139
|
+
/**
|
|
3140
|
+
* 手动 GC 类型
|
|
3141
|
+
*/
|
|
3142
|
+
INSTANCE_TYPE[INSTANCE_TYPE["MANUAL"] = 1] = "MANUAL";
|
|
3143
|
+
})(INSTANCE_TYPE || (INSTANCE_TYPE = {}));
|
|
3144
|
+
/**
|
|
3145
|
+
* 获取NativeBridgeModule实例
|
|
3146
|
+
*/
|
|
3147
|
+
var NativeVeLivePush = TurboModuleRegistry.get('VeLivePush');
|
|
3148
|
+
|
|
2976
3149
|
/******************************************************************************
|
|
2977
3150
|
Copyright (c) Microsoft Corporation.
|
|
2978
3151
|
|
|
@@ -3089,224 +3262,34 @@ function __generator(thisArg, body) {
|
|
|
3089
3262
|
case 4: _.label++; return { value: op[1], done: false };
|
|
3090
3263
|
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
3091
3264
|
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
3092
|
-
default:
|
|
3093
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
3094
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
3095
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
3096
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
3097
|
-
if (t[2]) _.ops.pop();
|
|
3098
|
-
_.trys.pop(); continue;
|
|
3099
|
-
}
|
|
3100
|
-
op = body.call(thisArg, _);
|
|
3101
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
3102
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
3103
|
-
}
|
|
3104
|
-
}
|
|
3105
|
-
|
|
3106
|
-
function __spreadArray(to, from, pack) {
|
|
3107
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3108
|
-
if (ar || !(i in from)) {
|
|
3109
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
3110
|
-
ar[i] = from[i];
|
|
3111
|
-
}
|
|
3112
|
-
}
|
|
3113
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
3114
|
-
}
|
|
3115
|
-
|
|
3116
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
3117
|
-
var e = new Error(message);
|
|
3118
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
3119
|
-
};
|
|
3120
|
-
|
|
3121
|
-
var VolcView = requireNativeComponent('VeLivePushView');
|
|
3122
|
-
var NativeViewComponent = /** @class */ (function (_super) {
|
|
3123
|
-
__extends(NativeViewComponent, _super);
|
|
3124
|
-
function NativeViewComponent() {
|
|
3125
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3126
|
-
}
|
|
3127
|
-
NativeViewComponent.prototype.render = function () {
|
|
3128
|
-
var _a = this.props, viewId = _a.viewId, kind = _a.kind, children = _a.children, style = _a.style, onLoad = _a.onLoad;
|
|
3129
|
-
return React.createElement(VolcView, {
|
|
3130
|
-
viewId: viewId,
|
|
3131
|
-
kind: kind,
|
|
3132
|
-
style: style,
|
|
3133
|
-
onViewLoad: onLoad,
|
|
3134
|
-
}, children);
|
|
3135
|
-
};
|
|
3136
|
-
return NativeViewComponent;
|
|
3137
|
-
}(React.Component));
|
|
3138
|
-
|
|
3139
|
-
var VeLivePushHelper$1 = function () {
|
|
3140
|
-
var _classDecorators = [NativeClass('com.volcengine.velive.rn.push.VeLivePushHelper')];
|
|
3141
|
-
var _classDescriptor;
|
|
3142
|
-
var _classExtraInitializers = [];
|
|
3143
|
-
var _classThis;
|
|
3144
|
-
var _staticExtraInitializers = [];
|
|
3145
|
-
var _static_setVeLivePusher_decorators;
|
|
3146
|
-
var _static_removeVeLivePusher_decorators;
|
|
3147
|
-
var VeLivePushHelper = _classThis = /** @class */ (function () {
|
|
3148
|
-
function VeLivePushHelper_1() {
|
|
3149
|
-
}
|
|
3150
|
-
VeLivePushHelper_1.setPusher = function (viewId, pusher) {
|
|
3151
|
-
VeLivePushHelper.pusherMap.set(pusher, viewId);
|
|
3152
|
-
this.setVeLivePusher(viewId, pusher);
|
|
3153
|
-
};
|
|
3154
|
-
VeLivePushHelper_1.removePusher = function (pusher) {
|
|
3155
|
-
var viewId = VeLivePushHelper.pusherMap.get(pusher);
|
|
3156
|
-
if (viewId) {
|
|
3157
|
-
VeLivePushHelper.pusherMap.delete(pusher);
|
|
3158
|
-
this.removeVeLivePusher(viewId);
|
|
3159
|
-
}
|
|
3160
|
-
};
|
|
3161
|
-
VeLivePushHelper_1.setVeLivePusher = function (viewId, pusher) {
|
|
3162
|
-
throw new Error('');
|
|
3163
|
-
};
|
|
3164
|
-
VeLivePushHelper_1.removeVeLivePusher = function (viewId) {
|
|
3165
|
-
throw new Error('');
|
|
3166
|
-
};
|
|
3167
|
-
return VeLivePushHelper_1;
|
|
3168
|
-
}());
|
|
3169
|
-
__setFunctionName(_classThis, "VeLivePushHelper");
|
|
3170
|
-
(function () {
|
|
3171
|
-
var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
3172
|
-
_static_setVeLivePusher_decorators = [NativeStaticMethodSync()];
|
|
3173
|
-
_static_removeVeLivePusher_decorators = [NativeStaticMethodSync()];
|
|
3174
|
-
__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);
|
|
3175
|
-
__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);
|
|
3176
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
3177
|
-
VeLivePushHelper = _classThis = _classDescriptor.value;
|
|
3178
|
-
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
3179
|
-
})();
|
|
3180
|
-
_classThis.pusherMap = (__runInitializers(_classThis, _staticExtraInitializers), new WeakMap());
|
|
3181
|
-
(function () {
|
|
3182
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
3183
|
-
})();
|
|
3184
|
-
return VeLivePushHelper = _classThis;
|
|
3185
|
-
}();
|
|
3186
|
-
var VeLiveEffectHelper = function () {
|
|
3187
|
-
var _classDecorators = [NativeClass('com.volcengine.velive.rn.push.VeLiveEffectHelper')];
|
|
3188
|
-
var _classDescriptor;
|
|
3189
|
-
var _classExtraInitializers = [];
|
|
3190
|
-
var _classThis;
|
|
3191
|
-
var _staticExtraInitializers = [];
|
|
3192
|
-
var _static_getLicensePath_decorators;
|
|
3193
|
-
var _static_getModelPath_decorators;
|
|
3194
|
-
var _static_getBeautyPathByName_decorators;
|
|
3195
|
-
var _static_getStickerPathByName_decorators;
|
|
3196
|
-
var _static_getFilterPathByName_decorators;
|
|
3197
|
-
var _static_initVideoEffectResource_decorators;
|
|
3198
|
-
var _static_copyAssetFolder_decorators;
|
|
3199
|
-
_classThis = /** @class */ (function () {
|
|
3200
|
-
function VeLiveEffectHelper_1() {
|
|
3201
|
-
}
|
|
3202
|
-
VeLiveEffectHelper_1.getLicensePath = function (name) {
|
|
3203
|
-
throw new Error('');
|
|
3204
|
-
};
|
|
3205
|
-
VeLiveEffectHelper_1.getModelPath = function () {
|
|
3206
|
-
throw new Error('');
|
|
3207
|
-
};
|
|
3208
|
-
VeLiveEffectHelper_1.getBeautyPathByName = function (subPath) {
|
|
3209
|
-
throw new Error('');
|
|
3210
|
-
};
|
|
3211
|
-
VeLiveEffectHelper_1.getStickerPathByName = function (name) {
|
|
3212
|
-
throw new Error('');
|
|
3213
|
-
};
|
|
3214
|
-
VeLiveEffectHelper_1.getFilterPathByName = function (name) {
|
|
3215
|
-
throw new Error('');
|
|
3216
|
-
};
|
|
3217
|
-
VeLiveEffectHelper_1.initVideoEffectResource = function () {
|
|
3218
|
-
throw new Error('');
|
|
3219
|
-
};
|
|
3220
|
-
VeLiveEffectHelper_1.copyAssetFolder = function (context, srcName, dstName) {
|
|
3221
|
-
throw new Error('');
|
|
3222
|
-
};
|
|
3223
|
-
return VeLiveEffectHelper_1;
|
|
3224
|
-
}());
|
|
3225
|
-
__setFunctionName(_classThis, "VeLiveEffectHelper");
|
|
3226
|
-
(function () {
|
|
3227
|
-
var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
3228
|
-
_static_getLicensePath_decorators = [NativeStaticMethodSync()];
|
|
3229
|
-
_static_getModelPath_decorators = [NativeStaticMethodSync()];
|
|
3230
|
-
_static_getBeautyPathByName_decorators = [NativeStaticMethodSync()];
|
|
3231
|
-
_static_getStickerPathByName_decorators = [NativeStaticMethodSync()];
|
|
3232
|
-
_static_getFilterPathByName_decorators = [NativeStaticMethodSync()];
|
|
3233
|
-
_static_initVideoEffectResource_decorators = [NativeStaticMethodSync()];
|
|
3234
|
-
_static_copyAssetFolder_decorators = [NativeStaticMethodSync()];
|
|
3235
|
-
__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);
|
|
3236
|
-
__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);
|
|
3237
|
-
__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);
|
|
3238
|
-
__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);
|
|
3239
|
-
__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);
|
|
3240
|
-
__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);
|
|
3241
|
-
__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);
|
|
3242
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
3243
|
-
_classThis = _classDescriptor.value;
|
|
3244
|
-
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
3245
|
-
__runInitializers(_classThis, _staticExtraInitializers);
|
|
3246
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
3247
|
-
})();
|
|
3248
|
-
return _classThis;
|
|
3249
|
-
}();
|
|
3250
|
-
|
|
3251
|
-
var VeLivePushHelper = function () {
|
|
3252
|
-
var _classDecorators = [NativeClass('VeLivePushHelper')];
|
|
3253
|
-
var _classDescriptor;
|
|
3254
|
-
var _classExtraInitializers = [];
|
|
3255
|
-
var _classThis;
|
|
3256
|
-
var _staticExtraInitializers = [];
|
|
3257
|
-
var _static_setVeLivePusher_decorators;
|
|
3258
|
-
var _static_removeVeLivePusher_decorators;
|
|
3259
|
-
var _static_getResourcePath_decorators;
|
|
3260
|
-
var _static_startWithConfiguration_decorators;
|
|
3261
|
-
var VeLivePushHelper = _classThis = /** @class */ (function () {
|
|
3262
|
-
function VeLivePushHelper_1() {
|
|
3263
|
-
}
|
|
3264
|
-
VeLivePushHelper_1.setPusher = function (viewId, pusher) {
|
|
3265
|
-
VeLivePushHelper.pusherMap.set(pusher, viewId);
|
|
3266
|
-
this.setVeLivePusher(pusher, viewId);
|
|
3267
|
-
};
|
|
3268
|
-
VeLivePushHelper_1.removePusher = function (pusher) {
|
|
3269
|
-
var viewId = VeLivePushHelper.pusherMap.get(pusher);
|
|
3270
|
-
if (viewId) {
|
|
3271
|
-
VeLivePushHelper.pusherMap.delete(pusher);
|
|
3272
|
-
this.removeVeLivePusher(viewId);
|
|
3273
|
-
}
|
|
3274
|
-
};
|
|
3275
|
-
VeLivePushHelper_1.setVeLivePusher = function (pusher, viewId) {
|
|
3276
|
-
throw new Error('');
|
|
3277
|
-
};
|
|
3278
|
-
VeLivePushHelper_1.removeVeLivePusher = function (viewId) {
|
|
3279
|
-
throw new Error('');
|
|
3280
|
-
};
|
|
3281
|
-
VeLivePushHelper_1.getResourcePath = function (subPath) {
|
|
3282
|
-
throw new Error('');
|
|
3283
|
-
};
|
|
3284
|
-
VeLivePushHelper_1.startWithConfiguration = function (cfg) {
|
|
3285
|
-
//
|
|
3286
|
-
};
|
|
3287
|
-
return VeLivePushHelper_1;
|
|
3288
|
-
}());
|
|
3289
|
-
__setFunctionName(_classThis, "VeLivePushHelper");
|
|
3290
|
-
(function () {
|
|
3291
|
-
var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
3292
|
-
_static_setVeLivePusher_decorators = [NativeStaticMethodSync('setVeLivePusher:forKey:')];
|
|
3293
|
-
_static_removeVeLivePusher_decorators = [NativeStaticMethodSync('removeVeLivePusher:')];
|
|
3294
|
-
_static_getResourcePath_decorators = [NativeStaticMethodSync('getResourcePath:')];
|
|
3295
|
-
_static_startWithConfiguration_decorators = [NativeStaticMethodSync('startWithConfiguration:')];
|
|
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);
|
|
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);
|
|
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);
|
|
3300
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
3301
|
-
VeLivePushHelper = _classThis = _classDescriptor.value;
|
|
3302
|
-
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
3303
|
-
})();
|
|
3304
|
-
_classThis.pusherMap = (__runInitializers(_classThis, _staticExtraInitializers), new WeakMap());
|
|
3305
|
-
(function () {
|
|
3306
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
3307
|
-
})();
|
|
3308
|
-
return VeLivePushHelper = _classThis;
|
|
3309
|
-
}();
|
|
3265
|
+
default:
|
|
3266
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
3267
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
3268
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
3269
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
3270
|
+
if (t[2]) _.ops.pop();
|
|
3271
|
+
_.trys.pop(); continue;
|
|
3272
|
+
}
|
|
3273
|
+
op = body.call(thisArg, _);
|
|
3274
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
3275
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
3276
|
+
}
|
|
3277
|
+
}
|
|
3278
|
+
|
|
3279
|
+
function __spreadArray(to, from, pack) {
|
|
3280
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3281
|
+
if (ar || !(i in from)) {
|
|
3282
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
3283
|
+
ar[i] = from[i];
|
|
3284
|
+
}
|
|
3285
|
+
}
|
|
3286
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
3287
|
+
}
|
|
3288
|
+
|
|
3289
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
3290
|
+
var e = new Error(message);
|
|
3291
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
3292
|
+
};
|
|
3310
3293
|
|
|
3311
3294
|
var VeLiveVideoEncoderConfiguration$2 = function () {
|
|
3312
3295
|
var _classDecorators = [NativeClass('com.ss.avframework.live.VeLivePusherDef$VeLiveVideoEncoderConfiguration')];
|
|
@@ -15214,6 +15197,234 @@ var NativeUIView = function () {
|
|
|
15214
15197
|
return UIView;
|
|
15215
15198
|
})(NativeUIView));
|
|
15216
15199
|
|
|
15200
|
+
var _isNewArch;
|
|
15201
|
+
function runImpl(context, androidImpl, iosImpl) {
|
|
15202
|
+
if (env.getOS() === 'android') {
|
|
15203
|
+
var androidEngine = unpackObject(context);
|
|
15204
|
+
return androidImpl(androidEngine);
|
|
15205
|
+
}
|
|
15206
|
+
else if (env.getOS() === 'ios') {
|
|
15207
|
+
var iosEngine = unpackObject(context);
|
|
15208
|
+
return iosImpl(iosEngine);
|
|
15209
|
+
}
|
|
15210
|
+
else {
|
|
15211
|
+
throw new Error("not support: ".concat(env.getOS()));
|
|
15212
|
+
}
|
|
15213
|
+
}
|
|
15214
|
+
function isNewArch() {
|
|
15215
|
+
if (_isNewArch !== undefined) {
|
|
15216
|
+
return _isNewArch;
|
|
15217
|
+
}
|
|
15218
|
+
else {
|
|
15219
|
+
try {
|
|
15220
|
+
// Check for Fabric UI Manager
|
|
15221
|
+
var hasFabricUIManager = Boolean(global === null || global === void 0 ? void 0 : global.nativeFabricUIManager);
|
|
15222
|
+
// Check for TurboModule system
|
|
15223
|
+
var hasTurboModule = Boolean(global === null || global === void 0 ? void 0 : global.__turboModuleProxy);
|
|
15224
|
+
_isNewArch = hasFabricUIManager || hasTurboModule;
|
|
15225
|
+
}
|
|
15226
|
+
catch (_a) {
|
|
15227
|
+
_isNewArch = true;
|
|
15228
|
+
}
|
|
15229
|
+
}
|
|
15230
|
+
return _isNewArch;
|
|
15231
|
+
}
|
|
15232
|
+
|
|
15233
|
+
var isTurboModuleEnabled = isNewArch();
|
|
15234
|
+
var VeLivePush = isTurboModuleEnabled
|
|
15235
|
+
? NativeVeLivePush
|
|
15236
|
+
: NativeModules.VeLivePush;
|
|
15237
|
+
|
|
15238
|
+
var VolcView = requireNativeComponent('VeLivePushView');
|
|
15239
|
+
var NativeViewComponent = /** @class */ (function (_super) {
|
|
15240
|
+
__extends(NativeViewComponent, _super);
|
|
15241
|
+
function NativeViewComponent() {
|
|
15242
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
15243
|
+
}
|
|
15244
|
+
NativeViewComponent.prototype.render = function () {
|
|
15245
|
+
var _a = this.props, viewId = _a.viewId, kind = _a.kind, children = _a.children, style = _a.style, onLoad = _a.onLoad;
|
|
15246
|
+
return React.createElement(VolcView, {
|
|
15247
|
+
viewId: viewId,
|
|
15248
|
+
kind: kind,
|
|
15249
|
+
style: style,
|
|
15250
|
+
onViewLoad: onLoad,
|
|
15251
|
+
}, children);
|
|
15252
|
+
};
|
|
15253
|
+
return NativeViewComponent;
|
|
15254
|
+
}(React.Component));
|
|
15255
|
+
|
|
15256
|
+
var VeLivePushHelper$1 = function () {
|
|
15257
|
+
var _classDecorators = [NativeClass('com.volcengine.velive.rn.push.VeLivePushHelper')];
|
|
15258
|
+
var _classDescriptor;
|
|
15259
|
+
var _classExtraInitializers = [];
|
|
15260
|
+
var _classThis;
|
|
15261
|
+
var _staticExtraInitializers = [];
|
|
15262
|
+
var _static_setVeLivePusher_decorators;
|
|
15263
|
+
var _static_removeVeLivePusher_decorators;
|
|
15264
|
+
var VeLivePushHelper = _classThis = /** @class */ (function () {
|
|
15265
|
+
function VeLivePushHelper_1() {
|
|
15266
|
+
}
|
|
15267
|
+
VeLivePushHelper_1.setPusher = function (viewId, pusher) {
|
|
15268
|
+
VeLivePushHelper.pusherMap.set(pusher, viewId);
|
|
15269
|
+
this.setVeLivePusher(viewId, pusher);
|
|
15270
|
+
};
|
|
15271
|
+
VeLivePushHelper_1.removePusher = function (pusher) {
|
|
15272
|
+
var viewId = VeLivePushHelper.pusherMap.get(pusher);
|
|
15273
|
+
if (viewId) {
|
|
15274
|
+
VeLivePushHelper.pusherMap.delete(pusher);
|
|
15275
|
+
this.removeVeLivePusher(viewId);
|
|
15276
|
+
}
|
|
15277
|
+
};
|
|
15278
|
+
VeLivePushHelper_1.setVeLivePusher = function (viewId, pusher) {
|
|
15279
|
+
throw new Error('');
|
|
15280
|
+
};
|
|
15281
|
+
VeLivePushHelper_1.removeVeLivePusher = function (viewId) {
|
|
15282
|
+
throw new Error('');
|
|
15283
|
+
};
|
|
15284
|
+
return VeLivePushHelper_1;
|
|
15285
|
+
}());
|
|
15286
|
+
__setFunctionName(_classThis, "VeLivePushHelper");
|
|
15287
|
+
(function () {
|
|
15288
|
+
var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
15289
|
+
_static_setVeLivePusher_decorators = [NativeStaticMethodSync()];
|
|
15290
|
+
_static_removeVeLivePusher_decorators = [NativeStaticMethodSync()];
|
|
15291
|
+
__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);
|
|
15292
|
+
__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);
|
|
15293
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
15294
|
+
VeLivePushHelper = _classThis = _classDescriptor.value;
|
|
15295
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
15296
|
+
})();
|
|
15297
|
+
_classThis.pusherMap = (__runInitializers(_classThis, _staticExtraInitializers), new WeakMap());
|
|
15298
|
+
(function () {
|
|
15299
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
15300
|
+
})();
|
|
15301
|
+
return VeLivePushHelper = _classThis;
|
|
15302
|
+
}();
|
|
15303
|
+
var VeLiveEffectHelper = function () {
|
|
15304
|
+
var _classDecorators = [NativeClass('com.volcengine.velive.rn.push.VeLiveEffectHelper')];
|
|
15305
|
+
var _classDescriptor;
|
|
15306
|
+
var _classExtraInitializers = [];
|
|
15307
|
+
var _classThis;
|
|
15308
|
+
var _staticExtraInitializers = [];
|
|
15309
|
+
var _static_getLicensePath_decorators;
|
|
15310
|
+
var _static_getModelPath_decorators;
|
|
15311
|
+
var _static_getBeautyPathByName_decorators;
|
|
15312
|
+
var _static_getStickerPathByName_decorators;
|
|
15313
|
+
var _static_getFilterPathByName_decorators;
|
|
15314
|
+
var _static_initVideoEffectResource_decorators;
|
|
15315
|
+
var _static_copyAssetFolder_decorators;
|
|
15316
|
+
_classThis = /** @class */ (function () {
|
|
15317
|
+
function VeLiveEffectHelper_1() {
|
|
15318
|
+
}
|
|
15319
|
+
VeLiveEffectHelper_1.getLicensePath = function (name) {
|
|
15320
|
+
throw new Error('');
|
|
15321
|
+
};
|
|
15322
|
+
VeLiveEffectHelper_1.getModelPath = function () {
|
|
15323
|
+
throw new Error('');
|
|
15324
|
+
};
|
|
15325
|
+
VeLiveEffectHelper_1.getBeautyPathByName = function (subPath) {
|
|
15326
|
+
throw new Error('');
|
|
15327
|
+
};
|
|
15328
|
+
VeLiveEffectHelper_1.getStickerPathByName = function (name) {
|
|
15329
|
+
throw new Error('');
|
|
15330
|
+
};
|
|
15331
|
+
VeLiveEffectHelper_1.getFilterPathByName = function (name) {
|
|
15332
|
+
throw new Error('');
|
|
15333
|
+
};
|
|
15334
|
+
VeLiveEffectHelper_1.initVideoEffectResource = function () {
|
|
15335
|
+
throw new Error('');
|
|
15336
|
+
};
|
|
15337
|
+
VeLiveEffectHelper_1.copyAssetFolder = function (context, srcName, dstName) {
|
|
15338
|
+
throw new Error('');
|
|
15339
|
+
};
|
|
15340
|
+
return VeLiveEffectHelper_1;
|
|
15341
|
+
}());
|
|
15342
|
+
__setFunctionName(_classThis, "VeLiveEffectHelper");
|
|
15343
|
+
(function () {
|
|
15344
|
+
var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
15345
|
+
_static_getLicensePath_decorators = [NativeStaticMethodSync()];
|
|
15346
|
+
_static_getModelPath_decorators = [NativeStaticMethodSync()];
|
|
15347
|
+
_static_getBeautyPathByName_decorators = [NativeStaticMethodSync()];
|
|
15348
|
+
_static_getStickerPathByName_decorators = [NativeStaticMethodSync()];
|
|
15349
|
+
_static_getFilterPathByName_decorators = [NativeStaticMethodSync()];
|
|
15350
|
+
_static_initVideoEffectResource_decorators = [NativeStaticMethodSync()];
|
|
15351
|
+
_static_copyAssetFolder_decorators = [NativeStaticMethodSync()];
|
|
15352
|
+
__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);
|
|
15353
|
+
__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);
|
|
15354
|
+
__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);
|
|
15355
|
+
__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);
|
|
15356
|
+
__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);
|
|
15357
|
+
__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);
|
|
15358
|
+
__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);
|
|
15359
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
15360
|
+
_classThis = _classDescriptor.value;
|
|
15361
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
15362
|
+
__runInitializers(_classThis, _staticExtraInitializers);
|
|
15363
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
15364
|
+
})();
|
|
15365
|
+
return _classThis;
|
|
15366
|
+
}();
|
|
15367
|
+
|
|
15368
|
+
var VeLivePushHelper = function () {
|
|
15369
|
+
var _classDecorators = [NativeClass('VeLivePushHelper')];
|
|
15370
|
+
var _classDescriptor;
|
|
15371
|
+
var _classExtraInitializers = [];
|
|
15372
|
+
var _classThis;
|
|
15373
|
+
var _staticExtraInitializers = [];
|
|
15374
|
+
var _static_setVeLivePusher_decorators;
|
|
15375
|
+
var _static_removeVeLivePusher_decorators;
|
|
15376
|
+
var _static_getResourcePath_decorators;
|
|
15377
|
+
var _static_startWithConfiguration_decorators;
|
|
15378
|
+
var VeLivePushHelper = _classThis = /** @class */ (function () {
|
|
15379
|
+
function VeLivePushHelper_1() {
|
|
15380
|
+
}
|
|
15381
|
+
VeLivePushHelper_1.setPusher = function (viewId, pusher) {
|
|
15382
|
+
VeLivePushHelper.pusherMap.set(pusher, viewId);
|
|
15383
|
+
this.setVeLivePusher(pusher, viewId);
|
|
15384
|
+
};
|
|
15385
|
+
VeLivePushHelper_1.removePusher = function (pusher) {
|
|
15386
|
+
var viewId = VeLivePushHelper.pusherMap.get(pusher);
|
|
15387
|
+
if (viewId) {
|
|
15388
|
+
VeLivePushHelper.pusherMap.delete(pusher);
|
|
15389
|
+
this.removeVeLivePusher(viewId);
|
|
15390
|
+
}
|
|
15391
|
+
};
|
|
15392
|
+
VeLivePushHelper_1.setVeLivePusher = function (pusher, viewId) {
|
|
15393
|
+
throw new Error('');
|
|
15394
|
+
};
|
|
15395
|
+
VeLivePushHelper_1.removeVeLivePusher = function (viewId) {
|
|
15396
|
+
throw new Error('');
|
|
15397
|
+
};
|
|
15398
|
+
VeLivePushHelper_1.getResourcePath = function (subPath) {
|
|
15399
|
+
throw new Error('');
|
|
15400
|
+
};
|
|
15401
|
+
VeLivePushHelper_1.startWithConfiguration = function (cfg) {
|
|
15402
|
+
//
|
|
15403
|
+
};
|
|
15404
|
+
return VeLivePushHelper_1;
|
|
15405
|
+
}());
|
|
15406
|
+
__setFunctionName(_classThis, "VeLivePushHelper");
|
|
15407
|
+
(function () {
|
|
15408
|
+
var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
15409
|
+
_static_setVeLivePusher_decorators = [NativeStaticMethodSync('setVeLivePusher:forKey:')];
|
|
15410
|
+
_static_removeVeLivePusher_decorators = [NativeStaticMethodSync('removeVeLivePusher:')];
|
|
15411
|
+
_static_getResourcePath_decorators = [NativeStaticMethodSync('getResourcePath:')];
|
|
15412
|
+
_static_startWithConfiguration_decorators = [NativeStaticMethodSync('startWithConfiguration:')];
|
|
15413
|
+
__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);
|
|
15414
|
+
__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);
|
|
15415
|
+
__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);
|
|
15416
|
+
__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);
|
|
15417
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
15418
|
+
VeLivePushHelper = _classThis = _classDescriptor.value;
|
|
15419
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
15420
|
+
})();
|
|
15421
|
+
_classThis.pusherMap = (__runInitializers(_classThis, _staticExtraInitializers), new WeakMap());
|
|
15422
|
+
(function () {
|
|
15423
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
15424
|
+
})();
|
|
15425
|
+
return VeLivePushHelper = _classThis;
|
|
15426
|
+
}();
|
|
15427
|
+
|
|
15217
15428
|
/** {zh}
|
|
15218
15429
|
* @detail keytype
|
|
15219
15430
|
* @brief 推流本地文件录制配置。
|
|
@@ -26185,20 +26396,6 @@ var VeLiveMixerManager = function () {
|
|
|
26185
26396
|
return _classThis;
|
|
26186
26397
|
}();
|
|
26187
26398
|
|
|
26188
|
-
function runImpl(context, androidImpl, iosImpl) {
|
|
26189
|
-
if (env.getOS() === 'android') {
|
|
26190
|
-
var androidEngine = unpackObject(context);
|
|
26191
|
-
return androidImpl(androidEngine);
|
|
26192
|
-
}
|
|
26193
|
-
else if (env.getOS() === 'ios') {
|
|
26194
|
-
var iosEngine = unpackObject(context);
|
|
26195
|
-
return iosImpl(iosEngine);
|
|
26196
|
-
}
|
|
26197
|
-
else {
|
|
26198
|
-
throw new Error("not support: ".concat(env.getOS()));
|
|
26199
|
-
}
|
|
26200
|
-
}
|
|
26201
|
-
|
|
26202
26399
|
extendsClassMethod(VeLivePusher, 'getMixerManager', function (origin) {
|
|
26203
26400
|
return function getMixerManager() {
|
|
26204
26401
|
if (Reflect.get(this, '__mixerManager')) {
|
|
@@ -26288,7 +26485,7 @@ extendsClassMethod(VeLivePusher, 'setVideoFrameFilter', function () {
|
|
|
26288
26485
|
extendsClassMethod(VeLivePusher, 'destroy', function (superFn) {
|
|
26289
26486
|
return function destroy() {
|
|
26290
26487
|
superFn();
|
|
26291
|
-
|
|
26488
|
+
VeLivePush.destroyApiEngine();
|
|
26292
26489
|
};
|
|
26293
26490
|
});
|
|
26294
26491
|
|
|
@@ -26628,7 +26825,7 @@ function initAndroidEnv(config) {
|
|
|
26628
26825
|
.setLicenseUri(config.LicenseUri.android);
|
|
26629
26826
|
androidEnv = builder.build();
|
|
26630
26827
|
EnvHelper.init(androidEnv, {
|
|
26631
|
-
hybrid_ua: "rn|push|".concat("1.
|
|
26828
|
+
hybrid_ua: "rn|push|".concat("1.5.0"),
|
|
26632
26829
|
});
|
|
26633
26830
|
Env.openAppLog(config.openLog);
|
|
26634
26831
|
TTNetManager.initTTNet(context);
|
|
@@ -26640,7 +26837,7 @@ function initAndroidEnv(config) {
|
|
|
26640
26837
|
function initIOSEnv(config) {
|
|
26641
26838
|
return __awaiter(this, void 0, void 0, function () {
|
|
26642
26839
|
return __generator(this, function (_a) {
|
|
26643
|
-
VeLivePushHelper.startWithConfiguration(__assign(__assign({}, config), { LicenseUri: config.LicenseUri.ios, appLogAid: '500808' , hybrid_ua: "rn|push|".concat("1.
|
|
26840
|
+
VeLivePushHelper.startWithConfiguration(__assign(__assign({}, config), { LicenseUri: config.LicenseUri.ios, appLogAid: '500808' , hybrid_ua: "rn|push|".concat("1.5.0") }));
|
|
26644
26841
|
return [2 /*return*/];
|
|
26645
26842
|
});
|
|
26646
26843
|
});
|
|
@@ -27275,7 +27472,14 @@ var VeWebView = React.forwardRef(function (props, ref) {
|
|
|
27275
27472
|
return (jsx(MixView, { renderMode: renderMode, captureMode: captureMode, captureFramerate: captureFramerate, viewId: viewId, onViewMount: onViewMount, onViewUnmount: onViewUnmount, children: jsx(View, __assign({}, viewProps, { ref: ref })) }));
|
|
27276
27473
|
});
|
|
27277
27474
|
|
|
27278
|
-
|
|
27475
|
+
if (isTurboModuleEnabled) {
|
|
27476
|
+
console.log('[VeLivePush TurboModule Enable]', VeLivePush);
|
|
27477
|
+
setupJSBridge(new ReactNativeTurboBridge(VeLivePush, 'VeLivePush:onEvent'));
|
|
27478
|
+
}
|
|
27479
|
+
else {
|
|
27480
|
+
console.log('[VeLivePush NativeModule Enable]', NativeModules.VeLivePush);
|
|
27481
|
+
setupJSBridge(new ReactNativeBridge(VeLivePush, 'VeLivePush:onEvent'));
|
|
27482
|
+
}
|
|
27279
27483
|
setupEnv(new ReactNativeEnv());
|
|
27280
27484
|
|
|
27281
|
-
export { LogLevel, MixView, NativeMixView, NativeViewComponent, ReactNativeBridge, ReactNativeEnv, VeImageView, VeLiveAudioBufferType, VeLiveAudioCaptureConfiguration, VeLiveAudioCaptureType, VeLiveAudioChannel, VeLiveAudioDevice, VeLiveAudioEncoderConfiguration, VeLiveAudioFrame, VeLiveAudioFrameSource, VeLiveAudioMixType, VeLiveAudioPowerLevel, VeLiveAudioProfile, VeLiveAudioSampleRate, VeLiveCameraDevice, VeLiveFileRecorderConfiguration, VeLiveFirstFrameType, VeLiveMediaPlayer, VeLiveMixAudioLayout, VeLiveMixVideoLayout, VeLiveNetworkQuality, VeLiveOrientation, VeLivePixelFormat, VeLivePusher, VeLivePusherConfiguration, VeLivePusherErrorCode, VeLivePusherLogLevel, VeLivePusherRenderMode, VeLivePusherStatistics, VeLivePusherStatus, VeLiveStreamMixDescription, VeLiveVideoBufferType, VeLiveVideoCaptureConfiguration, VeLiveVideoCaptureType, VeLiveVideoCodec, VeLiveVideoEffectLicenseConfiguration, VeLiveVideoEffectLicenseType, VeLiveVideoEffectManager, VeLiveVideoEncoderConfiguration, VeLiveVideoFrame, VeLiveVideoFrameSource, VeLiveVideoMirrorType, VeLiveVideoResolution, VeLiveVideoRotation, VeTextView, VeView, VeWebView, android_VeLiveAudioFrameFilter, android_VeLiveAudioFrameListener, android_VeLiveFileRecordingListener, android_VeLiveMediaPlayerFrameListener, android_VeLiveMediaPlayerListener, android_VeLivePusherObserver, android_VeLivePusherStatisticsObserver, android_VeLiveSnapshotListener, android_VeLiveVideoFrameFilter, android_VeLiveVideoFrameListener, initEnv, initPusher, initVideoEffectResource, ios_VeLiveAudioFrameFilter, ios_VeLiveAudioFrameListener, ios_VeLiveFileRecordingListener, ios_VeLiveMediaPlayerFrameListener, ios_VeLiveMediaPlayerListener, ios_VeLivePusherObserver, ios_VeLivePusherStatisticsObserver, ios_VeLiveSnapshotListener, ios_VeLiveVideoFrameFilter, ios_VeLiveVideoFrameListener, relaunchPusher, setupLogger };
|
|
27485
|
+
export { CALL_TYPE, LogLevel, MixView, NativeMixView, NativeViewComponent, ReactNativeBridge, ReactNativeEnv, ReactNativeTurboBridge, VeImageView, VeLiveAudioBufferType, VeLiveAudioCaptureConfiguration, VeLiveAudioCaptureType, VeLiveAudioChannel, VeLiveAudioDevice, VeLiveAudioEncoderConfiguration, VeLiveAudioFrame, VeLiveAudioFrameSource, VeLiveAudioMixType, VeLiveAudioPowerLevel, VeLiveAudioProfile, VeLiveAudioSampleRate, VeLiveCameraDevice, VeLiveFileRecorderConfiguration, VeLiveFirstFrameType, VeLiveMediaPlayer, VeLiveMixAudioLayout, VeLiveMixVideoLayout, VeLiveNetworkQuality, VeLiveOrientation, VeLivePixelFormat, NativeVeLivePush as VeLivePush, VeLivePusher, VeLivePusherConfiguration, VeLivePusherErrorCode, VeLivePusherLogLevel, VeLivePusherRenderMode, VeLivePusherStatistics, VeLivePusherStatus, VeLiveStreamMixDescription, VeLiveVideoBufferType, VeLiveVideoCaptureConfiguration, VeLiveVideoCaptureType, VeLiveVideoCodec, VeLiveVideoEffectLicenseConfiguration, VeLiveVideoEffectLicenseType, VeLiveVideoEffectManager, VeLiveVideoEncoderConfiguration, VeLiveVideoFrame, VeLiveVideoFrameSource, VeLiveVideoMirrorType, VeLiveVideoResolution, VeLiveVideoRotation, VeTextView, VeView, VeWebView, android_VeLiveAudioFrameFilter, android_VeLiveAudioFrameListener, android_VeLiveFileRecordingListener, android_VeLiveMediaPlayerFrameListener, android_VeLiveMediaPlayerListener, android_VeLivePusherObserver, android_VeLivePusherStatisticsObserver, android_VeLiveSnapshotListener, android_VeLiveVideoFrameFilter, android_VeLiveVideoFrameListener, initEnv, initPusher, initVideoEffectResource, ios_VeLiveAudioFrameFilter, ios_VeLiveAudioFrameListener, ios_VeLiveFileRecordingListener, ios_VeLiveMediaPlayerFrameListener, ios_VeLiveMediaPlayerListener, ios_VeLivePusherObserver, ios_VeLivePusherStatisticsObserver, ios_VeLiveSnapshotListener, ios_VeLiveVideoFrameFilter, ios_VeLiveVideoFrameListener, relaunchPusher, setupLogger };
|