Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
801c61b
disable audio modules for now
hiroshihorie Oct 13, 2023
20157fc
Update RoomView.swift
hiroshihorie Oct 13, 2023
97a7209
update
hiroshihorie Oct 26, 2023
198b437
v2
hiroshihorie Nov 1, 2023
125e35e
fix screen share
hiroshihorie Nov 2, 2023
5185d84
remove try
hiroshihorie Nov 3, 2023
c271155
upgrade xcode settings
hiroshihorie Nov 3, 2023
9176acc
Merge branch 'main' into v2-compatible
hiroshihorie Nov 3, 2023
64651aa
update
hiroshihorie Nov 6, 2023
abb32a4
refactor
hiroshihorie Nov 6, 2023
9b75dfa
cancel connect button
hiroshihorie Nov 9, 2023
b2d3a08
use main actor instead of .main
hiroshihorie Nov 9, 2023
309843a
fix crash
hiroshihorie Nov 9, 2023
8b53ad9
fix ios compile
hiroshihorie Nov 16, 2023
e67d220
show node id
hiroshihorie Nov 26, 2023
94d1eeb
PublishOptionsView
hiroshihorie Nov 27, 2023
a8e65f5
fix publish view
hiroshihorie Nov 27, 2023
3cb087d
stats
hiroshihorie Nov 27, 2023
c64fb62
fix: PublishOptionsView
hiroshihorie Nov 29, 2023
39a7a8f
default to simulcast on
hiroshihorie Dec 4, 2023
16c1db3
Update ParticipantView.swift
hiroshihorie Dec 6, 2023
d545928
Update RoomView.swift
hiroshihorie Dec 6, 2023
5b8173c
fix audio publish crash
hiroshihorie Dec 6, 2023
36a694d
update isMuted state etc
hiroshihorie Dec 20, 2023
135eb0d
trigger re-connect
hiroshihorie Jan 1, 2024
613c64c
update debug scheme
hiroshihorie Jan 18, 2024
9b3e181
support external audio processor.
cloudwebrtc Jan 23, 2024
0b03be8
update.
cloudwebrtc Jan 25, 2024
e345911
Merge branch 'v2-compatible' into duan/external-audio-processing
cloudwebrtc Jan 26, 2024
84dfd92
add AudioProcessorOptionsView.
cloudwebrtc Jan 26, 2024
04e9dd9
add support for AudioProcessorOptions.
cloudwebrtc Jan 29, 2024
52ff561
update.
cloudwebrtc Jan 30, 2024
867e223
fix typo.
cloudwebrtc Jan 30, 2024
ed17c8c
update.
cloudwebrtc Jan 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .periphery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
retain_objc_accessible: true
schemes:
- Example (macOS Debug)
targets:
- LiveKitExample (macOS)
workspace: LiveKitExample-dev.xcworkspace
1 change: 1 addition & 0 deletions .swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.7 # Xcode 14
2 changes: 2 additions & 0 deletions .swiftformat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--exclude Sources/LiveKit/Protos
--header "/*\n * Copyright {year} LiveKit\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */"

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 34 additions & 10 deletions LiveKitExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,16 @@
objects = {

/* Begin PBXBuildFile section */
2C13AA9E2B5F886700E7BB18 /* FakeAudioProcessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C13AA9D2B5F886700E7BB18 /* FakeAudioProcessor.swift */; };
2C13AA9F2B5F886700E7BB18 /* FakeAudioProcessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C13AA9D2B5F886700E7BB18 /* FakeAudioProcessor.swift */; };
2C8910302B640DA60058BECE /* AudioProcessorOptionsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C89102F2B640DA60058BECE /* AudioProcessorOptionsView.swift */; };
2C8910312B640DA60058BECE /* AudioProcessorOptionsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C89102F2B640DA60058BECE /* AudioProcessorOptionsView.swift */; };
680FE2F227A8EF7700B6F6DB /* SFSafeSymbols in Frameworks */ = {isa = PBXBuildFile; productRef = 680FE2F127A8EF7700B6F6DB /* SFSafeSymbols */; };
680FE2F427A8EFF700B6F6DB /* SFSafeSymbols in Frameworks */ = {isa = PBXBuildFile; productRef = 680FE2F327A8EFF700B6F6DB /* SFSafeSymbols */; };
6816B1A8272D45DF005ADB85 /* ExampleObservableRoom.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6816B1A7272D45DF005ADB85 /* ExampleObservableRoom.swift */; };
6816B1A9272D45DF005ADB85 /* ExampleObservableRoom.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6816B1A7272D45DF005ADB85 /* ExampleObservableRoom.swift */; };
6816968E2AF96240008ED486 /* Participant+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6816968D2AF96240008ED486 /* Participant+Helpers.swift */; };
6816968F2AF96240008ED486 /* Participant+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6816968D2AF96240008ED486 /* Participant+Helpers.swift */; };
6816B1A8272D45DF005ADB85 /* ExampleRoomMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6816B1A7272D45DF005ADB85 /* ExampleRoomMessage.swift */; };
6816B1A9272D45DF005ADB85 /* ExampleRoomMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6816B1A7272D45DF005ADB85 /* ExampleRoomMessage.swift */; };
6816B1B0272D9198005ADB85 /* ParticipantView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6816B1AF272D9198005ADB85 /* ParticipantView.swift */; };
6816B1B1272D9198005ADB85 /* ParticipantView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6816B1AF272D9198005ADB85 /* ParticipantView.swift */; };
681A0AB727D888D80097E3F4 /* LiveKit in Frameworks */ = {isa = PBXBuildFile; productRef = 681A0AB627D888D80097E3F4 /* LiveKit */; };
Expand All @@ -31,6 +37,8 @@
6847616527B44A1A001611BE /* Bundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6847616327B44A1A001611BE /* Bundle.swift */; };
6867533B27A65652003707B9 /* AppContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6867533A27A65652003707B9 /* AppContext.swift */; };
6867533C27A65652003707B9 /* AppContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6867533A27A65652003707B9 /* AppContext.swift */; };
687230F82B14AE0A0098CCE6 /* PublishOptionsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 687230F72B14AE0A0098CCE6 /* PublishOptionsView.swift */; };
687230F92B14AE0A0098CCE6 /* PublishOptionsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 687230F72B14AE0A0098CCE6 /* PublishOptionsView.swift */; };
68816CC127B4D6BC00E24622 /* KeychainAccess in Frameworks */ = {isa = PBXBuildFile; productRef = 68816CC027B4D6BC00E24622 /* KeychainAccess */; };
68816CC327B4D94200E24622 /* KeychainAccess in Frameworks */ = {isa = PBXBuildFile; productRef = 68816CC227B4D94200E24622 /* KeychainAccess */; };
68816CC527B4DCD500E24622 /* SecureStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68816CC427B4DCD500E24622 /* SecureStore.swift */; };
Expand Down Expand Up @@ -72,7 +80,10 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
6816B1A7272D45DF005ADB85 /* ExampleObservableRoom.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleObservableRoom.swift; sourceTree = "<group>"; };
2C13AA9D2B5F886700E7BB18 /* FakeAudioProcessor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FakeAudioProcessor.swift; sourceTree = "<group>"; };
2C89102F2B640DA60058BECE /* AudioProcessorOptionsView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AudioProcessorOptionsView.swift; sourceTree = "<group>"; };
6816968D2AF96240008ED486 /* Participant+Helpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Participant+Helpers.swift"; sourceTree = "<group>"; };
6816B1A7272D45DF005ADB85 /* ExampleRoomMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleRoomMessage.swift; sourceTree = "<group>"; };
6816B1AF272D9198005ADB85 /* ParticipantView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParticipantView.swift; sourceTree = "<group>"; };
681E3F38271FC772007BB547 /* RoomContext.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RoomContext.swift; sourceTree = "<group>"; };
681E3F3E271FC795007BB547 /* Custom.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Custom.swift; sourceTree = "<group>"; };
Expand All @@ -88,6 +99,7 @@
6865EA2527513B4500FFAFC3 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
6865EA2D27513B6D00FFAFC3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
6867533A27A65652003707B9 /* AppContext.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppContext.swift; sourceTree = "<group>"; };
687230F72B14AE0A0098CCE6 /* PublishOptionsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishOptionsView.swift; sourceTree = "<group>"; };
68816CC427B4DCD500E24622 /* SecureStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecureStore.swift; sourceTree = "<group>"; };
6884B77B2750507400732D47 /* ScreenShareSourcePickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScreenShareSourcePickerView.swift; sourceTree = "<group>"; };
68B3853C271E780600711D5F /* LiveKitExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LiveKitExample.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -148,9 +160,11 @@
683720D427A0640D007DA986 /* Support */ = {
isa = PBXGroup;
children = (
6816B1A7272D45DF005ADB85 /* ExampleRoomMessage.swift */,
683720D127A06404007DA986 /* ConnectionHistory.swift */,
6847616327B44A1A001611BE /* Bundle.swift */,
68816CC427B4DCD500E24622 /* SecureStore.swift */,
6816968D2AF96240008ED486 /* Participant+Helpers.swift */,
);
path = Support;
sourceTree = "<group>";
Expand Down Expand Up @@ -188,7 +202,9 @@
6884B77A2750505B00732D47 /* Views */ = {
isa = PBXGroup;
children = (
2C89102F2B640DA60058BECE /* AudioProcessorOptionsView.swift */,
6884B77B2750507400732D47 /* ScreenShareSourcePickerView.swift */,
687230F72B14AE0A0098CCE6 /* PublishOptionsView.swift */,
);
path = Views;
sourceTree = "<group>";
Expand All @@ -212,9 +228,9 @@
685271EA27443907006B4D6A /* Controllers */,
681E3F3E271FC795007BB547 /* Custom.swift */,
681E3F42271FC7AD007BB547 /* ConnectView.swift */,
2C13AA9D2B5F886700E7BB18 /* FakeAudioProcessor.swift */,
681E3F41271FC7AC007BB547 /* RoomView.swift */,
68B3853C271E780600711D5F /* LiveKitExample.swift */,
6816B1A7272D45DF005ADB85 /* ExampleObservableRoom.swift */,
6816B1AF272D9198005ADB85 /* ParticipantView.swift */,
68B3853E271E780700711D5F /* Assets.xcassets */,
);
Expand Down Expand Up @@ -399,14 +415,18 @@
681E3F45271FC7AD007BB547 /* ConnectView.swift in Sources */,
6867533B27A65652003707B9 /* AppContext.swift in Sources */,
681E3F39271FC772007BB547 /* RoomContext.swift in Sources */,
2C8910302B640DA60058BECE /* AudioProcessorOptionsView.swift in Sources */,
2C13AA9E2B5F886700E7BB18 /* FakeAudioProcessor.swift in Sources */,
683720D227A06404007DA986 /* ConnectionHistory.swift in Sources */,
681E3F43271FC7AD007BB547 /* RoomView.swift in Sources */,
6816B1B0272D9198005ADB85 /* ParticipantView.swift in Sources */,
68816CC527B4DCD500E24622 /* SecureStore.swift in Sources */,
6816968E2AF96240008ED486 /* Participant+Helpers.swift in Sources */,
68B3854C271E780700711D5F /* LiveKitExample.swift in Sources */,
681E3F3F271FC795007BB547 /* Custom.swift in Sources */,
6847616427B44A1A001611BE /* Bundle.swift in Sources */,
6816B1A8272D45DF005ADB85 /* ExampleObservableRoom.swift in Sources */,
687230F82B14AE0A0098CCE6 /* PublishOptionsView.swift in Sources */,
6816B1A8272D45DF005ADB85 /* ExampleRoomMessage.swift in Sources */,
6884B77C2750507400732D47 /* ScreenShareSourcePickerView.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -418,14 +438,18 @@
681E3F46271FC7AD007BB547 /* ConnectView.swift in Sources */,
6867533C27A65652003707B9 /* AppContext.swift in Sources */,
681E3F3A271FC772007BB547 /* RoomContext.swift in Sources */,
2C8910312B640DA60058BECE /* AudioProcessorOptionsView.swift in Sources */,
2C13AA9F2B5F886700E7BB18 /* FakeAudioProcessor.swift in Sources */,
683720D327A06404007DA986 /* ConnectionHistory.swift in Sources */,
681E3F44271FC7AD007BB547 /* RoomView.swift in Sources */,
6816B1B1272D9198005ADB85 /* ParticipantView.swift in Sources */,
68816CC627B4DCD500E24622 /* SecureStore.swift in Sources */,
6816968F2AF96240008ED486 /* Participant+Helpers.swift in Sources */,
68B3854D271E780700711D5F /* LiveKitExample.swift in Sources */,
681E3F40271FC795007BB547 /* Custom.swift in Sources */,
6847616527B44A1A001611BE /* Bundle.swift in Sources */,
6816B1A9272D45DF005ADB85 /* ExampleObservableRoom.swift in Sources */,
687230F92B14AE0A0098CCE6 /* PublishOptionsView.swift in Sources */,
6816B1A9272D45DF005ADB85 /* ExampleRoomMessage.swift in Sources */,
6884B77D2750507400732D47 /* ScreenShareSourcePickerView.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -621,7 +645,7 @@
CODE_SIGN_ENTITLEMENTS = "$(SRCROOT)/iOS/iOS.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 30;
CURRENT_PROJECT_VERSION = 33;
DEVELOPMENT_TEAM = 76TVFCUKK7;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
Expand All @@ -636,7 +660,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1.1;
MARKETING_VERSION = 1.2.2;
PRODUCT_BUNDLE_IDENTIFIER = io.livekit.example.SwiftSDK.1;
PRODUCT_NAME = LiveKitExample;
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -655,7 +679,7 @@
CODE_SIGN_ENTITLEMENTS = "$(SRCROOT)/iOS/iOS.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 30;
CURRENT_PROJECT_VERSION = 33;
DEVELOPMENT_TEAM = 76TVFCUKK7;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
Expand All @@ -670,7 +694,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1.1;
MARKETING_VERSION = 1.2.2;
PRODUCT_BUNDLE_IDENTIFIER = io.livekit.example.SwiftSDK.1;
PRODUCT_NAME = LiveKitExample;
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
enableASanStackUseAfterReturn = "YES"
disablePerformanceAntipatternChecker = "YES"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
allowLocationSimulation = "YES"
queueDebuggingEnabled = "No"
memoryGraphOnResourceException = "Yes">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
Expand All @@ -51,6 +54,18 @@
ReferencedContainer = "container:LiveKitExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
<AdditionalOption
key = "MallocStackLogging"
value = ""
isEnabled = "YES">
</AdditionalOption>
<AdditionalOption
key = "MallocScribble"
value = ""
isEnabled = "YES">
</AdditionalOption>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
38 changes: 27 additions & 11 deletions Shared/ConnectView.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
/*
* Copyright 2024 LiveKit
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import Foundation
import SwiftUI
import LiveKit
import SFSafeSymbols
import SwiftUI

struct ConnectView: View {

@EnvironmentObject var appCtx: AppContext
@EnvironmentObject var roomCtx: RoomContext
@EnvironmentObject var room: Room
Expand All @@ -13,14 +28,13 @@ struct ConnectView: View {
GeometryReader { geometry in
ScrollView {
VStack(alignment: .center, spacing: 40.0) {

VStack(spacing: 10) {
Image("logo")
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 30)
.padding(.bottom, 10)
Text("SDK Version \(LiveKit.version)")
//Text("SDK Version \(LiveKit.version)")
.opacity(0.5)
Text("Example App Version \(Bundle.main.appVersionLong) (\(Bundle.main.appBuild))")
.opacity(0.5)
Expand Down Expand Up @@ -82,7 +96,13 @@ struct ConnectView: View {
}.frame(maxWidth: 350)

if case .connecting = room.connectionState {
ProgressView()
HStack(alignment: .center) {
ProgressView()

LKButton(title: "Cancel") {
roomCtx.cancelConnect()
}
}
} else {
HStack(alignment: .center) {
Spacer()
Expand Down Expand Up @@ -135,13 +155,11 @@ struct ConnectView: View {
}

Spacer()

}

}
}
.padding()
.frame(width: geometry.size.width) // Make the scroll view full-width
.frame(width: geometry.size.width) // Make the scroll view full-width
.frame(minHeight: geometry.size.height) // Set the content’s min height to the parent
}
}
Expand All @@ -150,9 +168,7 @@ struct ConnectView: View {
#endif
.alert(isPresented: $roomCtx.shouldShowDisconnectReason) {
Alert(title: Text("Disconnected"),
message: Text("Reason: " + (roomCtx.latestError != nil
? String(describing: roomCtx.latestError!)
: "Unknown")))
message: Text("Reason: " + String(describing: roomCtx.latestError)))
}
}
}
Loading