Skip to content

Commit

Permalink
feat: support 3.3.1 for TS
Browse files Browse the repository at this point in the history
  • Loading branch information
LichKing-2234 committed Mar 8, 2021
1 parent bacc0af commit b7a1d00
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 2 deletions.
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def kotlin_version = getExtOrDefault('kotlinVersion')
dependencies {
// noinspection GradleDynamicVersion
api 'com.facebook.react:react-native:+'
api "io.agora.rtc:full-sdk:3.3.0"
api "io.agora.rtc:full-sdk:3.3.1"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
}
2 changes: 1 addition & 1 deletion react-native-agora.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ Pod::Spec.new do |s|
s.swift_version = "4.0"

s.dependency "React"
s.dependency "AgoraRtcEngine_iOS", "3.3.0"
s.dependency "AgoraRtcEngine_iOS", "3.3.1"
end
4 changes: 4 additions & 0 deletions src/common/Classes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1301,6 +1301,10 @@ export interface RemoteAudioStats {
* The reason for poor experience quality: #EXPERIENCE_POOR_REASON
*/
qualityChangedReason: ExperiencePoorReason;
/**
* The quality of the remote audio stream as determined by the Agora real-time audio MOS (Mean Opinion Score) measurement method in the reported interval. The return value ranges from 0 to 500. Dividing the return value by 100 gets the MOS score, which ranges from 0 to 5. The higher the score, the better the audio quality.
*/
mosValue: number;
}

/**
Expand Down
27 changes: 27 additions & 0 deletions src/common/Enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,14 @@ export enum EncryptionMode {
* @since v3.1.2.
*/
SM4128ECB = 4,
/**
* 5: 128-bit AES encryption, GCM mode.
*/
AES128GCM = 5,
/**
* 6: 256-bit AES encryption, GCM mode.
*/
AES256GCM = 6,
}

/**
Expand Down Expand Up @@ -2812,8 +2820,27 @@ export enum ExperienceQualityType {
*/
export enum ExperiencePoorReason {
None = 0,

RemoteNetworkQualityPoor = 1,

LocalNetworkQualityPoor = 2,

WirelessSignalPoor = 4,

WifiBluetoothCoexist = 8,
}

/**
* TODO(DOC)
*/
export enum VoiceConversionPreset {
Off = 0,

Neutral = 50397440,

Sweet = 50397696,

Solid = 50397952,

Bass = 50397952,
}
11 changes: 11 additions & 0 deletions src/common/RtcEngine.native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import type {
UserPriority,
VideoStreamType,
VoiceBeautifierPreset,
VoiceConversionPreset,
} from './Enums';
import type { Listener, RtcEngineEvents, Subscription } from './RtcEvents';
import RtcChannel from './RtcChannel.native';
Expand Down Expand Up @@ -2891,6 +2892,14 @@ export default class RtcEngine implements RtcEngineInterface {
setVoiceBeautifierPreset(preset: VoiceBeautifierPreset): Promise<void> {
return RtcEngine._callMethod('setVoiceBeautifierPreset', { preset });
}

/**
* TODO(DOC)
* @param preset
*/
setVoiceConversionPreset(preset: VoiceConversionPreset): Promise<void> {
return RtcEngine._callMethod('setVoiceConversionPreset', { preset });
}
}

/**
Expand Down Expand Up @@ -3163,6 +3172,8 @@ interface RtcVoiceChangerInterface {

setVoiceBeautifierPreset(preset: VoiceBeautifierPreset): Promise<void>;

setVoiceConversionPreset(preset: VoiceConversionPreset): Promise<void>;

setAudioEffectParameters(
preset: AudioEffectPreset,
param1: number,
Expand Down

0 comments on commit b7a1d00

Please sign in to comment.