wire bx to other platforms
This commit is contained in:
1 parent
33109b1ab5
commit
97c4d4b617
9 files changed
+191
-15
No files matched your search
@@ -121,10 +121,12 @@ enum CallPlatform: String {
|
||||
case telemost = "telemost"
|
||||
case wbstream = "wbstream"
|
||||
case dion = "dion"
|
||||
case bitrix = "bitrix"
|
||||
|
||||
static let wbstreamPrefix = "wbstream://"
|
||||
static let dionPrefix = "dion://"
|
||||
static let dionEventInfix = "dion.vc/event/"
|
||||
static let bitrixMarker = "/video/"
|
||||
|
||||
static func detect(url: String) -> CallPlatform {
|
||||
if url.hasPrefix(dionPrefix) || url.contains(dionEventInfix) {
|
||||
@@ -133,6 +135,9 @@ enum CallPlatform: String {
|
||||
if url.hasPrefix(wbstreamPrefix) {
|
||||
return .wbstream
|
||||
}
|
||||
if url.contains("bitrix24") && url.contains(bitrixMarker) {
|
||||
return .bitrix
|
||||
}
|
||||
if url.contains("telemost") {
|
||||
return .telemost
|
||||
}
|
||||
@@ -352,6 +357,24 @@ class ProxyManager: ObservableObject {
|
||||
IosSendJoinParams(jsonString)
|
||||
appendLog("Sent join params")
|
||||
}
|
||||
|
||||
case .bitrix:
|
||||
IosStartBitrixHeadless(socksPort, activeSocksUser, activeSocksPass, bridge)
|
||||
appendLog("Started Bitrix headless joiner")
|
||||
let joinParams: [String: Any] = [
|
||||
"joinLink": callUrl,
|
||||
"displayName": displayName,
|
||||
"tunnelMode": tunnelMode.rawValue,
|
||||
"vp8Fps": vp8Fps,
|
||||
"vp8Batch": vp8Batch,
|
||||
"dualTrack": dualTrack,
|
||||
"reliable": reliable,
|
||||
]
|
||||
if let jsonData = try? JSONSerialization.data(withJSONObject: joinParams),
|
||||
let jsonString = String(data: jsonData, encoding: .utf8) {
|
||||
IosSendJoinParams(jsonString)
|
||||
appendLog("Sent join params")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user