Skip to content

Commit

Permalink
update startEchoTest
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyongqiang committed Dec 21, 2023
1 parent 95d0de8 commit 22cdadd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ class PrecallTestEntry : BaseViewController

@IBAction func doEchoTest(sender: UIButton) {

let ret = agoraKit.startEchoTest(withInterval: 10, successBlock: nil)
let testConfig = AgoraEchoTestConfiguration()
testConfig.intervalInSeconds = 10
testConfig.enableAudio = true
let ret = agoraKit.startEchoTest(withConfig: testConfig)
if ret != 0 {
// for errors please take a look at:
// CN https://docs.agora.io/cn/Video/API%20Reference/oc/Classes/AgoraRtcEngineKit.html#//api/name/enableEncryption:encryptionConfig:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ class PrecallTestEntry : BaseViewController
}

@IBAction func doEchoTest(sender: UIButton) {

let ret = agoraKit.startEchoTest(withInterval: 10, successBlock: nil)
let testConfig = AgoraEchoTestConfiguration()
testConfig.intervalInSeconds = 10
testConfig.enableAudio = true
testConfig.enableVideo = true
let ret = agoraKit.startEchoTest(withConfig: testConfig)
if ret != 0 {
// Usually happens with invalid parameters
// Error code description can be found at:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,11 @@ class PrecallTest: BaseViewController {
}

@IBAction func doEchoTest(sender: NSButton) {
agoraKit.startEchoTest(withInterval: 10)
let testConfig = AgoraEchoTestConfiguration()
testConfig.intervalInSeconds = 10
testConfig.enableAudio = true
testConfig.enableVideo = true
agoraKit.startEchoTest(withConfig: testConfig)
showPopover(isValidate: false, seconds: 10) {[unowned self] in
self.showPopover(isValidate: true, seconds: 10) {[unowned self] in
self.agoraKit.stopEchoTest()
Expand Down

0 comments on commit 22cdadd

Please sign in to comment.