forked from AgoraIO/API-Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUtil.swift
More file actions
32 lines (29 loc) · 1.37 KB
/
Util.swift
File metadata and controls
32 lines (29 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//
// Util.swift
// APIExample
//
// Created by zhaoyongqiang on 2022/10/14.
// Copyright © 2022 Agora Corp. All rights reserved.
//
import UIKit
enum Util {
/// Configuring Privatization Parameters
static func configPrivatization(agoraKit: AgoraRtcEngineKit) {
if !GlobalSettings.shared.getCache(key: "ip").isEmpty {
let localAccessPointConfig = AgoraLocalAccessPointConfiguration()
localAccessPointConfig.ipList = ["\(GlobalSettings.shared.getCache(key: "ip"))"]
localAccessPointConfig.mode = .localOnly
if GlobalSettings.shared.getCache(key: "report") {
let advancedConfig = AdvancedConfigInfo()
let logUploadServer = LogUploadServerInfo()
logUploadServer.serverDomain = GlobalSettings.shared.getCache(key: "log_server_domain")
logUploadServer.serverPort = GlobalSettings.shared.getCache(key: "log_server_port")
logUploadServer.serverPath = GlobalSettings.shared.getCache(key: "log_server_path")
logUploadServer.serverHttps = GlobalSettings.shared.getCache(key: "log_server_https")
advancedConfig.logUploadServer = logUploadServer
localAccessPointConfig.advancedConfig = advancedConfig
}
agoraKit.setLocalAccessPoint(withConfig: localAccessPointConfig)
}
}
}