Skip to content

Commit

Permalink
fix setBeautyEffectOptions bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
LichKing-2234 committed Jun 19, 2020
1 parent 284fa03 commit 773f967
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 6 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG → CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
## THE CHANGELOG

#### 2.9.1-alpha.7
- fix `setBeautyEffectOptions` bugs

#### 2.9.1-alpha.6
- fix bugs

#### 2.9.1-alpha.5
- upgrade android sdk to 2.9.4

#### 2.9.1-alpha.4
- remove `AgoraRtcCryptoLoader` `libcrypto`

#### 2.9.1-alpha.3
- upgrade android sdk to 2.9.4
Expand Down Expand Up @@ -77,7 +88,7 @@
- support 2.4.0-alpha.5 bugfix Android & iOS side not support fit mode and hidden mode.
1. Deprecate & Remove: setupLocalVideo & setupRemoteVideo
2. rename iOS side constants
```javascript
```
"AgoraVideoMirrorModeAuto" to "VideoMirrorModeAuto"
"AgoraVideoMirrorModeEnabled" to "VideoMirrorModeEnabled"
"AgoraVideoMirrorModeDisabled" to "VideoMirrorModeDisabled"
Expand Down
7 changes: 6 additions & 1 deletion ios/RCTAgora/RCTAgora.m
Original file line number Diff line number Diff line change
Expand Up @@ -1636,7 +1636,12 @@ - (NSDictionary *)constantsToExport {
options:(NSDictionary *)options
resolve:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject) {
NSInteger res = [self.rtcEngine setBeautyEffectOptions:enabled options:options];
AgoraBeautyOptions *beautyOption = [[AgoraBeautyOptions alloc] init];
beautyOption.lighteningContrastLevel = [options[@"lighteningContrastLevel"] integerValue];
beautyOption.lighteningLevel = [options[@"lighteningLevel"] floatValue];
beautyOption.smoothnessLevel = [options[@"smoothnessLevel"] floatValue];
beautyOption.rednessLevel = [options[@"rednessLevel"] floatValue];
NSInteger res = [self.rtcEngine setBeautyEffectOptions:enabled options:beautyOption];
if (res == 0) {
resolve(nil);
} else {
Expand Down
2 changes: 1 addition & 1 deletion lib/RtcEngine.native.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ declare class RtcEngine {
*
* This method enables/disables image enhancement and sets the options.
*
* @param enable boolean
* @param enabled boolean
* @param options {@link BeautyOptions}
* @return Promise<any>
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/RtcEngine.native.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-agora",
"version": "2.9.1-alpha.6",
"version": "2.9.1-alpha.7",
"description": "React Native around the Agora RTC SDKs for Android and iOS agora",
"summary": "agora native sdk for react-native",
"main": "lib/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/RtcEngine.native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1470,7 +1470,7 @@ class RtcEngine {
*
* This method enables/disables image enhancement and sets the options.
*
* @param enable boolean
* @param enabled boolean
* @param options {@link BeautyOptions}
* @return Promise<any>
*/
Expand Down

0 comments on commit 773f967

Please sign in to comment.