Skip to content

Commit 170783f

Browse files
authored
feat: support native sdk 3.5.1 (#472)
* feat: support native sdk 3.5.1 * Fix CI error
1 parent 11d24f9 commit 170783f

File tree

6 files changed

+78
-28
lines changed

6 files changed

+78
-28
lines changed

android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ android {
5050
}
5151

5252
dependencies {
53-
api 'com.github.agorabuilder:native-full-sdk:3.5.0.3'
53+
api 'com.github.agorabuilder:native-full-sdk:3.5.1'
5454

5555
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${safeExtGet('kotlin_version', '1.3.72')}"
5656
}

android/src/main/java/io/agora/rtc/base/RtcEngine.kt

+8-3
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ class IRtcEngine {
161161

162162
fun getAudioMixingDuration(params: Map<String, *>, callback: Callback)
163163

164+
fun getAudioFileInfo(params: Map<String, *>, callback: Callback)
165+
164166
fun getAudioMixingCurrentPosition(callback: Callback)
165167

166168
fun setAudioMixingPosition(params: Map<String, *>, callback: Callback)
@@ -817,11 +819,14 @@ open class RtcEngineManager(
817819
}
818820

819821
override fun getAudioMixingDuration(params: Map<String, *>, callback: Callback) {
822+
callback.code(engine?.audioMixingDuration) { it }
823+
}
824+
825+
override fun getAudioFileInfo(params: Map<String, *>, callback: Callback) {
820826
(params["filePath"] as? String)?.let { file ->
821-
callback.code(engine?.getAudioMixingDuration(file)) { it }
822-
return@getAudioMixingDuration
827+
callback.code(engine?.getAudioFileInfo(file)) { it }
828+
return@getAudioFileInfo
823829
}
824-
callback.code(engine?.audioMixingDuration) { it }
825830
}
826831

827832
override fun getAudioMixingCurrentPosition(callback: Callback) {

example/android/app/src/test/kotlin/io/agora/agora_rtc_engine_example/FakeRtcEngine.kt

+44-4
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,22 @@ class FakeRtcEngine : RtcEngineEx(), IAudioEffectManager {
326326
return 0
327327
}
328328

329+
override fun selectAudioTrack(audioIndex: Int): Int {
330+
return 0
331+
}
332+
333+
override fun getAudioTrackCount(): Int {
334+
return 0
335+
}
336+
337+
override fun setAudioMixingDualMonoMode(mode: Int): Int {
338+
return 0
339+
}
340+
341+
override fun setAudioMixingPlaybackSpeed(speed: Int): Int {
342+
return 0
343+
}
344+
329345
override fun stopAudioMixing(): Int {
330346
return 0
331347
}
@@ -362,10 +378,6 @@ class FakeRtcEngine : RtcEngineEx(), IAudioEffectManager {
362378
return 0
363379
}
364380

365-
override fun getAudioMixingDuration(filePath: String?): Int {
366-
return 0
367-
}
368-
369381
override fun getAudioMixingCurrentPosition(): Int {
370382
return 0
371383
}
@@ -382,6 +394,10 @@ class FakeRtcEngine : RtcEngineEx(), IAudioEffectManager {
382394
return this
383395
}
384396

397+
override fun getAudioFileInfo(filePath: String?): Int {
398+
return 0
399+
}
400+
385401
override fun startAudioRecording(filePath: String?, quality: Int): Int {
386402
return 0
387403
}
@@ -454,6 +470,14 @@ class FakeRtcEngine : RtcEngineEx(), IAudioEffectManager {
454470
return 0
455471
}
456472

473+
override fun pushExternalAudioFrame(data: ByteArray?, timestamp: Long, sampleRate: Int, channels: Int, bytesPerSample: Int, sourcePos: Int): Int {
474+
return 0
475+
}
476+
477+
override fun setExternalAudioSourceVolume(sourcePos: Int, volume: Int): Int {
478+
return 0
479+
}
480+
457481
override fun setExternalVideoSource(enable: Boolean, useTexture: Boolean, pushMode: Boolean) {
458482
}
459483

@@ -706,6 +730,14 @@ class FakeRtcEngine : RtcEngineEx(), IAudioEffectManager {
706730
return 0
707731
}
708732

733+
override fun pauseAllChannelMediaRelay(): Int {
734+
return 0
735+
}
736+
737+
override fun resumeAllChannelMediaRelay(): Int {
738+
return 0
739+
}
740+
709741
override fun startDumpVideoReceiveTrack(uid: Int, dumpFile: String?): Int {
710742
return 0
711743
}
@@ -1024,6 +1056,14 @@ class FakeRtcChannel : RtcChannel() {
10241056
return 0
10251057
}
10261058

1059+
override fun pauseAllChannelMediaRelay(): Int {
1060+
return 0
1061+
}
1062+
1063+
override fun resumeAllChannelMediaRelay(): Int {
1064+
return 0
1065+
}
1066+
10271067
override fun setRemoteVideoRenderer(uid: Int, render: IVideoSink?): Int {
10281068
return 0
10291069
}

example/ios/Runner.xcodeproj/project.pbxproj

+15-15
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
71E2A2A32722C75F00C7B7BC /* FakeAgoraRtcEngineKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71E2A2A02722C75F00C7B7BC /* FakeAgoraRtcEngineKit.swift */; };
1616
71E2A2A52722C80800C7B7BC /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71E2A2A42722C80800C7B7BC /* RunnerTests.swift */; };
1717
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
18-
79A46E92E4ECC918A6416856 /* libPods-RunnerTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C19073D58DAE1174E6498C5 /* libPods-RunnerTests.a */; };
1918
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
2019
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
2120
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
@@ -71,9 +70,7 @@
7170
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
7271
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
7372
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
74-
9C19073D58DAE1174E6498C5 /* libPods-RunnerTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RunnerTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
7573
E5064CBFB9AE669943232E3B /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
76-
EABB33DE0B3F52DFFE20C9CF /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
7774
/* End PBXFileReference section */
7875

7976
/* Begin PBXFrameworksBuildPhase section */
@@ -473,7 +470,7 @@
473470
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
474471
GCC_WARN_UNUSED_FUNCTION = YES;
475472
GCC_WARN_UNUSED_VARIABLE = YES;
476-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
473+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
477474
MTL_ENABLE_DEBUG_INFO = NO;
478475
SDKROOT = iphoneos;
479476
SUPPORTED_PLATFORMS = iphoneos;
@@ -488,9 +485,10 @@
488485
buildSettings = {
489486
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
490487
CLANG_ENABLE_MODULES = YES;
491-
CODE_SIGN_STYLE = Manual;
488+
CODE_SIGN_IDENTITY = "Apple Development";
489+
CODE_SIGN_STYLE = Automatic;
492490
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
493-
DEVELOPMENT_TEAM = GM72UGLGZW;
491+
DEVELOPMENT_TEAM = "";
494492
ENABLE_BITCODE = NO;
495493
FRAMEWORK_SEARCH_PATHS = (
496494
"$(inherited)",
@@ -508,7 +506,7 @@
508506
);
509507
PRODUCT_BUNDLE_IDENTIFIER = io.agora.agoraRtcEngineExample;
510508
PRODUCT_NAME = "$(TARGET_NAME)";
511-
PROVISIONING_PROFILE_SPECIFIER = App;
509+
PROVISIONING_PROFILE_SPECIFIER = "";
512510
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
513511
SWIFT_VERSION = 4.0;
514512
VERSIONING_SYSTEM = "apple-generic";
@@ -667,7 +665,7 @@
667665
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
668666
GCC_WARN_UNUSED_FUNCTION = YES;
669667
GCC_WARN_UNUSED_VARIABLE = YES;
670-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
668+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
671669
MTL_ENABLE_DEBUG_INFO = YES;
672670
ONLY_ACTIVE_ARCH = YES;
673671
SDKROOT = iphoneos;
@@ -716,7 +714,7 @@
716714
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
717715
GCC_WARN_UNUSED_FUNCTION = YES;
718716
GCC_WARN_UNUSED_VARIABLE = YES;
719-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
717+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
720718
MTL_ENABLE_DEBUG_INFO = NO;
721719
SDKROOT = iphoneos;
722720
SUPPORTED_PLATFORMS = iphoneos;
@@ -733,9 +731,10 @@
733731
buildSettings = {
734732
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
735733
CLANG_ENABLE_MODULES = YES;
736-
CODE_SIGN_STYLE = Manual;
734+
CODE_SIGN_IDENTITY = "Apple Development";
735+
CODE_SIGN_STYLE = Automatic;
737736
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
738-
DEVELOPMENT_TEAM = GM72UGLGZW;
737+
DEVELOPMENT_TEAM = "";
739738
ENABLE_BITCODE = NO;
740739
FRAMEWORK_SEARCH_PATHS = (
741740
"$(inherited)",
@@ -753,7 +752,7 @@
753752
);
754753
PRODUCT_BUNDLE_IDENTIFIER = io.agora.agoraRtcEngineExample;
755754
PRODUCT_NAME = "$(TARGET_NAME)";
756-
PROVISIONING_PROFILE_SPECIFIER = App;
755+
PROVISIONING_PROFILE_SPECIFIER = "";
757756
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
758757
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
759758
SWIFT_VERSION = 4.0;
@@ -767,9 +766,10 @@
767766
buildSettings = {
768767
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
769768
CLANG_ENABLE_MODULES = YES;
770-
CODE_SIGN_STYLE = Manual;
769+
CODE_SIGN_IDENTITY = "Apple Development";
770+
CODE_SIGN_STYLE = Automatic;
771771
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
772-
DEVELOPMENT_TEAM = GM72UGLGZW;
772+
DEVELOPMENT_TEAM = "";
773773
ENABLE_BITCODE = NO;
774774
FRAMEWORK_SEARCH_PATHS = (
775775
"$(inherited)",
@@ -787,7 +787,7 @@
787787
);
788788
PRODUCT_BUNDLE_IDENTIFIER = io.agora.agoraRtcEngineExample;
789789
PRODUCT_NAME = "$(TARGET_NAME)";
790-
PROVISIONING_PROFILE_SPECIFIER = App;
790+
PROVISIONING_PROFILE_SPECIFIER = "";
791791
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
792792
SWIFT_VERSION = 4.0;
793793
VERSIONING_SYSTEM = "apple-generic";

ios/Classes/Base/RtcEngine.swift

+9-4
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@ protocol RtcEngineAudioMixingInterface {
178178
func getAudioMixingPublishVolume(_ callback: Callback)
179179

180180
func getAudioMixingDuration(_ params: NSDictionary, _ callback: Callback)
181+
182+
func getAudioFileInfo(_ params: NSDictionary, _ callback: Callback)
181183

182184
func getAudioMixingCurrentPosition(_ callback: Callback)
183185

@@ -707,15 +709,18 @@ class RtcEngineManager: NSObject, RtcEngineInterface {
707709
}
708710

709711
@objc func getAudioMixingDuration(_ params: NSDictionary, _ callback: Callback) {
712+
callback.code(engine?.getAudioMixingDuration()) {
713+
$0
714+
}
715+
}
716+
717+
@objc func getAudioFileInfo(_ params: NSDictionary, _ callback: Callback) {
710718
if let filePath = (params["filePath"] as? String) {
711-
callback.code(engine?.getAudioMixingDuration(filePath)) {
719+
callback.code(engine?.getAudioFileInfo(filePath)) {
712720
$0
713721
}
714722
return
715723
}
716-
callback.code(engine?.getAudioMixingDuration()) {
717-
$0
718-
}
719724
}
720725

721726
@objc func getAudioMixingCurrentPosition(_ callback: Callback) {

ios/agora_rtc_engine.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
1717
s.source = { :path => '.' }
1818
s.source_files = 'Classes/**/*'
1919
s.dependency 'Flutter'
20-
s.dependency 'AgoraRtcEngine_iOS', '3.5.0.3'
20+
s.dependency 'AgoraRtcEngine_iOS', '3.5.1'
2121
s.platform = :ios, '8.0'
2222

2323
# Flutter.framework does not contain a i386 slice.

0 commit comments

Comments
 (0)