@byteplus/react-native-live-push 1.3.0-rc.5 → 1.3.0-rc.7
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/lib/commonjs/index.js +37 -7
- package/lib/module/index.js +37 -7
- package/package.json +11 -1
- package/react-native-velive-push.podspec +3 -2
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/lib/commonjs/index.js
CHANGED
|
@@ -27091,7 +27091,9 @@ extendsClassMethod(VeLiveVideoEffectManager, 'setComposeNodes', function (origin
|
|
|
27091
27091
|
});
|
|
27092
27092
|
origin(composePaths);
|
|
27093
27093
|
}, function (engine) {
|
|
27094
|
-
var composePaths = nodes
|
|
27094
|
+
var composePaths = nodes
|
|
27095
|
+
.filter(Boolean)
|
|
27096
|
+
.map(function (path) {
|
|
27095
27097
|
return VeLivePushHelper.getResourcePath("ComposeMakeup.bundle/ComposeMakeup/".concat(path));
|
|
27096
27098
|
});
|
|
27097
27099
|
origin(composePaths);
|
|
@@ -27106,7 +27108,9 @@ extendsClassMethod(VeLiveVideoEffectManager, 'appendComposeNodes', function (ori
|
|
|
27106
27108
|
});
|
|
27107
27109
|
origin(composePaths);
|
|
27108
27110
|
}, function (engine) {
|
|
27109
|
-
var composePaths = nodes
|
|
27111
|
+
var composePaths = nodes
|
|
27112
|
+
.filter(Boolean)
|
|
27113
|
+
.map(function (path) {
|
|
27110
27114
|
return VeLivePushHelper.getResourcePath("ComposeMakeup.bundle/ComposeMakeup/".concat(path));
|
|
27111
27115
|
});
|
|
27112
27116
|
origin(composePaths);
|
|
@@ -27121,7 +27125,9 @@ extendsClassMethod(VeLiveVideoEffectManager, 'removeComposeNodes', function (ori
|
|
|
27121
27125
|
});
|
|
27122
27126
|
origin(composePaths);
|
|
27123
27127
|
}, function (engine) {
|
|
27124
|
-
var composePaths = resourcePaths
|
|
27128
|
+
var composePaths = resourcePaths
|
|
27129
|
+
.filter(Boolean)
|
|
27130
|
+
.map(function (path) {
|
|
27125
27131
|
return VeLivePushHelper.getResourcePath("ComposeMakeup.bundle/ComposeMakeup/".concat(path));
|
|
27126
27132
|
});
|
|
27127
27133
|
origin(composePaths);
|
|
@@ -27130,6 +27136,10 @@ extendsClassMethod(VeLiveVideoEffectManager, 'removeComposeNodes', function (ori
|
|
|
27130
27136
|
});
|
|
27131
27137
|
extendsClassMethod(VeLiveVideoEffectManager, 'updateComposerNodeIntensity', function (origin) {
|
|
27132
27138
|
return function updateComposerNodeIntensity(path, key, intensity) {
|
|
27139
|
+
if (!path) {
|
|
27140
|
+
console.log('path is empty');
|
|
27141
|
+
return;
|
|
27142
|
+
}
|
|
27133
27143
|
return runImpl(this, function (engine) {
|
|
27134
27144
|
var fullPath = VeLiveEffectHelper.getBeautyPathByName(path);
|
|
27135
27145
|
origin(fullPath, key, intensity);
|
|
@@ -27142,18 +27152,38 @@ extendsClassMethod(VeLiveVideoEffectManager, 'updateComposerNodeIntensity', func
|
|
|
27142
27152
|
extendsClassMethod(VeLiveVideoEffectManager, 'setFilter', function (origin) {
|
|
27143
27153
|
return function setFilter(path) {
|
|
27144
27154
|
return runImpl(this, function (engine) {
|
|
27145
|
-
|
|
27155
|
+
if (path) {
|
|
27156
|
+
origin(VeLiveEffectHelper.getFilterPathByName(path));
|
|
27157
|
+
}
|
|
27158
|
+
else {
|
|
27159
|
+
origin('');
|
|
27160
|
+
}
|
|
27146
27161
|
}, function (engine) {
|
|
27147
|
-
|
|
27162
|
+
if (path) {
|
|
27163
|
+
origin(VeLivePushHelper.getResourcePath("FilterResource.bundle/Filter/".concat(path)));
|
|
27164
|
+
}
|
|
27165
|
+
else {
|
|
27166
|
+
origin('');
|
|
27167
|
+
}
|
|
27148
27168
|
});
|
|
27149
27169
|
};
|
|
27150
27170
|
});
|
|
27151
27171
|
extendsClassMethod(VeLiveVideoEffectManager, 'setSticker', function (origin) {
|
|
27152
27172
|
return function setSticker(path) {
|
|
27153
27173
|
return runImpl(this, function (engine) {
|
|
27154
|
-
|
|
27174
|
+
if (path) {
|
|
27175
|
+
origin(VeLiveEffectHelper.getStickerPathByName(path));
|
|
27176
|
+
}
|
|
27177
|
+
else {
|
|
27178
|
+
origin('');
|
|
27179
|
+
}
|
|
27155
27180
|
}, function (engine) {
|
|
27156
|
-
|
|
27181
|
+
if (path) {
|
|
27182
|
+
origin(VeLivePushHelper.getResourcePath("StickerResource.bundle/stickers/".concat(path)));
|
|
27183
|
+
}
|
|
27184
|
+
else {
|
|
27185
|
+
origin('');
|
|
27186
|
+
}
|
|
27157
27187
|
});
|
|
27158
27188
|
};
|
|
27159
27189
|
});
|
package/lib/module/index.js
CHANGED
|
@@ -27089,7 +27089,9 @@ extendsClassMethod(VeLiveVideoEffectManager, 'setComposeNodes', function (origin
|
|
|
27089
27089
|
});
|
|
27090
27090
|
origin(composePaths);
|
|
27091
27091
|
}, function (engine) {
|
|
27092
|
-
var composePaths = nodes
|
|
27092
|
+
var composePaths = nodes
|
|
27093
|
+
.filter(Boolean)
|
|
27094
|
+
.map(function (path) {
|
|
27093
27095
|
return VeLivePushHelper.getResourcePath("ComposeMakeup.bundle/ComposeMakeup/".concat(path));
|
|
27094
27096
|
});
|
|
27095
27097
|
origin(composePaths);
|
|
@@ -27104,7 +27106,9 @@ extendsClassMethod(VeLiveVideoEffectManager, 'appendComposeNodes', function (ori
|
|
|
27104
27106
|
});
|
|
27105
27107
|
origin(composePaths);
|
|
27106
27108
|
}, function (engine) {
|
|
27107
|
-
var composePaths = nodes
|
|
27109
|
+
var composePaths = nodes
|
|
27110
|
+
.filter(Boolean)
|
|
27111
|
+
.map(function (path) {
|
|
27108
27112
|
return VeLivePushHelper.getResourcePath("ComposeMakeup.bundle/ComposeMakeup/".concat(path));
|
|
27109
27113
|
});
|
|
27110
27114
|
origin(composePaths);
|
|
@@ -27119,7 +27123,9 @@ extendsClassMethod(VeLiveVideoEffectManager, 'removeComposeNodes', function (ori
|
|
|
27119
27123
|
});
|
|
27120
27124
|
origin(composePaths);
|
|
27121
27125
|
}, function (engine) {
|
|
27122
|
-
var composePaths = resourcePaths
|
|
27126
|
+
var composePaths = resourcePaths
|
|
27127
|
+
.filter(Boolean)
|
|
27128
|
+
.map(function (path) {
|
|
27123
27129
|
return VeLivePushHelper.getResourcePath("ComposeMakeup.bundle/ComposeMakeup/".concat(path));
|
|
27124
27130
|
});
|
|
27125
27131
|
origin(composePaths);
|
|
@@ -27128,6 +27134,10 @@ extendsClassMethod(VeLiveVideoEffectManager, 'removeComposeNodes', function (ori
|
|
|
27128
27134
|
});
|
|
27129
27135
|
extendsClassMethod(VeLiveVideoEffectManager, 'updateComposerNodeIntensity', function (origin) {
|
|
27130
27136
|
return function updateComposerNodeIntensity(path, key, intensity) {
|
|
27137
|
+
if (!path) {
|
|
27138
|
+
console.log('path is empty');
|
|
27139
|
+
return;
|
|
27140
|
+
}
|
|
27131
27141
|
return runImpl(this, function (engine) {
|
|
27132
27142
|
var fullPath = VeLiveEffectHelper.getBeautyPathByName(path);
|
|
27133
27143
|
origin(fullPath, key, intensity);
|
|
@@ -27140,18 +27150,38 @@ extendsClassMethod(VeLiveVideoEffectManager, 'updateComposerNodeIntensity', func
|
|
|
27140
27150
|
extendsClassMethod(VeLiveVideoEffectManager, 'setFilter', function (origin) {
|
|
27141
27151
|
return function setFilter(path) {
|
|
27142
27152
|
return runImpl(this, function (engine) {
|
|
27143
|
-
|
|
27153
|
+
if (path) {
|
|
27154
|
+
origin(VeLiveEffectHelper.getFilterPathByName(path));
|
|
27155
|
+
}
|
|
27156
|
+
else {
|
|
27157
|
+
origin('');
|
|
27158
|
+
}
|
|
27144
27159
|
}, function (engine) {
|
|
27145
|
-
|
|
27160
|
+
if (path) {
|
|
27161
|
+
origin(VeLivePushHelper.getResourcePath("FilterResource.bundle/Filter/".concat(path)));
|
|
27162
|
+
}
|
|
27163
|
+
else {
|
|
27164
|
+
origin('');
|
|
27165
|
+
}
|
|
27146
27166
|
});
|
|
27147
27167
|
};
|
|
27148
27168
|
});
|
|
27149
27169
|
extendsClassMethod(VeLiveVideoEffectManager, 'setSticker', function (origin) {
|
|
27150
27170
|
return function setSticker(path) {
|
|
27151
27171
|
return runImpl(this, function (engine) {
|
|
27152
|
-
|
|
27172
|
+
if (path) {
|
|
27173
|
+
origin(VeLiveEffectHelper.getStickerPathByName(path));
|
|
27174
|
+
}
|
|
27175
|
+
else {
|
|
27176
|
+
origin('');
|
|
27177
|
+
}
|
|
27153
27178
|
}, function (engine) {
|
|
27154
|
-
|
|
27179
|
+
if (path) {
|
|
27180
|
+
origin(VeLivePushHelper.getResourcePath("StickerResource.bundle/stickers/".concat(path)));
|
|
27181
|
+
}
|
|
27182
|
+
else {
|
|
27183
|
+
origin('');
|
|
27184
|
+
}
|
|
27155
27185
|
});
|
|
27156
27186
|
};
|
|
27157
27187
|
});
|
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.7",
|
|
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.9-premium"
|
|
38
|
+
},
|
|
39
|
+
"byteplus": {
|
|
40
|
+
"android": "1.46.300.2",
|
|
41
|
+
"ios": "1.46.300.6-alpha1-premium"
|
|
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"
|
|
@@ -50,8 +51,8 @@ Pod::Spec.new do |s|
|
|
|
50
51
|
end
|
|
51
52
|
|
|
52
53
|
# Version configuration through environment variables
|
|
53
|
-
volc_api_engine_version = ENV['
|
|
54
|
-
ttsdk_framework_version = ENV['
|
|
54
|
+
volc_api_engine_version = ENV['VOLC_API_ENGINE_VERSION_FOR_LIVE_PUSH'] || '1.6.4'
|
|
55
|
+
ttsdk_framework_version = ENV['TTSDK_FRAMEWORK_VERSION_FOR_LIVE_PUSH'] || (is_bp ? package['nativeVersion']['byteplus']['ios'] : package['nativeVersion']['volc']['ios'])
|
|
55
56
|
|
|
56
57
|
s.dependency 'VolcApiEngine', volc_api_engine_version
|
|
57
58
|
s.dependency 'TTSDKFramework/Core', ttsdk_framework_version
|