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
@@ -50,6 +50,7 @@
|
||||
"suggest_name_telemost" = "Telemost";
|
||||
"suggest_name_wbstream" = "WB Stream";
|
||||
"suggest_name_dion" = "DION";
|
||||
"suggest_name_bitrix" = "Bitrix";
|
||||
|
||||
"destination_menu_rename" = "Rename";
|
||||
"destination_menu_delete" = "Delete";
|
||||
|
||||
@@ -7,6 +7,7 @@ extension CallPlatform {
|
||||
case .telemost: return "Telemost"
|
||||
case .wbstream: return "WB Stream"
|
||||
case .dion: return "DION"
|
||||
case .bitrix: return "Bitrix"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +17,7 @@ extension CallPlatform {
|
||||
case .telemost: return NSLocalizedString("suggest_name_telemost", comment: "")
|
||||
case .wbstream: return NSLocalizedString("suggest_name_wbstream", comment: "")
|
||||
case .dion: return NSLocalizedString("suggest_name_dion", comment: "")
|
||||
case .bitrix: return NSLocalizedString("suggest_name_bitrix", comment: "")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,14 +69,17 @@ enum CallPlatform: String {
|
||||
case telemost
|
||||
case wbstream
|
||||
case dion
|
||||
case 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) { return .dion }
|
||||
if url.hasPrefix(wbstreamPrefix) { return .wbstream }
|
||||
if url.contains("bitrix24") && url.contains(bitrixMarker) { return .bitrix }
|
||||
if url.contains("telemost") { return .telemost }
|
||||
return .vk
|
||||
}
|
||||
@@ -104,6 +107,7 @@ enum CallPlatform: String {
|
||||
case .telemost: return "TM"
|
||||
case .wbstream: return "WB"
|
||||
case .dion: return "DN"
|
||||
case .bitrix: return "BX"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user