Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
f2451d9
update code style
Nov 3, 2023
1289981
[Android]add custom stream encrypt case.
xgfd3 Nov 13, 2023
b927036
[Android]update README links.
xgfd3 Nov 13, 2023
7ce610a
Dev/oc test (#353)
cleven1 Aug 12, 2023
dc0bca3
Dev/4.2.3 (#354)
xgfd3 Oct 12, 2023
a50dcdf
Update setLocalAccessPoint note and etc. (#358)
xgfd3 Nov 2, 2023
fdb98f2
Add gitee sync script.
xgfd3 Nov 13, 2023
258b55e
Update gitee sync script.
xgfd3 Nov 13, 2023
bcdbd86
Test gitee sync.
xgfd3 Nov 13, 2023
7ae9474
Merge branch 'dev/4.3.0' into jira/DEVEX-60
xgfd3 Nov 16, 2023
81c26ce
Merge pull request #359 from AgoraIO/jira/DEVEX-60
xgfd3 Nov 16, 2023
53dd609
Merge branch 'main' into dev/4.3.0
xgfd3 Nov 16, 2023
f07d63a
Feat/code style android (#366)
xgfd3 Nov 16, 2023
fcebcba
[Android]Adapt to 4.3.0 and add audio stream selector for media player.
xgfd3 Nov 16, 2023
dcba19c
[Android]Add face capture case and etc.
xgfd3 Nov 16, 2023
538b9eb
[Android][Audio]Adapt to 4.3.0 rtc sdk.
xgfd3 Nov 16, 2023
c2ef2d1
[Android]Update rtc version.
xgfd3 Nov 16, 2023
c96f608
Merge branch 'main' into dev/4.3.0
xgfd3 Nov 16, 2023
dbcb577
update sdk 4.3.0
Nov 17, 2023
752f8d3
iOS update SDK 4.3.0
Nov 17, 2023
55b939a
add multi audio track case
Nov 17, 2023
a282169
add face capture case
Nov 17, 2023
446e61e
[Windows]Adapt to 4.3.0, add audio stream selector for mediaplayer an…
xgfd3 Nov 17, 2023
08f3a9b
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
xgfd3 Nov 17, 2023
f148f22
update sdk version to 4.3.0
Nov 20, 2023
199f5c5
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
Nov 20, 2023
f057980
[Windows]add face capture case.
xgfd3 Nov 20, 2023
e18d64a
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
xgfd3 Nov 20, 2023
2d8fcfe
[Android]update cpp include.
xgfd3 Nov 20, 2023
f6a2a50
[Android]Adapt to 4.3.0 latest version.
xgfd3 Nov 29, 2023
3bcf0ef
[Android]update cpp include.
xgfd3 Nov 29, 2023
69a8fda
[Android][Audio]Adapt to 4.3.0 latest version.
xgfd3 Nov 29, 2023
a9181f2
[windows]adapte to 4.3.0 latest version and fix bugs.
xgfd3 Nov 30, 2023
e57b819
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
xgfd3 Nov 30, 2023
54aca01
fix rawVideo takesnpe crash bug
Dec 1, 2023
7595fe7
fix rawVideo snap shot bug
Dec 1, 2023
5a2b34b
fix medipa publish streaming bug
Dec 1, 2023
a8034a2
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
Dec 1, 2023
c112613
[Android]try to fix NMS-17758 and etc.
xgfd3 Nov 30, 2023
8ccf4cf
[Android]fix bugs.
xgfd3 Dec 4, 2023
d983a9d
[Android]add background recording function for JoinChannelAudio case(…
xgfd3 Dec 6, 2023
fe1216f
[Android][Audio]add background recording function for JoinChannelAudi…
xgfd3 Dec 6, 2023
cb693eb
[Android]Adapt to 4.3.0 latest version.
xgfd3 Dec 6, 2023
f4672e9
[Android]fix custom audio render api call problem(DEVEX-65).
xgfd3 Dec 7, 2023
91db82e
fix multiChannel take snapshot bug
Dec 15, 2023
6d35ddc
fix custom video render bug
Dec 15, 2023
95d0de8
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
Dec 15, 2023
22cdadd
update startEchoTest
Dec 21, 2023
7b570eb
[Windows] fix windows screen share bug.
xgfd3 Dec 21, 2023
8610da9
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
xgfd3 Dec 21, 2023
f5442a0
update sdk document address
Dec 21, 2023
34b502b
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
Dec 21, 2023
52f851c
[Windows]Add audio echo test user case.
xgfd3 Dec 21, 2023
6a74f01
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
xgfd3 Dec 21, 2023
27f7377
[Android]Perfect basic video case and fix some bugs.
xgfd3 Dec 21, 2023
930e7dc
[Android]Perfect rtmp streaming case.
xgfd3 Dec 22, 2023
43405a8
Add Camera Test Fuction
Dec 26, 2023
0ba255e
[Android]Fix auido route bug.
Dec 26, 2023
58663bd
[Android]Add video echo test.
Dec 26, 2023
7b24802
[Android]fix echo test bug.
Dec 26, 2023
c4a8a51
[Android]perfect echo test example.
Dec 27, 2023
d37c726
add rtc connection state callback
Dec 27, 2023
31baed7
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
Dec 27, 2023
1031a02
fix MediaPlayer publish stream UI bug
Dec 27, 2023
bda78f9
fix custom capture Video push bug
Jan 2, 2024
ca4950c
Fix the issue of self rendering on the Inter chip
Jan 3, 2024
964c25f
[windows]fix spatial audio zone bug.
xgfd3 Jan 4, 2024
2d2e425
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
xgfd3 Jan 4, 2024
e4a07e6
fix custom video push bug
Jan 4, 2024
20b7492
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
Jan 4, 2024
8f5d903
update precall test bug
cleven1 Jan 9, 2024
d0b3b62
[Windows]add video echo test api example.
xgfd3 Jan 10, 2024
5389d5f
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
xgfd3 Jan 10, 2024
a2a2d21
[Windows]add basic join channel video by token example.
xgfd3 Jan 10, 2024
d93ccf7
[Windows]fix spatial audio zone bug(NMS-18784)
xgfd3 Jan 10, 2024
a5bf8d3
update start echo test
Jan 12, 2024
a6df626
update spatial audio method
Jan 12, 2024
f6f9cdf
[Android]fix audio problem.
Jan 12, 2024
f65da12
[Android][Audio]fix audio problem.
Jan 12, 2024
a031322
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
Jan 12, 2024
077e5ae
update spatial audio remote user position
Jan 15, 2024
6fd3e98
Merge branch 'code_style' into dev/4.3.0
Jan 25, 2024
7394ac2
Optimize the code format
Jan 25, 2024
02459de
[Android]fix NMS-19192/NMS-19194.
xgfd3 Jan 30, 2024
1e3801a
[Android][Audio]fix NMS-19192.
xgfd3 Jan 30, 2024
7aabfbb
adapter video extension for v430 (#370)
DengQiming-private Jan 30, 2024
11c4166
update rtc sdk pod version to 4.3.0
Feb 22, 2024
5fdb1f0
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
Feb 22, 2024
6ff2703
Merge branch 'main' into dev/4.3.0
xgfd3 Feb 23, 2024
7053b81
[windows]Update sdk download url.
xgfd3 Feb 23, 2024
3b6fa87
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
xgfd3 Feb 23, 2024
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
Next Next commit
update code style
  • Loading branch information
zhaoyongqiang committed Nov 3, 2023
commit f2451d90bac5c138ea37fb1fec9790119734467d
40 changes: 40 additions & 0 deletions iOS/APIExample/.swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
disabled_rules: # 禁用指定的规则
- todo #去做
- trailing_whitespace # 行末尾不加空格
- unneeded_override # 不需要的重写函数
- identifier_name # 参数变量命名规则
- class_delegate_protocol #delegate protocol 应该被设定为 class-only,才能被弱引用
- type_body_length # 类型体行数限制
- cyclomatic_complexity # 不应该存在太复杂的函数(判断语句过多)

opt_in_rules: # 启用指定的规则
- empty_count # 空数
- missing_docs # 缺少文档
- closure_end_indentation #闭合端压痕
- empty_parentheses_with_trailing_closure #带尾随闭包的空括号
- duplicate_imports #重复导入
- force_unwrapping # 强制解包
- nesting #嵌套
- operator_whitespace # 运算符 函数 空白
- switch_case_alignment #Switch 和 Case 语句对齐

excluded: # 执行 linting 时忽略的路径。 优先级比 `included` 更高。
- Carthage
- Pods

# rules that have both warning and error levels, can set just the warning level
line_length: 145 # 一行的字符长度不超过120个,否则会有warning

large_tuple: 4

# error #函数体长度 默认超过40行warning,超过100行直接报错
function_body_length:
warning: 60
error: 100

file_length: # 文件行数超过500行会有warning,超过1200行会有error
warning: 800
error: 1200

force_unwrapping:
severity: error
20 changes: 19 additions & 1 deletion iOS/APIExample/APIExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -1501,6 +1501,7 @@
03D13BCA2448758900B599B3 /* Resources */,
1B6F6CF9B678035E221EAFDE /* [CP] Embed Pods Frameworks */,
0339BEBA25205B80007D4FDD /* Embed App Extensions */,
E76F80122AF0A7A200CCB9D6 /* ShellScript */,
);
buildRules = (
);
Expand Down Expand Up @@ -1760,6 +1761,23 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
E76F80122AF0A7A200CCB9D6 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/SwiftLint/swiftlint\" \n";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down
3 changes: 0 additions & 3 deletions iOS/APIExample/APIExample/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,4 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// Override point for customization after application launch.
return true
}


}

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import MetalKit
import SceneKit
import AgoraRtcKit

class ARVideoRenderer : NSObject {
class ARVideoRenderer: NSObject {
fileprivate var yTexture: MTLTexture?
fileprivate var uTexture: MTLTexture?
fileprivate var vTexture: MTLTexture?
Expand Down
193 changes: 74 additions & 119 deletions iOS/APIExample/APIExample/Common/AgoraExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,161 +119,121 @@ extension AgoraEncryptionMode {
}
}

//extension AgoraAudioVoiceChanger {
// func description() -> String {
// switch self {
// case .voiceChangerOff:return "Off".localized
// case .generalBeautyVoiceFemaleFresh:return "FemaleFresh".localized
// case .generalBeautyVoiceFemaleVitality:return "FemaleVitality".localized
// case .generalBeautyVoiceMaleMagnetic:return "MaleMagnetic".localized
// case .voiceBeautyVigorous:return "Vigorous".localized
// case .voiceBeautyDeep:return "Deep".localized
// case .voiceBeautyMellow:return "Mellow".localized
// case .voiceBeautyFalsetto:return "Falsetto".localized
// case .voiceBeautyFull:return "Full".localized
// case .voiceBeautyClear:return "Clear".localized
// case .voiceBeautyResounding:return "Resounding".localized
// case .voiceBeautyRinging:return "Ringing".localized
// case .voiceBeautySpacial:return "Spacial".localized
// case .voiceChangerEthereal:return "Ethereal".localized
// case .voiceChangerOldMan:return "Old Man".localized
// case .voiceChangerBabyBoy:return "Baby Boy".localized
// case .voiceChangerBabyGirl:return "Baby Girl".localized
// case .voiceChangerZhuBaJie:return "ZhuBaJie".localized
// case .voiceChangerHulk:return "Hulk".localized
// default:
// return "\(self.rawValue)"
// }
// }
//}

extension AgoraVoiceBeautifierPreset{
extension AgoraVoiceBeautifierPreset {
func description() -> String {
switch self {
case .presetOff:return "Off".localized
case .presetChatBeautifierFresh:return "FemaleFresh".localized
case .presetChatBeautifierMagnetic:return "MaleMagnetic".localized
case .presetChatBeautifierVitality:return "FemaleVitality".localized
case .timbreTransformationVigorous:return "Vigorous".localized
case .timbreTransformationDeep:return "Deep".localized
case .timbreTransformationMellow:return "Mellow".localized
case .timbreTransformationFalsetto:return "Falsetto".localized
case .timbreTransformationFull:return "Full".localized
case .timbreTransformationClear:return "Clear".localized
case .timbreTransformationResounding:return "Resounding".localized
case .timbreTransformatRinging:return "Ringing".localized
default:
return "\(self.rawValue)"
case .presetOff: return "Off".localized
case .presetChatBeautifierFresh: return "FemaleFresh".localized
case .presetChatBeautifierMagnetic: return "MaleMagnetic".localized
case .presetChatBeautifierVitality: return "FemaleVitality".localized
case .timbreTransformationVigorous: return "Vigorous".localized
case .timbreTransformationDeep: return "Deep".localized
case .timbreTransformationMellow: return "Mellow".localized
case .timbreTransformationFalsetto: return "Falsetto".localized
case .timbreTransformationFull: return "Full".localized
case .timbreTransformationClear: return "Clear".localized
case .timbreTransformationResounding: return "Resounding".localized
case .timbreTransformatRinging: return "Ringing".localized
default: return "\(self.rawValue)"
}
}
}

extension AgoraAudioReverbPreset {
func description() -> String {
switch self {
case .off:return "Off".localized
case .fxUncle:return "FxUncle".localized
case .fxSister:return "FxSister".localized
case .fxPopular:return "Pop".localized
case .fxRNB:return "R&B".localized
case .fxVocalConcert:return "Vocal Concert".localized
case .fxKTV:return "KTV".localized
case .fxStudio:return "Studio".localized
case .fxPhonograph:return "Phonograph".localized
default:
return "\(self.rawValue)"
case .off: return "Off".localized
case .fxUncle: return "FxUncle".localized
case .fxSister: return "FxSister".localized
case .fxPopular: return "Pop".localized
case .fxRNB: return "R&B".localized
case .fxVocalConcert: return "Vocal Concert".localized
case .fxKTV: return "KTV".localized
case .fxStudio: return "Studio".localized
case .fxPhonograph: return "Phonograph".localized
default: return "\(self.rawValue)"
}
}
}

extension AgoraAudioEffectPreset {
func description() -> String {
switch self {
case .off:return "Off".localized
case .voiceChangerEffectUncle:return "FxUncle".localized
case .voiceChangerEffectOldMan:return "Old Man".localized
case .voiceChangerEffectBoy:return "Baby Boy".localized
case .voiceChangerEffectSister:return "FxSister".localized
case .voiceChangerEffectGirl:return "Baby Girl".localized
case .voiceChangerEffectPigKin:return "ZhuBaJie".localized
case .voiceChangerEffectHulk:return "Hulk".localized
case .styleTransformationRnb:return "R&B".localized
case .styleTransformationPopular:return "Pop".localized
case .roomAcousticsKTV:return "KTV".localized
case .roomAcousVocalConcer:return "Vocal Concert".localized
case .roomAcousStudio:return "Studio".localized
case .roomAcousPhonograph:return "Phonograph".localized
case .roomAcousVirtualStereo:return "Virtual Stereo".localized
case .roomAcousSpatial:return "Spacial".localized
case .roomAcousEthereal:return "Ethereal".localized
case .roomAcous3DVoice:return "3D Voice".localized
case .pitchCorrection:return "Pitch Correction".localized
default:
return "\(self.rawValue)"
case .off: return "Off".localized
case .voiceChangerEffectUncle: return "FxUncle".localized
case .voiceChangerEffectOldMan: return "Old Man".localized
case .voiceChangerEffectBoy: return "Baby Boy".localized
case .voiceChangerEffectSister: return "FxSister".localized
case .voiceChangerEffectGirl: return "Baby Girl".localized
case .voiceChangerEffectPigKin: return "ZhuBaJie".localized
case .voiceChangerEffectHulk: return "Hulk".localized
case .styleTransformationRnb: return "R&B".localized
case .styleTransformationPopular: return "Pop".localized
case .roomAcousticsKTV: return "KTV".localized
case .roomAcousVocalConcer: return "Vocal Concert".localized
case .roomAcousStudio: return "Studio".localized
case .roomAcousPhonograph: return "Phonograph".localized
case .roomAcousVirtualStereo: return "Virtual Stereo".localized
case .roomAcousSpatial: return "Spacial".localized
case .roomAcousEthereal: return "Ethereal".localized
case .roomAcous3DVoice: return "3D Voice".localized
case .pitchCorrection: return "Pitch Correction".localized
default: return "\(self.rawValue)"
}
}
}

extension AgoraAudioEqualizationBandFrequency {
func description() -> String {
switch self {
case .band31: return "31Hz"
case .band62: return "62Hz"
case .band125: return "125Hz"
case .band250: return "250Hz"
case .band500: return "500Hz"
case .band1K: return "1kHz"
case .band2K: return "2kHz"
case .band4K: return "4kHz"
case .band8K: return "8kHz"
case .band16K: return "16kHz"
@unknown default:
return "\(self.rawValue)"
case .band31: return "31Hz"
case .band62: return "62Hz"
case .band125: return "125Hz"
case .band250: return "250Hz"
case .band500: return "500Hz"
case .band1K: return "1kHz"
case .band2K: return "2kHz"
case .band4K: return "4kHz"
case .band8K: return "8kHz"
case .band16K: return "16kHz"
default: return "\(self.rawValue)"
}
}
}

extension AgoraAudioReverbType {
func description() -> String {
switch self {
case .dryLevel: return "Dry Level".localized
case .wetLevel: return "Wet Level".localized
case .roomSize: return "Room Size".localized
case .wetDelay: return "Wet Delay".localized
case .strength: return "Strength".localized
@unknown default:
return "\(self.rawValue)"
case .dryLevel: return "Dry Level".localized
case .wetLevel: return "Wet Level".localized
case .roomSize: return "Room Size".localized
case .wetDelay: return "Wet Delay".localized
case .strength: return "Strength".localized
@unknown default: return "\(self.rawValue)"
}
}
}

extension AUDIO_AINS_MODE {
func description() -> String {
switch self {
case .AINS_MODE_AGGRESSIVE: return "AGGRESSIVE".localized
case .AINS_MODE_BALANCED: return "BALANCED".localized
case .AINS_MODE_ULTRALOWLATENCY: return "ULTRALOWLATENCY".localized
@unknown default:
return "\(self.rawValue)"
case .AINS_MODE_AGGRESSIVE: return "AGGRESSIVE".localized
case .AINS_MODE_BALANCED: return "BALANCED".localized
case .AINS_MODE_ULTRALOWLATENCY: return "ULTRALOWLATENCY".localized
@unknown default: return "\(self.rawValue)"
}
}
}

extension AgoraVoiceConversionPreset {
func description() -> String {
switch self {
case .off:
return "Off".localized
case .neutral:
return "Neutral".localized
case .sweet:
return "Sweet".localized
case .changerSolid:
return "Solid".localized
case .changerBass:
return "Bass".localized
@unknown default:
return "\(self.rawValue)"
case .off: return "Off".localized
case .neutral: return "Neutral".localized
case .sweet: return "Sweet".localized
case .changerSolid: return "Solid".localized
case .changerBass: return "Bass".localized
default: return "\(self.rawValue)"
}
}
}
Expand Down Expand Up @@ -315,18 +275,14 @@ extension OutputStream {
/// - parameter allowLossyConversion: Whether to permit lossy conversion when writing the string. Defaults to `false`.
///
/// - returns: Return total number of bytes written upon success. Return `-1` upon failure.

func write(_ string: String, encoding: String.Encoding = .utf8, allowLossyConversion: Bool = false) -> Int {

if let data = string.data(using: encoding, allowLossyConversion: allowLossyConversion) {
let ret = data.withUnsafeBytes {
write($0, maxLength: data.count)
}
if(ret < 0) {
print("write fail: \(streamError.debugDescription)")
let bytes = data.withUnsafeBytes({ $0 })
if let address = bytes.baseAddress {
write(address, maxLength: bytes.count)
}
}

return -1
}

Expand All @@ -339,4 +295,3 @@ extension Date {
return dateformat.string(from: self)
}
}

Loading