diff --git a/MeetingBar/Assets.xcassets/vendor-icons/livekit_icon.imageset/Contents.json b/MeetingBar/Assets.xcassets/vendor-icons/livekit_icon.imageset/Contents.json new file mode 100644 index 00000000..9fce8f10 --- /dev/null +++ b/MeetingBar/Assets.xcassets/vendor-icons/livekit_icon.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "livekit.png", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MeetingBar/Assets.xcassets/vendor-icons/livekit_icon.imageset/livekit.png b/MeetingBar/Assets.xcassets/vendor-icons/livekit_icon.imageset/livekit.png new file mode 100644 index 00000000..bd9abb0f Binary files /dev/null and b/MeetingBar/Assets.xcassets/vendor-icons/livekit_icon.imageset/livekit.png differ diff --git a/MeetingBar/MeetingServices.swift b/MeetingBar/MeetingServices.swift index 4d74ab34..71783f09 100644 --- a/MeetingBar/MeetingServices.swift +++ b/MeetingBar/MeetingServices.swift @@ -78,6 +78,7 @@ enum MeetingServices: String, Codable, CaseIterable { case doxyMe = "Doxy.me" case calcom = "Cal Video" case zmPage = "zm.page" + case livekit = "LiveKit Meet" case other = "Other" var localizedValue: String { @@ -325,6 +326,7 @@ struct LinksRegex { let doxyMe = try! NSRegularExpression(pattern: #"https://([a-z0-9.]+)?doxy\.me/[^\s]*"#) let calcom = try! NSRegularExpression(pattern: #"https?://app.cal\.com/video/[A-Za-z0-9./]+"#) let zmPage = try! NSRegularExpression(pattern: #"https?://([a-zA-Z0-9.]+)\.zm\.page"#) + let livekit = try! NSRegularExpression(pattern: #"https?://meet[a-zA-Z0-9.]*\.livekit\.io/rooms/[a-zA-Z0-9-#]+"#) } func getRegexForMeetingService(_ service: MeetingServices) -> NSRegularExpression? { @@ -615,6 +617,10 @@ func getIconForMeetingService(_ meetingService: MeetingServices?) -> NSImage { image = NSImage(named: "zm_page_icon")! image.size = NSSize(width: 16, height: 16) + case .some(.livekit): + image = NSImage(named: "livekit_icon")! + image.size = NSSize(width: 16, height: 16) + // tested and verified case .none: image = NSImage(named: "no_online_session")! diff --git a/MeetingBarTests/MeetingServicesTests.swift b/MeetingBarTests/MeetingServicesTests.swift index 318a3e21..65d13faa 100644 --- a/MeetingBarTests/MeetingServicesTests.swift +++ b/MeetingBarTests/MeetingServicesTests.swift @@ -43,7 +43,9 @@ let meetings = [ MeetingLink(service: .suitConference, url: URL(string: "https://turkcell.conference.istesuit.com/username")!), MeetingLink(service: .doxyMe, url: URL(string: "https://bbc.doxy.me/dr.who")!), MeetingLink(service: .calcom, url: URL(string: "https://app.cal.com/video/1de4BmdXEb983kIUHomUnA")!), - MeetingLink(service: .zmPage, url: URL(string: "https://meetingbar.zm.page")!) + MeetingLink(service: .zmPage, url: URL(string: "https://meetingbar.zm.page")!), + MeetingLink(service: .livekit, url: URL(string: "https://meet.livekit.io/rooms/et5r-y80t#r56ryirofs8jjfi3rnxu8ab3qhjsRn6die6mvjhwux82opmkao8bfjb9wggnr2L6")!), + MeetingLink(service: .livekit, url: URL(string: "https://meet.staging.livekit.io/rooms/of4q-y10s")!) ] class MeetingServicesTests: XCTestCase {