@byteplus/react-native-live-push 1.3.0-rc.1 → 1.3.0-rc.11
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 +37 -2
- package/ios/VeLivePushHelper.m +1 -1
- package/ios/VeLivePushSDK.m +4 -4
- package/lib/commonjs/index.js +76 -35
- package/lib/commonjs/typescript/index.d.ts +2 -0
- package/lib/module/index.js +62 -24
- package/lib/module/typescript/index.d.ts +2 -0
- package/lib/typescript/index.d.ts +2 -0
- package/package.json +11 -1
- package/react-native-velive-push.podspec +10 -3
package/android/build.gradle
CHANGED
|
@@ -13,6 +13,41 @@ def isNewArchitectureEnabled() {
|
|
|
13
13
|
return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
// Version configuration through environment variables or gradle properties
|
|
17
|
+
def ttsdk_ttlivepush_rtc_version
|
|
18
|
+
def envVersion = System.getenv('TTSDK_TTLIVEPUSH_RTC_VERSION_FOR_LIVE_PUSH')
|
|
19
|
+
if (envVersion) {
|
|
20
|
+
ttsdk_ttlivepush_rtc_version = envVersion
|
|
21
|
+
} else if (rootProject.hasProperty('TTSDK_TTLIVEPUSH_RTC_VERSION_FOR_LIVE_PUSH')) {
|
|
22
|
+
ttsdk_ttlivepush_rtc_version = rootProject.property('TTSDK_TTLIVEPUSH_RTC_VERSION_FOR_LIVE_PUSH')
|
|
23
|
+
} else {
|
|
24
|
+
// Fallback to versions from package.json
|
|
25
|
+
def packageJson = file("../package.json")
|
|
26
|
+
def slurper = new groovy.json.JsonSlurper()
|
|
27
|
+
def parsedJson = slurper.parseText(packageJson.text)
|
|
28
|
+
def isBp = parsedJson.name.startsWith("@byteplus")
|
|
29
|
+
|
|
30
|
+
if (isBp) {
|
|
31
|
+
ttsdk_ttlivepush_rtc_version = parsedJson.nativeVersion.byteplus.android
|
|
32
|
+
} else {
|
|
33
|
+
ttsdk_ttlivepush_rtc_version = parsedJson.nativeVersion.volc.android
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// VolcApiEngine version configuration
|
|
38
|
+
def volc_api_engine_version
|
|
39
|
+
def volcApiEnvVersion = System.getenv('VOLC_API_ENGINE_VERSION_FOR_LIVE_PUSH')
|
|
40
|
+
if (volcApiEnvVersion) {
|
|
41
|
+
volc_api_engine_version = volcApiEnvVersion
|
|
42
|
+
} else if (rootProject.hasProperty('VOLC_API_ENGINE_VERSION_FOR_LIVE_PUSH')) {
|
|
43
|
+
volc_api_engine_version = rootProject.property('VOLC_API_ENGINE_VERSION_FOR_LIVE_PUSH')
|
|
44
|
+
} else {
|
|
45
|
+
volc_api_engine_version = "1.6.4" // Default version
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
println "[LIVE PUSH GRADLE INFO]: Using ttsdk_ttlivepush_rtc version: $ttsdk_ttlivepush_rtc_version"
|
|
49
|
+
println "[LIVE PUSH GRADLE INFO]: Using volc_api_engine version: $volc_api_engine_version"
|
|
50
|
+
|
|
16
51
|
apply plugin: "com.android.library"
|
|
17
52
|
apply from: "https://ve-vos.volccdn.com/script/vevos-repo-base.gradle"
|
|
18
53
|
|
|
@@ -87,6 +122,6 @@ dependencies {
|
|
|
87
122
|
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
|
|
88
123
|
//noinspection GradleDynamicVersion
|
|
89
124
|
implementation "com.facebook.react:react-native:+"
|
|
90
|
-
implementation "com.volcengine:VolcApiEngine
|
|
91
|
-
api
|
|
125
|
+
implementation "com.volcengine:VolcApiEngine:$volc_api_engine_version"
|
|
126
|
+
api "com.bytedanceapi:ttsdk-ttlivepush_rtc:$ttsdk_ttlivepush_rtc_version"
|
|
92
127
|
}
|
package/ios/VeLivePushHelper.m
CHANGED
|
@@ -42,7 +42,7 @@ static NSMapTable<NSString *, VeLivePusher *> *pusherMap;
|
|
|
42
42
|
|
|
43
43
|
+ (nullable NSString *)getResourcePath:(NSString *)subPath {
|
|
44
44
|
if (!subPath) {
|
|
45
|
-
return
|
|
45
|
+
return NSBundle.mainBundle.bundlePath;
|
|
46
46
|
}
|
|
47
47
|
return [NSBundle.mainBundle pathForResource:subPath ofType:nil];
|
|
48
48
|
}
|
package/ios/VeLivePushSDK.m
CHANGED
|
@@ -37,10 +37,10 @@ static RCTVeLivePushModule *instance = nil;
|
|
|
37
37
|
return YES;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
+ (void)_unsedForKeepOnly {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
40
|
+
// + (void)_unsedForKeepOnly {
|
|
41
|
+
// Protocol *unused = @protocol(VeLivePlayerObserver);
|
|
42
|
+
// NSLog(@"Loaded Protocol: %p", unused);
|
|
43
|
+
// }
|
|
44
44
|
|
|
45
45
|
- (dispatch_queue_t)methodQueue {
|
|
46
46
|
return dispatch_get_main_queue();
|
package/lib/commonjs/index.js
CHANGED
|
@@ -702,18 +702,18 @@ var Bind = function (target, context) {
|
|
|
702
702
|
return target;
|
|
703
703
|
};
|
|
704
704
|
|
|
705
|
-
|
|
705
|
+
exports.LogLevel = void 0;
|
|
706
706
|
(function (LogLevel) {
|
|
707
707
|
LogLevel[LogLevel["DEBUG"] = 0] = "DEBUG";
|
|
708
708
|
LogLevel[LogLevel["INFO"] = 1] = "INFO";
|
|
709
709
|
LogLevel[LogLevel["WARN"] = 2] = "WARN";
|
|
710
710
|
LogLevel[LogLevel["ERROR"] = 3] = "ERROR";
|
|
711
711
|
LogLevel[LogLevel["NONE"] = 999] = "NONE";
|
|
712
|
-
})(LogLevel || (LogLevel = {}));
|
|
712
|
+
})(exports.LogLevel || (exports.LogLevel = {}));
|
|
713
713
|
|
|
714
714
|
var LoggerImpl = /** @class */ (function () {
|
|
715
715
|
function LoggerImpl() {
|
|
716
|
-
this._logLevel = LogLevel.WARN;
|
|
716
|
+
this._logLevel = exports.LogLevel.WARN;
|
|
717
717
|
this._consumers = [];
|
|
718
718
|
}
|
|
719
719
|
LoggerImpl.getInstance = function () {
|
|
@@ -796,16 +796,16 @@ var LoggerImpl = /** @class */ (function () {
|
|
|
796
796
|
}); });
|
|
797
797
|
// 控制台输出
|
|
798
798
|
switch (level) {
|
|
799
|
-
case LogLevel.ERROR:
|
|
799
|
+
case exports.LogLevel.ERROR:
|
|
800
800
|
console.error("".concat(timestamp, " ").concat(message));
|
|
801
801
|
break;
|
|
802
|
-
case LogLevel.WARN:
|
|
802
|
+
case exports.LogLevel.WARN:
|
|
803
803
|
console.warn("".concat(timestamp, " ").concat(message));
|
|
804
804
|
break;
|
|
805
|
-
case LogLevel.INFO:
|
|
805
|
+
case exports.LogLevel.INFO:
|
|
806
806
|
console.log("".concat(timestamp, " ").concat(message));
|
|
807
807
|
break;
|
|
808
|
-
case LogLevel.DEBUG:
|
|
808
|
+
case exports.LogLevel.DEBUG:
|
|
809
809
|
console.debug("".concat(timestamp, " ").concat(message));
|
|
810
810
|
break;
|
|
811
811
|
}
|
|
@@ -815,28 +815,28 @@ var LoggerImpl = /** @class */ (function () {
|
|
|
815
815
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
816
816
|
args[_i] = arguments[_i];
|
|
817
817
|
}
|
|
818
|
-
this._log(LogLevel.DEBUG, args);
|
|
818
|
+
this._log(exports.LogLevel.DEBUG, args);
|
|
819
819
|
};
|
|
820
820
|
LoggerImpl.prototype.info = function () {
|
|
821
821
|
var args = [];
|
|
822
822
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
823
823
|
args[_i] = arguments[_i];
|
|
824
824
|
}
|
|
825
|
-
this._log(LogLevel.INFO, args);
|
|
825
|
+
this._log(exports.LogLevel.INFO, args);
|
|
826
826
|
};
|
|
827
827
|
LoggerImpl.prototype.warn = function () {
|
|
828
828
|
var args = [];
|
|
829
829
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
830
830
|
args[_i] = arguments[_i];
|
|
831
831
|
}
|
|
832
|
-
this._log(LogLevel.WARN, args);
|
|
832
|
+
this._log(exports.LogLevel.WARN, args);
|
|
833
833
|
};
|
|
834
834
|
LoggerImpl.prototype.error = function () {
|
|
835
835
|
var args = [];
|
|
836
836
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
837
837
|
args[_i] = arguments[_i];
|
|
838
838
|
}
|
|
839
|
-
this._log(LogLevel.ERROR, args);
|
|
839
|
+
this._log(exports.LogLevel.ERROR, args);
|
|
840
840
|
};
|
|
841
841
|
LoggerImpl.MAX_LOG_LENGTH = 4096;
|
|
842
842
|
return LoggerImpl;
|
|
@@ -1457,12 +1457,12 @@ var NativeLoggerManager = function () {
|
|
|
1457
1457
|
return InstanceManager;
|
|
1458
1458
|
})());
|
|
1459
1459
|
|
|
1460
|
-
/** @class */ (
|
|
1460
|
+
var LoggerManager = /** @class */ (function () {
|
|
1461
1461
|
function LoggerManager() {
|
|
1462
1462
|
}
|
|
1463
1463
|
LoggerManager.setLogLevel = function (level) {
|
|
1464
1464
|
this.logger.setLogLevel(level);
|
|
1465
|
-
this.logger.debug('[logger-manager] setLogLevel', LogLevel[level]);
|
|
1465
|
+
this.logger.debug('[logger-manager] setLogLevel', exports.LogLevel[level]);
|
|
1466
1466
|
if (getOS() === 'android') {
|
|
1467
1467
|
NativeLoggerManager$1.setLogLevel(level);
|
|
1468
1468
|
}
|
|
@@ -1475,9 +1475,17 @@ var NativeLoggerManager = function () {
|
|
|
1475
1475
|
};
|
|
1476
1476
|
LoggerManager.logger = LoggerImpl.getInstance();
|
|
1477
1477
|
return LoggerManager;
|
|
1478
|
-
}
|
|
1478
|
+
}());
|
|
1479
1479
|
|
|
1480
1480
|
var logger = LoggerImpl.getInstance();
|
|
1481
|
+
function setupLogger(opt) {
|
|
1482
|
+
if (opt.level !== undefined) {
|
|
1483
|
+
LoggerManager.setLogLevel(opt.level);
|
|
1484
|
+
}
|
|
1485
|
+
if (opt.customer !== undefined) {
|
|
1486
|
+
logger.registerConsumer(opt.customer);
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1481
1489
|
|
|
1482
1490
|
var ApiCallSpan = /** @class */ (function () {
|
|
1483
1491
|
function ApiCallSpan(tracer, action) {
|
|
@@ -27089,12 +27097,14 @@ extendsClassMethod(VeLiveVideoEffectManager, 'setComposeNodes', function (origin
|
|
|
27089
27097
|
var composePaths = nodes.map(function (path) {
|
|
27090
27098
|
return VeLiveEffectHelper.getBeautyPathByName(path);
|
|
27091
27099
|
});
|
|
27092
|
-
origin(composePaths);
|
|
27100
|
+
return origin(composePaths);
|
|
27093
27101
|
}, function (engine) {
|
|
27094
|
-
var composePaths = nodes
|
|
27102
|
+
var composePaths = nodes
|
|
27103
|
+
.filter(Boolean)
|
|
27104
|
+
.map(function (path) {
|
|
27095
27105
|
return VeLivePushHelper.getResourcePath("ComposeMakeup.bundle/ComposeMakeup/".concat(path));
|
|
27096
27106
|
});
|
|
27097
|
-
origin(composePaths);
|
|
27107
|
+
return origin(composePaths);
|
|
27098
27108
|
});
|
|
27099
27109
|
};
|
|
27100
27110
|
});
|
|
@@ -27104,12 +27114,14 @@ extendsClassMethod(VeLiveVideoEffectManager, 'appendComposeNodes', function (ori
|
|
|
27104
27114
|
var composePaths = nodes.map(function (path) {
|
|
27105
27115
|
return VeLiveEffectHelper.getBeautyPathByName(path);
|
|
27106
27116
|
});
|
|
27107
|
-
origin(composePaths);
|
|
27117
|
+
return origin(composePaths);
|
|
27108
27118
|
}, function (engine) {
|
|
27109
|
-
var composePaths = nodes
|
|
27119
|
+
var composePaths = nodes
|
|
27120
|
+
.filter(Boolean)
|
|
27121
|
+
.map(function (path) {
|
|
27110
27122
|
return VeLivePushHelper.getResourcePath("ComposeMakeup.bundle/ComposeMakeup/".concat(path));
|
|
27111
27123
|
});
|
|
27112
|
-
origin(composePaths);
|
|
27124
|
+
return origin(composePaths);
|
|
27113
27125
|
});
|
|
27114
27126
|
};
|
|
27115
27127
|
});
|
|
@@ -27119,41 +27131,67 @@ extendsClassMethod(VeLiveVideoEffectManager, 'removeComposeNodes', function (ori
|
|
|
27119
27131
|
var composePaths = resourcePaths.map(function (path) {
|
|
27120
27132
|
return VeLiveEffectHelper.getBeautyPathByName(path);
|
|
27121
27133
|
});
|
|
27122
|
-
origin(composePaths);
|
|
27134
|
+
return origin(composePaths);
|
|
27123
27135
|
}, function (engine) {
|
|
27124
|
-
var composePaths = resourcePaths
|
|
27136
|
+
var composePaths = resourcePaths
|
|
27137
|
+
.filter(Boolean)
|
|
27138
|
+
.map(function (path) {
|
|
27125
27139
|
return VeLivePushHelper.getResourcePath("ComposeMakeup.bundle/ComposeMakeup/".concat(path));
|
|
27126
27140
|
});
|
|
27127
|
-
origin(composePaths);
|
|
27141
|
+
return origin(composePaths);
|
|
27128
27142
|
});
|
|
27129
27143
|
};
|
|
27130
27144
|
});
|
|
27131
27145
|
extendsClassMethod(VeLiveVideoEffectManager, 'updateComposerNodeIntensity', function (origin) {
|
|
27132
27146
|
return function updateComposerNodeIntensity(path, key, intensity) {
|
|
27147
|
+
if (!path) {
|
|
27148
|
+
console.log('path is empty');
|
|
27149
|
+
return 0;
|
|
27150
|
+
}
|
|
27133
27151
|
return runImpl(this, function (engine) {
|
|
27134
27152
|
var fullPath = VeLiveEffectHelper.getBeautyPathByName(path);
|
|
27135
|
-
origin(fullPath, key, intensity);
|
|
27153
|
+
return origin(fullPath, key, intensity);
|
|
27136
27154
|
}, function (engine) {
|
|
27137
27155
|
var fullPath = VeLivePushHelper.getResourcePath("ComposeMakeup.bundle/ComposeMakeup/".concat(path));
|
|
27138
|
-
origin(fullPath, key, intensity);
|
|
27156
|
+
return origin(fullPath, key, intensity);
|
|
27139
27157
|
});
|
|
27140
27158
|
};
|
|
27141
27159
|
});
|
|
27142
27160
|
extendsClassMethod(VeLiveVideoEffectManager, 'setFilter', function (origin) {
|
|
27143
27161
|
return function setFilter(path) {
|
|
27144
27162
|
return runImpl(this, function (engine) {
|
|
27145
|
-
|
|
27163
|
+
if (path) {
|
|
27164
|
+
return origin(VeLiveEffectHelper.getFilterPathByName(path));
|
|
27165
|
+
}
|
|
27166
|
+
else {
|
|
27167
|
+
return origin('');
|
|
27168
|
+
}
|
|
27146
27169
|
}, function (engine) {
|
|
27147
|
-
|
|
27170
|
+
if (path) {
|
|
27171
|
+
return origin(VeLivePushHelper.getResourcePath("FilterResource.bundle/Filter/".concat(path)));
|
|
27172
|
+
}
|
|
27173
|
+
else {
|
|
27174
|
+
return origin('');
|
|
27175
|
+
}
|
|
27148
27176
|
});
|
|
27149
27177
|
};
|
|
27150
27178
|
});
|
|
27151
27179
|
extendsClassMethod(VeLiveVideoEffectManager, 'setSticker', function (origin) {
|
|
27152
27180
|
return function setSticker(path) {
|
|
27153
27181
|
return runImpl(this, function (engine) {
|
|
27154
|
-
|
|
27182
|
+
if (path) {
|
|
27183
|
+
return origin(VeLiveEffectHelper.getStickerPathByName(path));
|
|
27184
|
+
}
|
|
27185
|
+
else {
|
|
27186
|
+
return origin('');
|
|
27187
|
+
}
|
|
27155
27188
|
}, function (engine) {
|
|
27156
|
-
|
|
27189
|
+
if (path) {
|
|
27190
|
+
return origin(VeLivePushHelper.getResourcePath("StickerResource.bundle/stickers/".concat(path)));
|
|
27191
|
+
}
|
|
27192
|
+
else {
|
|
27193
|
+
return origin('');
|
|
27194
|
+
}
|
|
27157
27195
|
});
|
|
27158
27196
|
};
|
|
27159
27197
|
});
|
|
@@ -27184,8 +27222,8 @@ var MixView = React.forwardRef(function (props, ref) {
|
|
|
27184
27222
|
});
|
|
27185
27223
|
|
|
27186
27224
|
var VeView = React.forwardRef(function (props, ref) {
|
|
27187
|
-
var children = props.children, renderMode = props.renderMode, onViewMount = props.onViewMount, onViewUnmount = props.onViewUnmount, viewId = props.viewId, viewProps = __rest(props, ["children", "renderMode", "onViewMount", "onViewUnmount", "viewId"]);
|
|
27188
|
-
return (jsxRuntime.jsx(MixView, { renderMode: renderMode, viewId: viewId, onViewMount: onViewMount, onViewUnmount: onViewUnmount, children: jsxRuntime.jsx(reactNative.View, __assign({}, viewProps, { ref: ref, children: children })) }));
|
|
27225
|
+
var children = props.children, renderMode = props.renderMode, onViewMount = props.onViewMount, onViewUnmount = props.onViewUnmount, viewId = props.viewId, captureMode = props.captureMode, captureFramerate = props.captureFramerate, viewProps = __rest(props, ["children", "renderMode", "onViewMount", "onViewUnmount", "viewId", "captureMode", "captureFramerate"]);
|
|
27226
|
+
return (jsxRuntime.jsx(MixView, { renderMode: renderMode, viewId: viewId, captureMode: captureMode, captureFramerate: captureFramerate, onViewMount: onViewMount, onViewUnmount: onViewUnmount, children: jsxRuntime.jsx(reactNative.View, __assign({}, viewProps, { ref: ref, children: children })) }));
|
|
27189
27227
|
});
|
|
27190
27228
|
|
|
27191
27229
|
var VeTextView = React.forwardRef(function (props, ref) {
|
|
@@ -27194,7 +27232,7 @@ var VeTextView = React.forwardRef(function (props, ref) {
|
|
|
27194
27232
|
});
|
|
27195
27233
|
|
|
27196
27234
|
var VeImageView = React.forwardRef(function (props, ref) {
|
|
27197
|
-
var children = props.children, renderMode = props.renderMode, _a = props.animated, animated = _a === void 0 ? false : _a, captureMode = props.captureMode, onViewMount = props.onViewMount, onViewUnmount = props.onViewUnmount, viewId = props.viewId, style = props.style, imageProps = __rest(props, ["children", "renderMode", "animated", "captureMode", "onViewMount", "onViewUnmount", "viewId", "style"]);
|
|
27235
|
+
var children = props.children, renderMode = props.renderMode, _a = props.animated, animated = _a === void 0 ? false : _a, captureMode = props.captureMode, captureFramerate = props.captureFramerate, onViewMount = props.onViewMount, onViewUnmount = props.onViewUnmount, viewId = props.viewId, style = props.style, imageProps = __rest(props, ["children", "renderMode", "animated", "captureMode", "captureFramerate", "onViewMount", "onViewUnmount", "viewId", "style"]);
|
|
27198
27236
|
var captureViewId = React.useRef(viewId || '');
|
|
27199
27237
|
// Auto-detect capture mode based on animation
|
|
27200
27238
|
var finalCaptureMode = captureMode || (animated ? 'realtime' : 'onchange');
|
|
@@ -27211,12 +27249,12 @@ var VeImageView = React.forwardRef(function (props, ref) {
|
|
|
27211
27249
|
};
|
|
27212
27250
|
return reactNative.StyleSheet.flatten([defaultStyle, style]);
|
|
27213
27251
|
}, [style]);
|
|
27214
|
-
return (jsxRuntime.jsx(MixView, { renderMode: renderMode, captureMode: finalCaptureMode, viewId: viewId, onViewMount: onWrapperViewMount, onViewUnmount: onViewUnmount, children: children ? (children) : (jsxRuntime.jsx(reactNative.Image, __assign({}, imageProps, { onLoad: handleImageLoad, style: mergedStyle, ref: ref }))) }));
|
|
27252
|
+
return (jsxRuntime.jsx(MixView, { renderMode: renderMode, captureMode: finalCaptureMode, captureFramerate: captureFramerate, viewId: viewId, onViewMount: onWrapperViewMount, onViewUnmount: onViewUnmount, children: children ? (children) : (jsxRuntime.jsx(reactNative.Image, __assign({}, imageProps, { onLoad: handleImageLoad, style: mergedStyle, ref: ref }))) }));
|
|
27215
27253
|
});
|
|
27216
27254
|
|
|
27217
27255
|
var VeWebView = React.forwardRef(function (props, ref) {
|
|
27218
|
-
var renderMode = props.renderMode, _a = props.captureMode, captureMode = _a === void 0 ? 'realtime' : _a, onViewMount = props.onViewMount, onViewUnmount = props.onViewUnmount, viewId = props.viewId, viewProps = __rest(props, ["renderMode", "captureMode", "onViewMount", "onViewUnmount", "viewId"]);
|
|
27219
|
-
return (jsxRuntime.jsx(MixView, { renderMode: renderMode, captureMode: captureMode, viewId: viewId, onViewMount: onViewMount, onViewUnmount: onViewUnmount, children: jsxRuntime.jsx(reactNative.View, __assign({}, viewProps, { ref: ref })) }));
|
|
27256
|
+
var renderMode = props.renderMode, _a = props.captureMode, captureMode = _a === void 0 ? 'realtime' : _a, captureFramerate = props.captureFramerate, onViewMount = props.onViewMount, onViewUnmount = props.onViewUnmount, viewId = props.viewId, viewProps = __rest(props, ["renderMode", "captureMode", "captureFramerate", "onViewMount", "onViewUnmount", "viewId"]);
|
|
27257
|
+
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 })) }));
|
|
27220
27258
|
});
|
|
27221
27259
|
|
|
27222
27260
|
setupJSBridge(new ReactNativeBridge(reactNative.NativeModules.VeLivePushModule, 'VeLivePush:onEvent'));
|
|
@@ -27225,6 +27263,8 @@ setupEnv(new ReactNativeEnv());
|
|
|
27225
27263
|
exports.MixView = MixView;
|
|
27226
27264
|
exports.NativeMixView = NativeMixView;
|
|
27227
27265
|
exports.NativeViewComponent = NativeViewComponent;
|
|
27266
|
+
exports.ReactNativeBridge = ReactNativeBridge;
|
|
27267
|
+
exports.ReactNativeEnv = ReactNativeEnv;
|
|
27228
27268
|
exports.VeImageView = VeImageView;
|
|
27229
27269
|
exports.VeLiveAudioCaptureConfiguration = VeLiveAudioCaptureConfiguration;
|
|
27230
27270
|
exports.VeLiveAudioDevice = VeLiveAudioDevice;
|
|
@@ -27271,3 +27311,4 @@ exports.ios_VeLiveSnapshotListener = ios_VeLiveSnapshotListener;
|
|
|
27271
27311
|
exports.ios_VeLiveVideoFrameFilter = ios_VeLiveVideoFrameFilter;
|
|
27272
27312
|
exports.ios_VeLiveVideoFrameListener = ios_VeLiveVideoFrameListener;
|
|
27273
27313
|
exports.relaunchPusher = relaunchPusher;
|
|
27314
|
+
exports.setupLogger = setupLogger;
|
package/lib/module/index.js
CHANGED
|
@@ -1455,7 +1455,7 @@ var NativeLoggerManager = function () {
|
|
|
1455
1455
|
return InstanceManager;
|
|
1456
1456
|
})());
|
|
1457
1457
|
|
|
1458
|
-
/** @class */ (
|
|
1458
|
+
var LoggerManager = /** @class */ (function () {
|
|
1459
1459
|
function LoggerManager() {
|
|
1460
1460
|
}
|
|
1461
1461
|
LoggerManager.setLogLevel = function (level) {
|
|
@@ -1473,9 +1473,17 @@ var NativeLoggerManager = function () {
|
|
|
1473
1473
|
};
|
|
1474
1474
|
LoggerManager.logger = LoggerImpl.getInstance();
|
|
1475
1475
|
return LoggerManager;
|
|
1476
|
-
}
|
|
1476
|
+
}());
|
|
1477
1477
|
|
|
1478
1478
|
var logger = LoggerImpl.getInstance();
|
|
1479
|
+
function setupLogger(opt) {
|
|
1480
|
+
if (opt.level !== undefined) {
|
|
1481
|
+
LoggerManager.setLogLevel(opt.level);
|
|
1482
|
+
}
|
|
1483
|
+
if (opt.customer !== undefined) {
|
|
1484
|
+
logger.registerConsumer(opt.customer);
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1479
1487
|
|
|
1480
1488
|
var ApiCallSpan = /** @class */ (function () {
|
|
1481
1489
|
function ApiCallSpan(tracer, action) {
|
|
@@ -27087,12 +27095,14 @@ extendsClassMethod(VeLiveVideoEffectManager, 'setComposeNodes', function (origin
|
|
|
27087
27095
|
var composePaths = nodes.map(function (path) {
|
|
27088
27096
|
return VeLiveEffectHelper.getBeautyPathByName(path);
|
|
27089
27097
|
});
|
|
27090
|
-
origin(composePaths);
|
|
27098
|
+
return origin(composePaths);
|
|
27091
27099
|
}, function (engine) {
|
|
27092
|
-
var composePaths = nodes
|
|
27100
|
+
var composePaths = nodes
|
|
27101
|
+
.filter(Boolean)
|
|
27102
|
+
.map(function (path) {
|
|
27093
27103
|
return VeLivePushHelper.getResourcePath("ComposeMakeup.bundle/ComposeMakeup/".concat(path));
|
|
27094
27104
|
});
|
|
27095
|
-
origin(composePaths);
|
|
27105
|
+
return origin(composePaths);
|
|
27096
27106
|
});
|
|
27097
27107
|
};
|
|
27098
27108
|
});
|
|
@@ -27102,12 +27112,14 @@ extendsClassMethod(VeLiveVideoEffectManager, 'appendComposeNodes', function (ori
|
|
|
27102
27112
|
var composePaths = nodes.map(function (path) {
|
|
27103
27113
|
return VeLiveEffectHelper.getBeautyPathByName(path);
|
|
27104
27114
|
});
|
|
27105
|
-
origin(composePaths);
|
|
27115
|
+
return origin(composePaths);
|
|
27106
27116
|
}, function (engine) {
|
|
27107
|
-
var composePaths = nodes
|
|
27117
|
+
var composePaths = nodes
|
|
27118
|
+
.filter(Boolean)
|
|
27119
|
+
.map(function (path) {
|
|
27108
27120
|
return VeLivePushHelper.getResourcePath("ComposeMakeup.bundle/ComposeMakeup/".concat(path));
|
|
27109
27121
|
});
|
|
27110
|
-
origin(composePaths);
|
|
27122
|
+
return origin(composePaths);
|
|
27111
27123
|
});
|
|
27112
27124
|
};
|
|
27113
27125
|
});
|
|
@@ -27117,41 +27129,67 @@ extendsClassMethod(VeLiveVideoEffectManager, 'removeComposeNodes', function (ori
|
|
|
27117
27129
|
var composePaths = resourcePaths.map(function (path) {
|
|
27118
27130
|
return VeLiveEffectHelper.getBeautyPathByName(path);
|
|
27119
27131
|
});
|
|
27120
|
-
origin(composePaths);
|
|
27132
|
+
return origin(composePaths);
|
|
27121
27133
|
}, function (engine) {
|
|
27122
|
-
var composePaths = resourcePaths
|
|
27134
|
+
var composePaths = resourcePaths
|
|
27135
|
+
.filter(Boolean)
|
|
27136
|
+
.map(function (path) {
|
|
27123
27137
|
return VeLivePushHelper.getResourcePath("ComposeMakeup.bundle/ComposeMakeup/".concat(path));
|
|
27124
27138
|
});
|
|
27125
|
-
origin(composePaths);
|
|
27139
|
+
return origin(composePaths);
|
|
27126
27140
|
});
|
|
27127
27141
|
};
|
|
27128
27142
|
});
|
|
27129
27143
|
extendsClassMethod(VeLiveVideoEffectManager, 'updateComposerNodeIntensity', function (origin) {
|
|
27130
27144
|
return function updateComposerNodeIntensity(path, key, intensity) {
|
|
27145
|
+
if (!path) {
|
|
27146
|
+
console.log('path is empty');
|
|
27147
|
+
return 0;
|
|
27148
|
+
}
|
|
27131
27149
|
return runImpl(this, function (engine) {
|
|
27132
27150
|
var fullPath = VeLiveEffectHelper.getBeautyPathByName(path);
|
|
27133
|
-
origin(fullPath, key, intensity);
|
|
27151
|
+
return origin(fullPath, key, intensity);
|
|
27134
27152
|
}, function (engine) {
|
|
27135
27153
|
var fullPath = VeLivePushHelper.getResourcePath("ComposeMakeup.bundle/ComposeMakeup/".concat(path));
|
|
27136
|
-
origin(fullPath, key, intensity);
|
|
27154
|
+
return origin(fullPath, key, intensity);
|
|
27137
27155
|
});
|
|
27138
27156
|
};
|
|
27139
27157
|
});
|
|
27140
27158
|
extendsClassMethod(VeLiveVideoEffectManager, 'setFilter', function (origin) {
|
|
27141
27159
|
return function setFilter(path) {
|
|
27142
27160
|
return runImpl(this, function (engine) {
|
|
27143
|
-
|
|
27161
|
+
if (path) {
|
|
27162
|
+
return origin(VeLiveEffectHelper.getFilterPathByName(path));
|
|
27163
|
+
}
|
|
27164
|
+
else {
|
|
27165
|
+
return origin('');
|
|
27166
|
+
}
|
|
27144
27167
|
}, function (engine) {
|
|
27145
|
-
|
|
27168
|
+
if (path) {
|
|
27169
|
+
return origin(VeLivePushHelper.getResourcePath("FilterResource.bundle/Filter/".concat(path)));
|
|
27170
|
+
}
|
|
27171
|
+
else {
|
|
27172
|
+
return origin('');
|
|
27173
|
+
}
|
|
27146
27174
|
});
|
|
27147
27175
|
};
|
|
27148
27176
|
});
|
|
27149
27177
|
extendsClassMethod(VeLiveVideoEffectManager, 'setSticker', function (origin) {
|
|
27150
27178
|
return function setSticker(path) {
|
|
27151
27179
|
return runImpl(this, function (engine) {
|
|
27152
|
-
|
|
27180
|
+
if (path) {
|
|
27181
|
+
return origin(VeLiveEffectHelper.getStickerPathByName(path));
|
|
27182
|
+
}
|
|
27183
|
+
else {
|
|
27184
|
+
return origin('');
|
|
27185
|
+
}
|
|
27153
27186
|
}, function (engine) {
|
|
27154
|
-
|
|
27187
|
+
if (path) {
|
|
27188
|
+
return origin(VeLivePushHelper.getResourcePath("StickerResource.bundle/stickers/".concat(path)));
|
|
27189
|
+
}
|
|
27190
|
+
else {
|
|
27191
|
+
return origin('');
|
|
27192
|
+
}
|
|
27155
27193
|
});
|
|
27156
27194
|
};
|
|
27157
27195
|
});
|
|
@@ -27182,8 +27220,8 @@ var MixView = React.forwardRef(function (props, ref) {
|
|
|
27182
27220
|
});
|
|
27183
27221
|
|
|
27184
27222
|
var VeView = React.forwardRef(function (props, ref) {
|
|
27185
|
-
var children = props.children, renderMode = props.renderMode, onViewMount = props.onViewMount, onViewUnmount = props.onViewUnmount, viewId = props.viewId, viewProps = __rest(props, ["children", "renderMode", "onViewMount", "onViewUnmount", "viewId"]);
|
|
27186
|
-
return (jsx(MixView, { renderMode: renderMode, viewId: viewId, onViewMount: onViewMount, onViewUnmount: onViewUnmount, children: jsx(View, __assign({}, viewProps, { ref: ref, children: children })) }));
|
|
27223
|
+
var children = props.children, renderMode = props.renderMode, onViewMount = props.onViewMount, onViewUnmount = props.onViewUnmount, viewId = props.viewId, captureMode = props.captureMode, captureFramerate = props.captureFramerate, viewProps = __rest(props, ["children", "renderMode", "onViewMount", "onViewUnmount", "viewId", "captureMode", "captureFramerate"]);
|
|
27224
|
+
return (jsx(MixView, { renderMode: renderMode, viewId: viewId, captureMode: captureMode, captureFramerate: captureFramerate, onViewMount: onViewMount, onViewUnmount: onViewUnmount, children: jsx(View, __assign({}, viewProps, { ref: ref, children: children })) }));
|
|
27187
27225
|
});
|
|
27188
27226
|
|
|
27189
27227
|
var VeTextView = React.forwardRef(function (props, ref) {
|
|
@@ -27192,7 +27230,7 @@ var VeTextView = React.forwardRef(function (props, ref) {
|
|
|
27192
27230
|
});
|
|
27193
27231
|
|
|
27194
27232
|
var VeImageView = React.forwardRef(function (props, ref) {
|
|
27195
|
-
var children = props.children, renderMode = props.renderMode, _a = props.animated, animated = _a === void 0 ? false : _a, captureMode = props.captureMode, onViewMount = props.onViewMount, onViewUnmount = props.onViewUnmount, viewId = props.viewId, style = props.style, imageProps = __rest(props, ["children", "renderMode", "animated", "captureMode", "onViewMount", "onViewUnmount", "viewId", "style"]);
|
|
27233
|
+
var children = props.children, renderMode = props.renderMode, _a = props.animated, animated = _a === void 0 ? false : _a, captureMode = props.captureMode, captureFramerate = props.captureFramerate, onViewMount = props.onViewMount, onViewUnmount = props.onViewUnmount, viewId = props.viewId, style = props.style, imageProps = __rest(props, ["children", "renderMode", "animated", "captureMode", "captureFramerate", "onViewMount", "onViewUnmount", "viewId", "style"]);
|
|
27196
27234
|
var captureViewId = useRef(viewId || '');
|
|
27197
27235
|
// Auto-detect capture mode based on animation
|
|
27198
27236
|
var finalCaptureMode = captureMode || (animated ? 'realtime' : 'onchange');
|
|
@@ -27209,15 +27247,15 @@ var VeImageView = React.forwardRef(function (props, ref) {
|
|
|
27209
27247
|
};
|
|
27210
27248
|
return StyleSheet.flatten([defaultStyle, style]);
|
|
27211
27249
|
}, [style]);
|
|
27212
|
-
return (jsx(MixView, { renderMode: renderMode, captureMode: finalCaptureMode, viewId: viewId, onViewMount: onWrapperViewMount, onViewUnmount: onViewUnmount, children: children ? (children) : (jsx(Image, __assign({}, imageProps, { onLoad: handleImageLoad, style: mergedStyle, ref: ref }))) }));
|
|
27250
|
+
return (jsx(MixView, { renderMode: renderMode, captureMode: finalCaptureMode, captureFramerate: captureFramerate, viewId: viewId, onViewMount: onWrapperViewMount, onViewUnmount: onViewUnmount, children: children ? (children) : (jsx(Image, __assign({}, imageProps, { onLoad: handleImageLoad, style: mergedStyle, ref: ref }))) }));
|
|
27213
27251
|
});
|
|
27214
27252
|
|
|
27215
27253
|
var VeWebView = React.forwardRef(function (props, ref) {
|
|
27216
|
-
var renderMode = props.renderMode, _a = props.captureMode, captureMode = _a === void 0 ? 'realtime' : _a, onViewMount = props.onViewMount, onViewUnmount = props.onViewUnmount, viewId = props.viewId, viewProps = __rest(props, ["renderMode", "captureMode", "onViewMount", "onViewUnmount", "viewId"]);
|
|
27217
|
-
return (jsx(MixView, { renderMode: renderMode, captureMode: captureMode, viewId: viewId, onViewMount: onViewMount, onViewUnmount: onViewUnmount, children: jsx(View, __assign({}, viewProps, { ref: ref })) }));
|
|
27254
|
+
var renderMode = props.renderMode, _a = props.captureMode, captureMode = _a === void 0 ? 'realtime' : _a, captureFramerate = props.captureFramerate, onViewMount = props.onViewMount, onViewUnmount = props.onViewUnmount, viewId = props.viewId, viewProps = __rest(props, ["renderMode", "captureMode", "captureFramerate", "onViewMount", "onViewUnmount", "viewId"]);
|
|
27255
|
+
return (jsx(MixView, { renderMode: renderMode, captureMode: captureMode, captureFramerate: captureFramerate, viewId: viewId, onViewMount: onViewMount, onViewUnmount: onViewUnmount, children: jsx(View, __assign({}, viewProps, { ref: ref })) }));
|
|
27218
27256
|
});
|
|
27219
27257
|
|
|
27220
27258
|
setupJSBridge(new ReactNativeBridge(NativeModules.VeLivePushModule, 'VeLivePush:onEvent'));
|
|
27221
27259
|
setupEnv(new ReactNativeEnv());
|
|
27222
27260
|
|
|
27223
|
-
export { MixView, NativeMixView, NativeViewComponent, 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 };
|
|
27261
|
+
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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byteplus/react-native-live-push",
|
|
3
|
-
"version": "1.3.0-rc.
|
|
3
|
+
"version": "1.3.0-rc.11",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": "*",
|
|
6
6
|
"react-native": "*"
|
|
@@ -30,5 +30,15 @@
|
|
|
30
30
|
"homepage": "https://www.byteplus.com/en",
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"zx": "^8.1.1"
|
|
33
|
+
},
|
|
34
|
+
"nativeVersion": {
|
|
35
|
+
"volc": {
|
|
36
|
+
"android": "1.46.3.6",
|
|
37
|
+
"ios": "1.46.3.10-premium"
|
|
38
|
+
},
|
|
39
|
+
"byteplus": {
|
|
40
|
+
"android": "1.46.300.2",
|
|
41
|
+
"ios": "1.46.300.7"
|
|
42
|
+
}
|
|
33
43
|
}
|
|
34
44
|
}
|
|
@@ -2,6 +2,7 @@ require "json"
|
|
|
2
2
|
|
|
3
3
|
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
4
|
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
|
5
|
+
is_bp = package['name'].start_with?('@byteplus')
|
|
5
6
|
|
|
6
7
|
Pod::Spec.new do |s|
|
|
7
8
|
s.name = "react-native-velive-push"
|
|
@@ -49,7 +50,13 @@ Pod::Spec.new do |s|
|
|
|
49
50
|
end
|
|
50
51
|
end
|
|
51
52
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
# Version configuration through environment variables
|
|
54
|
+
volc_api_engine_version = ENV['VOLC_API_ENGINE_VERSION_FOR_LIVE_PUSH'] || '1.6.5'
|
|
55
|
+
ttsdk_framework_version = ENV['TTSDK_FRAMEWORK_VERSION_FOR_LIVE_PUSH'] || (is_bp ? package['nativeVersion']['byteplus']['ios'] : package['nativeVersion']['volc']['ios'])
|
|
56
|
+
|
|
57
|
+
s.dependency 'VolcApiEngine', volc_api_engine_version
|
|
58
|
+
s.dependency 'TTSDKFramework/Core', ttsdk_framework_version
|
|
59
|
+
s.dependency 'TTSDKFramework/LivePush-RTS', ttsdk_framework_version
|
|
60
|
+
|
|
61
|
+
puts("[LIVE PUSH POD INSTALL INFO]: volc_api_engine_version: #{volc_api_engine_version} / ttsdk_framework_version: #{ttsdk_framework_version}")
|
|
55
62
|
end
|