Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rc/3.3.+ #333

Merged
merged 25 commits into from
Mar 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9c48594
feat: support 3.3.0 for Android
LichKing-2234 Jan 27, 2021
b422ce8
feat: support 3.3.0 for iOS
LichKing-2234 Jan 27, 2021
fc9dd70
feat: support 3.3.0 for TS
LichKing-2234 Jan 27, 2021
ecf814c
Merge commit '9c485942661c0e60c8413f9088b4ed0fa37ae2da' into rc/3.3.+
LichKing-2234 Jan 28, 2021
a58c1d5
Merge commit 'b422ce8e8660067075317e4f0f16a29f5a49b6b7' into rc/3.3.+
LichKing-2234 Jan 28, 2021
58f65e1
chore: release 3.3.0-rc.0
LichKing-2234 Jan 28, 2021
1ffd0f8
fix: type error
LichKing-2234 Jan 28, 2021
709e526
chore: release 3.3.0-rc.1
LichKing-2234 Jan 28, 2021
551ebfe
fix: annotation build warning
LichKing-2234 Jan 28, 2021
714024f
Merge commit '551ebfe3c8dec34cfdf7e006d38523c60123bc58' into rc/3.3.+
LichKing-2234 Jan 28, 2021
7987121
feat: add example for `playEffect`
LichKing-2234 Feb 10, 2021
f0c640d
chore: upgrade to `react-native` **0.63.4** version
LichKing-2234 Feb 19, 2021
9cde716
docs: remove wrong comment
LichKing-2234 Mar 1, 2021
836f3b4
feat: support 3.3.1 for iOS
LichKing-2234 Mar 8, 2021
cd7a2cd
feat: support 3.3.1 for Android
LichKing-2234 Mar 8, 2021
990e6df
Merge commit 'cd7a2cdaff747cad9d2e386d79589c7299036ff6' into rc/3.3.+
LichKing-2234 Mar 8, 2021
bacc0af
Merge commit '836f3b4c87f0c0a478c135a4a6ed0ed4279a446e' into rc/3.3.+
LichKing-2234 Mar 8, 2021
b7a1d00
feat: support 3.3.1 for TS
LichKing-2234 Mar 8, 2021
98c4331
fix: type cast error
LichKing-2234 Mar 9, 2021
4fad339
Merge commit '98c4331bd97ab1e2dc7216470fc2978c5d4dcd74' into rc/3.3.+
LichKing-2234 Mar 9, 2021
f5af6dc
fix: type cast error
LichKing-2234 Mar 9, 2021
747b6d0
chore: release 3.3.1-rc.0
LichKing-2234 Mar 9, 2021
a1e289a
3.3.1.DOC
TingChen2020 Mar 12, 2021
eef28c8
Merge pull request #332 from TingChen2020/rc/3.3.+
LichKing-2234 Mar 12, 2021
38be94f
chore: release 3.3.1
LichKing-2234 Mar 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
## [3.3.1](https://github.com/AgoraIO-Community/react-native-agora/compare/v3.3.1-rc.0...v3.3.1) (2021-03-12)

## [3.3.1-rc.0](https://github.com/AgoraIO-Community/react-native-agora/compare/v3.3.0-rc.1...v3.3.1-rc.0) (2021-03-09)


### Bug Fixes

* annotation build warning ([551ebfe](https://github.com/AgoraIO-Community/react-native-agora/commit/551ebfe3c8dec34cfdf7e006d38523c60123bc58))
* type cast error ([f5af6dc](https://github.com/AgoraIO-Community/react-native-agora/commit/f5af6dc9cec642dd3ae5d1507913141e95dbb71f))
* type cast error ([98c4331](https://github.com/AgoraIO-Community/react-native-agora/commit/98c4331bd97ab1e2dc7216470fc2978c5d4dcd74))


### Features

* add example for `playEffect` ([7987121](https://github.com/AgoraIO-Community/react-native-agora/commit/7987121ff2822c053f327ccdeb60ff17202f6c53))
* support 3.3.1 for Android ([cd7a2cd](https://github.com/AgoraIO-Community/react-native-agora/commit/cd7a2cdaff747cad9d2e386d79589c7299036ff6))
* support 3.3.1 for iOS ([836f3b4](https://github.com/AgoraIO-Community/react-native-agora/commit/836f3b4c87f0c0a478c135a4a6ed0ed4279a446e))
* support 3.3.1 for TS ([b7a1d00](https://github.com/AgoraIO-Community/react-native-agora/commit/b7a1d006bbbd6a635b8cee18c4a50c4a1ab5bbdd))

# [3.3.0-rc.1](https://github.com/AgoraIO-Community/react-native-agora/compare/v3.3.0-rc.0...v3.3.0-rc.1) (2021-01-28)


### Bug Fixes

* type error ([1ffd0f8](https://github.com/AgoraIO-Community/react-native-agora/commit/1ffd0f8923b2968d1d908d4c672ab8c40072635e))

# [3.3.0-rc.0](https://github.com/AgoraIO-Community/react-native-agora/compare/v3.2.2...v3.3.0-rc.0) (2021-01-28)


### Features

* support 3.3.0 for Android ([9c48594](https://github.com/AgoraIO-Community/react-native-agora/commit/9c485942661c0e60c8413f9088b4ed0fa37ae2da))
* support 3.3.0 for iOS ([b422ce8](https://github.com/AgoraIO-Community/react-native-agora/commit/b422ce8e8660067075317e4f0f16a29f5a49b6b7))
* support 3.3.0 for TS ([fc9dd70](https://github.com/AgoraIO-Community/react-native-agora/commit/fc9dd70fd32402f5eed281b4007ffd3aacaf51e0))

## [3.2.2](https://github.com/AgoraIO-Community/react-native-agora/compare/v3.2.1...v3.2.2) (2020-12-28)


Expand Down
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.2.1"
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"
}
86 changes: 84 additions & 2 deletions android/src/main/java/io/agora/rtc/base/Annotations.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.lang.annotation.RetentionPolicy;

import io.agora.rtc.Constants;
import io.agora.rtc.IRtcEngineEventHandler;
import io.agora.rtc.RtcEngineConfig;
import io.agora.rtc.video.BeautyOptions;
import io.agora.rtc.video.VideoCanvas;
Expand Down Expand Up @@ -265,12 +266,14 @@ public class Annotations {
AgoraCameraCaptureOutputPreference.CAPTURER_OUTPUT_PREFERENCE_AUTO,
AgoraCameraCaptureOutputPreference.CAPTURER_OUTPUT_PREFERENCE_PERFORMANCE,
AgoraCameraCaptureOutputPreference.CAPTURER_OUTPUT_PREFERENCE_PREVIEW,
AgoraCameraCaptureOutputPreference.CAPTURER_OUTPUT_PREFERENCE_MANUAL,
})
@Retention(RetentionPolicy.SOURCE)
public @interface AgoraCameraCaptureOutputPreference {
int CAPTURER_OUTPUT_PREFERENCE_AUTO = 0;
int CAPTURER_OUTPUT_PREFERENCE_PERFORMANCE = 1;
int CAPTURER_OUTPUT_PREFERENCE_PREVIEW = 2;
int CAPTURER_OUTPUT_PREFERENCE_MANUAL = 3;
}

@IntDef({
Expand Down Expand Up @@ -362,6 +365,7 @@ public class Annotations {
Constants.CONNECTION_CHANGED_RENEW_TOKEN,
Constants.CONNECTION_CHANGED_CLIENT_IP_ADDRESS_CHANGED,
Constants.CONNECTION_CHANGED_KEEP_ALIVE_TIMEOUT,
Constants.CONNECTION_CHANGED_PROXY_SERVER_INTERRUPTED,
})
@Retention(RetentionPolicy.SOURCE)
public @interface AgoraConnectionChangedReason {
Expand Down Expand Up @@ -396,6 +400,8 @@ public class Annotations {
AgoraEncryptionMode.AES128ECB,
AgoraEncryptionMode.AES256XTS,
AgoraEncryptionMode.SM4128ECB,
AgoraEncryptionMode.AES128GCM,
AgoraEncryptionMode.AES256GCM,
})
@Retention(RetentionPolicy.SOURCE)
public @interface AgoraEncryptionMode {
Expand All @@ -404,6 +410,8 @@ public class Annotations {
int AES128ECB = 2;
int AES256XTS = 3;
int SM4128ECB = 4;
int AES128GCM = 5;
int AES256GCM = 6;
}

@IntDef({
Expand Down Expand Up @@ -452,6 +460,7 @@ public class Annotations {
Constants.ERR_PUBLISH_STREAM_INTERNAL_SERVER_ERROR,
Constants.ERR_PUBLISH_STREAM_NOT_FOUND,
Constants.ERR_PUBLISH_STREAM_FORMAT_NOT_SUPPORTED,
Constants.ERR_MODULE_NOT_FOUND,
Constants.ERR_LOAD_MEDIA_ENGINE,
Constants.ERR_START_CALL,
Constants.ERR_START_CAMERA,
Expand Down Expand Up @@ -765,8 +774,7 @@ public class Annotations {
Constants.WARN_ADM_RECORD_IS_OCCUPIED,
Constants.WARN_APM_HOWLING,
Constants.WARN_ADM_GLITCH_STATE,
// TODO(3.3.0) WARN_APM_RESIDUAL_ECHO
Constants.WARN_ADM_IMPROPER_SETTINGS,
Constants.WARN_APM_RESIDUAL_ECHO,
Constants.WARN_SUPER_RESOLUTION_STREAM_OVER_LIMITATION,
Constants.WARN_SUPER_RESOLUTION_USER_COUNT_OVER_LIMITATION,
Constants.WARN_SUPER_RESOLUTION_DEVICE_NOT_SUPPORTED,
Expand Down Expand Up @@ -845,6 +853,7 @@ public class Annotations {
Constants.CHAT_BEAUTIFIER_MAGNETIC,
Constants.CHAT_BEAUTIFIER_FRESH,
Constants.CHAT_BEAUTIFIER_VITALITY,
Constants.SINGING_BEAUTIFIER,
Constants.TIMBRE_TRANSFORMATION_VIGOROUS,
Constants.TIMBRE_TRANSFORMATION_DEEP,
Constants.TIMBRE_TRANSFORMATION_MELLOW,
Expand All @@ -865,4 +874,77 @@ public class Annotations {
@Retention(RetentionPolicy.SOURCE)
public @interface AgoraAudienceLatencyLevelType {
}

@IntDef({
Constants.TRANSPORT_TYPE_NONE_PROXY,
Constants.TRANSPORT_TYPE_UDP_PROXY,
Constants.TRANSPORT_TYPE_TCP_PROXY,
})
@Retention(RetentionPolicy.SOURCE)
public @interface AgoraCloudProxyType {
}

@IntDef({
AgoraLogLevel.LOG_LEVEL_NONE,
AgoraLogLevel.LOG_LEVEL_INFO,
AgoraLogLevel.LOG_LEVEL_WARN,
AgoraLogLevel.LOG_LEVEL_ERROR,
AgoraLogLevel.LOG_LEVEL_FATAL,
})
@Retention(RetentionPolicy.SOURCE)
public @interface AgoraLogLevel {
int LOG_LEVEL_NONE = 0;
int LOG_LEVEL_INFO = 1;
int LOG_LEVEL_WARN = 2;
int LOG_LEVEL_ERROR = 4;
int LOG_LEVEL_FATAL = 8;
}

@IntDef({
Constants.CAPTURE_BRIGHTNESS_LEVEL_INVALID,
Constants.CAPTURE_BRIGHTNESS_LEVEL_NORMAL,
Constants.CAPTURE_BRIGHTNESS_LEVEL_BRIGHT,
Constants.CAPTURE_BRIGHTNESS_LEVEL_DARK,
})
@Retention(RetentionPolicy.SOURCE)
public @interface AgoraCaptureBrightnessLevelType {
}

@IntDef({
IRtcEngineEventHandler.UploadErrorReason.UPLOAD_SUCCESS,
IRtcEngineEventHandler.UploadErrorReason.UPLOAD_NET_ERROR,
IRtcEngineEventHandler.UploadErrorReason.UPLOAD_SERVER_ERROR,
})
@Retention(RetentionPolicy.SOURCE)
public @interface AgoraUploadErrorReason {
}

@IntDef({
IRtcEngineEventHandler.ExperienceQuality.EXPERIENCE_GOOD,
IRtcEngineEventHandler.ExperienceQuality.EXPERIENCE_BAD,
})
@Retention(RetentionPolicy.SOURCE)
public @interface AgoraExperienceQualityType {
}

@IntDef({
IRtcEngineEventHandler.ExperiencePoorReason.EXPERIENCE_REASON_NONE,
IRtcEngineEventHandler.ExperiencePoorReason.REMOTE_NETWORK_QUALITY_POOR,
IRtcEngineEventHandler.ExperiencePoorReason.LOCAL_NETWORK_QUALITY_POOR,
IRtcEngineEventHandler.ExperiencePoorReason.WIRELESS_SIGNAL_POOR,
IRtcEngineEventHandler.ExperiencePoorReason.WIFI_BLUETOOTH_COEXIST,
})
@Retention(RetentionPolicy.SOURCE)
public @interface AgoraExperiencePoorReason {
}

@IntDef({
Constants.SR_STATE_REASON_SUCCESS,
Constants.SR_STATE_REASON_STREAM_OVER_LIMITATION,
Constants.SR_STATE_REASON_USER_COUNT_OVER_LIMITATION,
Constants.SR_STATE_REASON_DEVICE_NOT_SUPPORTED,
})
@Retention(RetentionPolicy.SOURCE)
public @interface AgoraSuperResolutionStateReason {
}
}
31 changes: 30 additions & 1 deletion android/src/main/java/io/agora/rtc/base/BeanCovertor.kt
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package io.agora.rtc.base

import android.graphics.Color
import io.agora.rtc.RtcEngineConfig
import io.agora.rtc.internal.EncryptionConfig
import io.agora.rtc.internal.LastmileProbeConfig
import io.agora.rtc.live.LiveInjectStreamConfig
import io.agora.rtc.live.LiveTranscoding
import io.agora.rtc.live.LiveTranscoding.TranscodingUser
import io.agora.rtc.models.ChannelMediaOptions
import io.agora.rtc.models.ClientRoleOptions
import io.agora.rtc.models.DataStreamConfig
import io.agora.rtc.video.*

fun mapToVideoDimensions(map: Map<*, *>): VideoEncoderConfiguration.VideoDimensions {
Expand Down Expand Up @@ -162,7 +164,11 @@ fun mapToCameraCapturerConfiguration(map: Map<*, *>): CameraCapturerConfiguratio
return CameraCapturerConfiguration(
intToCapturerOutputPreference((map["preference"] as Number).toInt()),
intToCameraDirection((map["cameraDirection"] as Number).toInt())
)
).apply {
dimensions = CameraCapturerConfiguration.CaptureDimensions()
(map["captureWidth"] as? Number)?.toInt()?.let { dimensions.width = it }
(map["captureHeight"] as? Number)?.toInt()?.let { dimensions.height = it }
}
}

fun mapToChannelMediaOptions(map: Map<*, *>): ChannelMediaOptions {
Expand All @@ -172,6 +178,14 @@ fun mapToChannelMediaOptions(map: Map<*, *>): ChannelMediaOptions {
}
}

fun mapToRtcEngineConfig(map: Map<*, *>): RtcEngineConfig {
return RtcEngineConfig().apply {
mAppId = map["appId"] as String
(map["areaCode"] as? Number)?.toInt()?.let { mAreaCode = it }
(map["logConfig"] as? Map<*, *>)?.let { mLogConfig = mapToLogConfig(it) }
}
}

fun mapToEncryptionConfig(map: Map<*, *>): EncryptionConfig {
return EncryptionConfig().apply {
(map["encryptionMode"] as? Number)?.let { encryptionMode = intToEncryptionMode(it.toInt()) }
Expand All @@ -184,3 +198,18 @@ fun mapToClientRoleOptions(map: Map<*, *>): ClientRoleOptions {
(map["audienceLatencyLevel"] as? Number)?.let { audienceLatencyLevel = it.toInt() }
}
}

fun mapToLogConfig(map: Map<*, *>): RtcEngineConfig.LogConfig {
return RtcEngineConfig.LogConfig().apply {
(map["filePath"] as? String)?.let { filePath = it }
(map["fileSize"] as? Number)?.let { fileSize = it.toInt() }
(map["level"] as? Number)?.let { level = it.toInt() }
}
}

fun mapToDataStreamConfig(map: Map<*, *>): DataStreamConfig {
return DataStreamConfig().apply {
(map["syncWithAudio"] as? Boolean)?.let { syncWithAudio = it }
(map["ordered"] as? Boolean)?.let { ordered = it }
}
}
8 changes: 6 additions & 2 deletions android/src/main/java/io/agora/rtc/base/Extensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ fun RemoteAudioStats.toMap(): Map<String, Any?> {
"totalFrozenTime" to totalFrozenTime,
"frozenRate" to frozenRate,
"totalActiveTime" to totalActiveTime,
"publishDuration" to publishDuration
"publishDuration" to publishDuration,
"qoeQuality" to qoeQuality,
"qualityChangedReason" to qualityChangedReason,
"mosValue" to mosValue
)
}

Expand All @@ -89,7 +92,8 @@ fun LocalVideoStats.toMap(): Map<String, Any?> {
"encodedFrameCount" to encodedFrameCount,
"codecType" to codecType,
"txPacketLossRate" to txPacketLossRate,
"captureFrameRate" to captureFrameRate
"captureFrameRate" to captureFrameRate,
"captureBrightnessLevel" to captureBrightnessLevel
)
}

Expand Down
2 changes: 1 addition & 1 deletion android/src/main/java/io/agora/rtc/base/MediaObserver.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import java.util.concurrent.atomic.AtomicInteger
class MediaObserver(
private val emit: (data: Map<String, Any?>?) -> Unit
) : IMetadataObserver {
private var maxMetadataSize = AtomicInteger(0)
private var maxMetadataSize = AtomicInteger(1024)
private var metadataList = Collections.synchronizedList<String>(mutableListOf())

fun addMetadata(metadata: String) {
Expand Down
Loading