From 7201648bc74cc85006db7a92109a1b7a4c31c887 Mon Sep 17 00:00:00 2001 From: Hiroshi Horie <548776+hiroshihorie@users.noreply.github.com> Date: Tue, 8 Mar 2022 15:57:55 +0900 Subject: [PATCH] Squashed commit of the following: commit 0c487ae5cd33c5c24118e4bcaca060a991a3589b Author: Hiroshi Horie <548776+hiroshihorie@users.noreply.github.com> Date: Tue Mar 8 15:56:53 2022 +0900 change example ver commit e821a471e0a2410ee9bbece798e81247717cddab Author: Hiroshi Horie <548776+hiroshihorie@users.noreply.github.com> Date: Tue Mar 8 15:54:33 2022 +0900 use 0.9.9 commit 5f212a7dfabed450423479a0d4e7803dcd23d27f Author: Hiroshi Horie <548776+hiroshihorie@users.noreply.github.com> Date: Tue Mar 8 15:53:13 2022 +0900 adjustments commit 562d94a8c48b5f2a8661de40601f98a65172c602 Author: Hiroshi Horie <548776+hiroshihorie@users.noreply.github.com> Date: Fri Mar 4 13:19:03 2022 +0900 report stats commit 5f87018e3efcde467a080a74b4af734e58e24647 Author: Hiroshi Horie <548776+hiroshihorie@users.noreply.github.com> Date: Wed Mar 2 17:55:38 2022 +0900 param fix --- LiveKitExample.xcodeproj/project.pbxproj | 10 +++++----- .../xcshareddata/swiftpm/Package.resolved | 4 ++-- Shared/ConnectView.swift | 3 +++ Shared/Controllers/RoomContext.swift | 10 ++++++++-- Shared/ParticipantView.swift | 2 +- Shared/Support/SecureStore.swift | 1 + iOS/BroadcastExt/SampleHandler.swift | 2 +- macOS/Info.plist | 18 +++++++++--------- 8 files changed, 30 insertions(+), 20 deletions(-) diff --git a/LiveKitExample.xcodeproj/project.pbxproj b/LiveKitExample.xcodeproj/project.pbxproj index 15334ad..7001706 100644 --- a/LiveKitExample.xcodeproj/project.pbxproj +++ b/LiveKitExample.xcodeproj/project.pbxproj @@ -678,7 +678,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 8; DEVELOPMENT_TEAM = J48VV6BZV9; ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; @@ -691,7 +691,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 11.0; - MARKETING_VERSION = 1.0.4; + MARKETING_VERSION = 1.0.5; PRODUCT_BUNDLE_IDENTIFIER = "io.livekit.example.Multiplatform-SwiftUI"; PRODUCT_NAME = LiveKitExample; SDKROOT = macosx; @@ -708,7 +708,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 8; DEVELOPMENT_TEAM = J48VV6BZV9; ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; @@ -721,7 +721,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 11.0; - MARKETING_VERSION = 1.0.4; + MARKETING_VERSION = 1.0.5; PRODUCT_BUNDLE_IDENTIFIER = "io.livekit.example.Multiplatform-SwiftUI"; PRODUCT_NAME = LiveKitExample; SDKROOT = macosx; @@ -792,7 +792,7 @@ repositoryURL = "https://github.com/livekit/client-sdk-swift"; requirement = { kind = exactVersion; - version = 0.9.8; + version = 0.9.9; }; }; 68816CBF27B4D6BC00E24622 /* XCRemoteSwiftPackageReference "KeychainAccess" */ = { diff --git a/LiveKitExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/LiveKitExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 1085135..f6b339e 100644 --- a/LiveKitExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/LiveKitExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -6,8 +6,8 @@ "repositoryURL": "https://github.com/livekit/client-sdk-swift", "state": { "branch": null, - "revision": "600994caf57ebe0052e339462a3c0786bdf3f981", - "version": "0.9.8" + "revision": "dd8dc57bc53487ec4437d8b6bed3117c3495adb5", + "version": "0.9.9" } }, { diff --git a/Shared/ConnectView.swift b/Shared/ConnectView.swift index f88af17..122cbc0 100644 --- a/Shared/ConnectView.swift +++ b/Shared/ConnectView.swift @@ -56,6 +56,9 @@ struct ConnectView: View { Toggle(isOn: $roomCtx.dynacast) { Text("Dynacast") } + Toggle(isOn: $roomCtx.reportStats) { + Text("Report stats") + } } label: { Image(systemSymbol: .gear) .renderingMode(.original) diff --git a/Shared/Controllers/RoomContext.swift b/Shared/Controllers/RoomContext.swift index 0c9dc1f..c9b0e77 100644 --- a/Shared/Controllers/RoomContext.swift +++ b/Shared/Controllers/RoomContext.swift @@ -39,6 +39,10 @@ final class RoomContext: ObservableObject { didSet { store.value.dynacast = dynacast } } + @Published var reportStats: Bool = false { + didSet { store.value.reportStats = reportStats } + } + // ConnectOptions @Published var autoSubscribe: Bool = true { didSet { store.value.autoSubscribe = autoSubscribe} @@ -58,6 +62,7 @@ final class RoomContext: ObservableObject { self.simulcast = preferences.simulcast self.adaptiveStream = preferences.adaptiveStream self.dynacast = preferences.dynacast + self.reportStats = preferences.reportStats self.autoSubscribe = preferences.autoSubscribe self.publish = preferences.publishMode } @@ -72,7 +77,7 @@ final class RoomContext: ObservableObject { let connectOptions = ConnectOptions( autoSubscribe: !publish && autoSubscribe, // don't autosubscribe if publish mode - publish: publish ? "publish_\(UUID().uuidString)" : nil + publishOnlyMode: publish ? "publish_\(UUID().uuidString)" : nil ) let roomOptions = RoomOptions( @@ -81,7 +86,8 @@ final class RoomContext: ObservableObject { simulcast: publish ? false : simulcast ), adaptiveStream: adaptiveStream, - dynacast: dynacast + dynacast: dynacast, + reportStats: reportStats ) return room.room.connect(url, diff --git a/Shared/ParticipantView.swift b/Shared/ParticipantView.swift index ea8d866..dcba148 100644 --- a/Shared/ParticipantView.swift +++ b/Shared/ParticipantView.swift @@ -100,7 +100,7 @@ struct ParticipantView: View { .background(Color.black.opacity(0.5)) .cornerRadius(8) } - .padding() + .padding(5) } } } else if let publication = participant.mainVideoPublication as? RemoteTrackPublication, diff --git a/Shared/Support/SecureStore.swift b/Shared/Support/SecureStore.swift index 96483b8..20a0062 100644 --- a/Shared/Support/SecureStore.swift +++ b/Shared/Support/SecureStore.swift @@ -16,6 +16,7 @@ struct Preferences: Codable, Equatable { var simulcast = true var adaptiveStream = true var dynacast = true + var reportStats = true // Settings var videoViewVisible = true diff --git a/iOS/BroadcastExt/SampleHandler.swift b/iOS/BroadcastExt/SampleHandler.swift index 20a09c9..34c7cd4 100644 --- a/iOS/BroadcastExt/SampleHandler.swift +++ b/iOS/BroadcastExt/SampleHandler.swift @@ -24,7 +24,7 @@ class SampleHandler: RPBroadcastSampleHandler { let connectOptions = ConnectOptions( // do not subscribe since this is for publish only autoSubscribe: false, - publish: "screen_share" + publishOnlyMode: "screen_share" ) let roomOptions = RoomOptions( diff --git a/macOS/Info.plist b/macOS/Info.plist index 400a3be..dd24151 100644 --- a/macOS/Info.plist +++ b/macOS/Info.plist @@ -20,6 +20,15 @@ $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString $(MARKETING_VERSION) + CFBundleURLTypes + + + CFBundleURLSchemes + + livekit + + + CFBundleVersion $(CURRENT_PROJECT_VERSION) LSApplicationCategoryType @@ -35,14 +44,5 @@ uses your camera for video chat NSMicrophoneUsageDescription uses your microphone for video chat - CFBundleURLTypes - - - CFBundleURLSchemes - - livekit - - -