From 581824efcd5f534122add4a18214211ec6a6c726 Mon Sep 17 00:00:00 2001 From: Christopher Eagleston Date: Fri, 28 May 2021 13:25:30 -0700 Subject: [PATCH 1/5] VIDEO-4517: Add Client Track Switch Off Control Support (#156) * Client track switch off is enabled by default * The app does not implement any specific manual controls, this is effectively the legacy behavior without maxTracks * Remove renderer when cell is not visible * Remove maxTracks from the app. * Use 4.5.0-rc1. * Update pods * Remove renderer when video track changes * Fix podfile Co-authored-by: Tim Rozum --- Podfile | 5 +- Podfile.lock | 11 ++-- .../Mocks/MockAppSettingsStore.swift | 23 +------- VideoApp/VideoApp.xcodeproj/project.pbxproj | 18 ++++-- .../Stores/AppSettings/AppSettingsStore.swift | 6 +- .../ClientTrackSwitchOffControl.swift | 31 ++++++++++ .../Storyboards/Base.lproj/Main.storyboard | 4 +- .../Video/Room/ConnectOptionsFactory.swift | 12 +++- .../Room/RoomViewController.swift | 21 +++++++ ...ProfileSettingsViewControllerFactory.swift | 2 +- .../BandwidthProfileSettingsViewModel.swift | 19 +++--- .../EditMaxTracksViewModel.swift | 44 -------------- ...rackSwitchOffControlViewModelFactory.swift | 27 +++++++++ .../Cells/Participant/ParticipantCell.swift | 4 ++ .../VideoApp/Views/VideoView/VideoView.swift | 59 +++++++++++-------- 15 files changed, 165 insertions(+), 121 deletions(-) create mode 100644 VideoApp/VideoApp/Stores/AppSettings/ClientTrackSwitchOffControl.swift delete mode 100644 VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/EditMaxTracksViewModel.swift create mode 100644 VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/SelectClientTrackSwitchOffControlViewModelFactory.swift diff --git a/Podfile b/Podfile index 330da00d..5d47145f 100644 --- a/Podfile +++ b/Podfile @@ -1,3 +1,6 @@ +source 'git@github.com:twilio/cocoapod-specs-internal.git' +source 'https://cdn.cocoapods.org/' + platform :ios, '12.0' inhibit_all_warnings! use_frameworks! @@ -14,7 +17,7 @@ target 'Video-Internal' do pod 'FirebaseUI/Google', '~> 9' pod 'IGListDiffKit', '~> 4' pod 'KeychainAccess', '~> 4' - pod 'TwilioVideo', '~> 4' + pod 'TwilioVideo', '4.5.0-rc1' target 'Video-InternalTests' do pod 'Nimble', '~> 9' diff --git a/Podfile.lock b/Podfile.lock index 46d3514a..f9f932dc 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -106,7 +106,7 @@ PODS: - Nimble (9.2.0) - PromisesObjC (1.2.12) - Quick (3.1.2) - - TwilioVideo (4.4.0) + - TwilioVideo (4.5.0-rc1) DEPENDENCIES: - Alamofire (~> 5) @@ -119,9 +119,11 @@ DEPENDENCIES: - KeychainAccess (~> 4) - Nimble (~> 9) - Quick (~> 3) - - TwilioVideo (~> 4) + - TwilioVideo (= 4.5.0-rc1) SPEC REPOS: + "git@github.com:twilio/cocoapod-specs-internal.git": + - TwilioVideo trunk: - Alamofire - AppAuth @@ -146,7 +148,6 @@ SPEC REPOS: - Nimble - PromisesObjC - Quick - - TwilioVideo SPEC CHECKSUMS: Alamofire: e447a2774a40c996748296fa2c55112fdbbc42f9 @@ -172,8 +173,8 @@ SPEC CHECKSUMS: Nimble: 4f4a345c80b503b3ea13606a4f98405974ee4d0b PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97 Quick: 60f0ea3b8e0cfc0df3259a5c06a238ad8b3c46e0 - TwilioVideo: fcf10b7460e582570887d194b73e75425685d813 + TwilioVideo: b4f306d7191c0893d2223c5b73c34c14d60fdf68 -PODFILE CHECKSUM: f22db36db4545a131be7417d00df2ce176070bc3 +PODFILE CHECKSUM: 714684a7a675f13a0a067c6bd9af485e01203d58 COCOAPODS: 1.10.0 diff --git a/VideoApp/Video-InternalTests/Mocks/MockAppSettingsStore.swift b/VideoApp/Video-InternalTests/Mocks/MockAppSettingsStore.swift index 72e501be..7992814f 100644 --- a/VideoApp/Video-InternalTests/Mocks/MockAppSettingsStore.swift +++ b/VideoApp/Video-InternalTests/Mocks/MockAppSettingsStore.swift @@ -17,6 +17,7 @@ @testable import VideoApp class MockAppSettingsStore: AppSettingsStoreWriting { + var clientTrackSwitchOffControl: ClientTrackSwitchOffControl = .auto var invokedEnvironmentSetter = false var invokedEnvironmentSetterCount = 0 @@ -282,28 +283,6 @@ class MockAppSettingsStore: AppSettingsStoreWriting { } } - var invokedMaxTracksSetter = false - var invokedMaxTracksSetterCount = 0 - var invokedMaxTracks: Int? - var invokedMaxTracksList = [Int?]() - var invokedMaxTracksGetter = false - var invokedMaxTracksGetterCount = 0 - var stubbedMaxTracks: Int! - - var maxTracks: Int? { - set { - invokedMaxTracksSetter = true - invokedMaxTracksSetterCount += 1 - invokedMaxTracks = newValue - invokedMaxTracksList.append(newValue) - } - get { - invokedMaxTracksGetter = true - invokedMaxTracksGetterCount += 1 - return stubbedMaxTracks - } - } - var invokedDominantSpeakerPrioritySetter = false var invokedDominantSpeakerPrioritySetterCount = 0 var invokedDominantSpeakerPriority: TrackPriority? diff --git a/VideoApp/VideoApp.xcodeproj/project.pbxproj b/VideoApp/VideoApp.xcodeproj/project.pbxproj index f05d6b7f..1c4ed28c 100644 --- a/VideoApp/VideoApp.xcodeproj/project.pbxproj +++ b/VideoApp/VideoApp.xcodeproj/project.pbxproj @@ -28,6 +28,10 @@ 4B0012811FBA52E5004A587E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 241282461E36A6AB002198BE /* Assets.xcassets */; }; 4B0012831FBA52E5004A587E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 241282431E36A6AB002198BE /* Main.storyboard */; }; 752D4639BF9718A771C3B2EF /* Pods_Video_InternalUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C9C557AEFEDA02580046B98 /* Pods_Video_InternalUITests.framework */; }; + 8A206F0E263912B600EFCD97 /* ClientTrackSwitchOffControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A206F0D263912B600EFCD97 /* ClientTrackSwitchOffControl.swift */; }; + 8A206F0F263912B600EFCD97 /* ClientTrackSwitchOffControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A206F0D263912B600EFCD97 /* ClientTrackSwitchOffControl.swift */; }; + 8A206F40263919CA00EFCD97 /* SelectClientTrackSwitchOffControlViewModelFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A206F3F263919CA00EFCD97 /* SelectClientTrackSwitchOffControlViewModelFactory.swift */; }; + 8A206F41263919CA00EFCD97 /* SelectClientTrackSwitchOffControlViewModelFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A206F3F263919CA00EFCD97 /* SelectClientTrackSwitchOffControlViewModelFactory.swift */; }; 8AC4999B232A18D2005A4B35 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AC49999232A18D2005A4B35 /* SceneDelegate.swift */; }; 8AC4999C232A18D2005A4B35 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AC49999232A18D2005A4B35 /* SceneDelegate.swift */; }; 93223A7F4DEC256BF49177A0 /* Pods_Video_Internal_Video_Community.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0BAD7F49B9C6F06A36CDD692 /* Pods_Video_Internal_Video_Community.framework */; }; @@ -55,8 +59,6 @@ DC1C2F9023AC30070044FB4D /* AppInfoStoreFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC1C2F8D23AC30070044FB4D /* AppInfoStoreFactory.swift */; }; DC1C2F9323AC34B30044FB4D /* BundleProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC1C2F9123AC34B30044FB4D /* BundleProtocol.swift */; }; DC1C2F9423AC34B30044FB4D /* BundleProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC1C2F9123AC34B30044FB4D /* BundleProtocol.swift */; }; - DC2511A8247817C600C776D6 /* EditMaxTracksViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC2511A6247817C600C776D6 /* EditMaxTracksViewModel.swift */; }; - DC2511A9247817C600C776D6 /* EditMaxTracksViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC2511A6247817C600C776D6 /* EditMaxTracksViewModel.swift */; }; DC2511AC2478213400C776D6 /* EditMaxSubscriptionBitrateViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC2511AA2478213400C776D6 /* EditMaxSubscriptionBitrateViewModel.swift */; }; DC2511AD2478213400C776D6 /* EditMaxSubscriptionBitrateViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC2511AA2478213400C776D6 /* EditMaxSubscriptionBitrateViewModel.swift */; }; DC2511B4248921CD00C776D6 /* ParticipantDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC2511B2248921CD00C776D6 /* ParticipantDelegate.swift */; }; @@ -472,6 +474,8 @@ 4B00128B1FBA52E5004A587E /* Video-Community.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Video-Community.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 4C9C557AEFEDA02580046B98 /* Pods_Video_InternalUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Video_InternalUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 5BBBCFD96628BCB502CCDA04 /* Pods-Video-Internal-Video-InternalTests-Video-CommunityTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Video-Internal-Video-InternalTests-Video-CommunityTests.debug.xcconfig"; path = "Target Support Files/Pods-Video-Internal-Video-InternalTests-Video-CommunityTests/Pods-Video-Internal-Video-InternalTests-Video-CommunityTests.debug.xcconfig"; sourceTree = ""; }; + 8A206F0D263912B600EFCD97 /* ClientTrackSwitchOffControl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClientTrackSwitchOffControl.swift; sourceTree = ""; }; + 8A206F3F263919CA00EFCD97 /* SelectClientTrackSwitchOffControlViewModelFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectClientTrackSwitchOffControlViewModelFactory.swift; sourceTree = ""; }; 8AC49999232A18D2005A4B35 /* SceneDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; A10066E39687E61F986470C1 /* Pods_Video_Twilio_Video_TwilioTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Video_Twilio_Video_TwilioTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; A75F43370842DD4A8718485D /* Pods-Video-InternalUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Video-InternalUITests.debug.xcconfig"; path = "Target Support Files/Pods-Video-InternalUITests/Pods-Video-InternalUITests.debug.xcconfig"; sourceTree = ""; }; @@ -496,7 +500,6 @@ DC1C2F8923A6E7270044FB4D /* NotificationCenterProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationCenterProtocol.swift; sourceTree = ""; }; DC1C2F8D23AC30070044FB4D /* AppInfoStoreFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppInfoStoreFactory.swift; sourceTree = ""; }; DC1C2F9123AC34B30044FB4D /* BundleProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BundleProtocol.swift; sourceTree = ""; }; - DC2511A6247817C600C776D6 /* EditMaxTracksViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditMaxTracksViewModel.swift; sourceTree = ""; }; DC2511AA2478213400C776D6 /* EditMaxSubscriptionBitrateViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditMaxSubscriptionBitrateViewModel.swift; sourceTree = ""; }; DC2511B2248921CD00C776D6 /* ParticipantDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParticipantDelegate.swift; sourceTree = ""; }; DC338A2724367AEC0093E855 /* Unit.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = Unit.xctestplan; sourceTree = ""; }; @@ -1036,6 +1039,7 @@ children = ( DC4E4E1E23577EA700C5D313 /* AppSettingsStore.swift */, DCEDB36924743D1D006AF70D /* BandwidthProfileMode.swift */, + 8A206F0D263912B600EFCD97 /* ClientTrackSwitchOffControl.swift */, DC044683238EF6C20072F597 /* Environment.swift */, DC82A34E23FC9AAA0081578C /* JSONContainer.swift */, DC0446DA23A40E3E0072F597 /* Storage.swift */, @@ -1587,8 +1591,8 @@ DCEDB36524743BB5006AF70D /* BandwidthProfileSettingsViewControllerFactory.swift */, DCEDB36124743A15006AF70D /* BandwidthProfileSettingsViewModel.swift */, DC2511AA2478213400C776D6 /* EditMaxSubscriptionBitrateViewModel.swift */, - DC2511A6247817C600C776D6 /* EditMaxTracksViewModel.swift */, DCEDB36D24743DD4006AF70D /* SelectBandwidthProfileModeViewModelFactory.swift */, + 8A206F3F263919CA00EFCD97 /* SelectClientTrackSwitchOffControlViewModelFactory.swift */, DCEDB375247443E3006AF70D /* SelectDominantSpeakerPriorityViewModelFactory.swift */, DCEDB37D247447D3006AF70D /* SelectTrackSwitchOffModeViewModelFactory.swift */, ); @@ -2245,6 +2249,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 8A206F0E263912B600EFCD97 /* ClientTrackSwitchOffControl.swift in Sources */, DCA65029240F1E0D0038DEE1 /* InternalCreateTwilioAccessTokenRequest.swift in Sources */, DC044692238F1E3C0072F597 /* UserStore.swift in Sources */, DC9A5E26246207E600E4B079 /* CameraSourceFactory.swift in Sources */, @@ -2320,7 +2325,6 @@ DCAEBF382383581F00141D2D /* EditTextViewController.swift in Sources */, 243CDB4B22665F1800637B6B /* UIColorHelpers.swift in Sources */, DC3924912416A8070068E33F /* APIErrorResponseDecoder.swift in Sources */, - DC2511A8247817C600C776D6 /* EditMaxTracksViewModel.swift in Sources */, DCEDB3942475D349006AF70D /* RenderDimensionsSettingsViewControllerFactory.swift in Sources */, DCEDB36F24743DD4006AF70D /* SelectBandwidthProfileModeViewModelFactory.swift in Sources */, DCD7675223DBA3AA00A2939C /* DeepLinkStore.swift in Sources */, @@ -2345,6 +2349,7 @@ DC44C2E723876AFB00205174 /* SelectOptionSegueSender.swift in Sources */, DCB7C18F2405C0BE009DEA70 /* KeychainStorage.swift in Sources */, DC44C2E323875C4F00205174 /* StringHelpers.swift in Sources */, + 8A206F40263919CA00EFCD97 /* SelectClientTrackSwitchOffControlViewModelFactory.swift in Sources */, DCF4614D238598C700DD8FEA /* SettingsViewModel.swift in Sources */, DCC7E36B24085AD800431AC3 /* APIError.swift in Sources */, DC8AA8AE236228A3006C06D5 /* AuthStoreFactory.swift in Sources */, @@ -2421,6 +2426,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 8A206F0F263912B600EFCD97 /* ClientTrackSwitchOffControl.swift in Sources */, DCA6502A240F1E0D0038DEE1 /* InternalCreateTwilioAccessTokenRequest.swift in Sources */, DC044693238F1E3C0072F597 /* UserStore.swift in Sources */, DC9A5E27246207E600E4B079 /* CameraSourceFactory.swift in Sources */, @@ -2496,7 +2502,6 @@ DCAEBF392383581F00141D2D /* EditTextViewController.swift in Sources */, 243CDB4C22665F1800637B6B /* UIColorHelpers.swift in Sources */, DC3924922416A8070068E33F /* APIErrorResponseDecoder.swift in Sources */, - DC2511A9247817C600C776D6 /* EditMaxTracksViewModel.swift in Sources */, DCEDB3952475D349006AF70D /* RenderDimensionsSettingsViewControllerFactory.swift in Sources */, DCEDB37024743DD4006AF70D /* SelectBandwidthProfileModeViewModelFactory.swift in Sources */, DCD7675323DBA3AA00A2939C /* DeepLinkStore.swift in Sources */, @@ -2521,6 +2526,7 @@ DC44C2E823876AFB00205174 /* SelectOptionSegueSender.swift in Sources */, DCB7C1902405C0BE009DEA70 /* KeychainStorage.swift in Sources */, DC44C2E423875C4F00205174 /* StringHelpers.swift in Sources */, + 8A206F41263919CA00EFCD97 /* SelectClientTrackSwitchOffControlViewModelFactory.swift in Sources */, DCF4614E238598C700DD8FEA /* SettingsViewModel.swift in Sources */, DCC7E36C24085AD800431AC3 /* APIError.swift in Sources */, DC8AA8AF236228A3006C06D5 /* AuthStoreFactory.swift in Sources */, diff --git a/VideoApp/VideoApp/Stores/AppSettings/AppSettingsStore.swift b/VideoApp/VideoApp/Stores/AppSettings/AppSettingsStore.swift index f22a87c3..07976580 100644 --- a/VideoApp/VideoApp/Stores/AppSettings/AppSettingsStore.swift +++ b/VideoApp/VideoApp/Stores/AppSettings/AppSettingsStore.swift @@ -29,13 +29,13 @@ protocol AppSettingsStoreWriting: LaunchStore { var webRTCSDKLogLevel: SDKLogLevel { get set } var bandwidthProfileMode: BandwidthProfileMode { get set } var maxSubscriptionBitrate: Int? { get set } - var maxTracks: Int? { get set } var dominantSpeakerPriority: TrackPriority { get set } var trackSwitchOffMode: TrackSwitchOffMode { get set } var lowRenderDimensions: VideoDimensionsName { get set } var standardRenderDimensions: VideoDimensionsName { get set } var highRenderDimensions: VideoDimensionsName { get set } var remoteRoomType: CommunityCreateTwilioAccessTokenResponse.RoomType? { get set } + var clientTrackSwitchOffControl: ClientTrackSwitchOffControl { get set } func reset() } @@ -52,14 +52,14 @@ class AppSettingsStore: AppSettingsStoreWriting { @Storage(key: makeKey("webRTCSDKLogLevel"), defaultValue: SDKLogLevel.off) var webRTCSDKLogLevel: SDKLogLevel @Storage(key: makeKey("bandwidthProfileMode"), defaultValue: BandwidthProfileMode.collaboration) var bandwidthProfileMode: BandwidthProfileMode @Storage(key: makeKey("maxSubscriptionBitrate"), defaultValue: nil) var maxSubscriptionBitrate: Int? - @Storage(key: makeKey("maxTracks"), defaultValue: 5) var maxTracks: Int? @Storage(key: makeKey("dominantSpeakerPriority"), defaultValue: TrackPriority.serverDefault) var dominantSpeakerPriority: TrackPriority @Storage(key: makeKey("trackSwitchOffMode"), defaultValue: TrackSwitchOffMode.serverDefault) var trackSwitchOffMode: TrackSwitchOffMode @Storage(key: makeKey("lowRenderDimensions"), defaultValue: VideoDimensionsName.serverDefault) var lowRenderDimensions: VideoDimensionsName @Storage(key: makeKey("standardRenderDimensions"), defaultValue: VideoDimensionsName.serverDefault) var standardRenderDimensions: VideoDimensionsName @Storage(key: makeKey("highRenderDimensions"), defaultValue: VideoDimensionsName.serverDefault) var highRenderDimensions: VideoDimensionsName @Storage(key: makeKey("remoteRoomType"), defaultValue: nil) var remoteRoomType: CommunityCreateTwilioAccessTokenResponse.RoomType? - + @Storage(key: makeKey("clientTrackSwitchOffControl"), defaultValue: .sdkDefault) var clientTrackSwitchOffControl: ClientTrackSwitchOffControl + static var shared: AppSettingsStoreWriting = AppSettingsStore( notificationCenter: NotificationCenter.default, queue: DispatchQueue.main, diff --git a/VideoApp/VideoApp/Stores/AppSettings/ClientTrackSwitchOffControl.swift b/VideoApp/VideoApp/Stores/AppSettings/ClientTrackSwitchOffControl.swift new file mode 100644 index 00000000..717b9560 --- /dev/null +++ b/VideoApp/VideoApp/Stores/AppSettings/ClientTrackSwitchOffControl.swift @@ -0,0 +1,31 @@ +// +// Copyright (C) 2021 Twilio, Inc. +// +// 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 + +enum ClientTrackSwitchOffControl: String, SettingOptions { + case sdkDefault + case auto + case manual + + var title: String { + switch self { + case .sdkDefault: return "SDK Default" + case .auto: return "Auto" + case .manual: return "Manual" + } + } +} diff --git a/VideoApp/VideoApp/Storyboards/Base.lproj/Main.storyboard b/VideoApp/VideoApp/Storyboards/Base.lproj/Main.storyboard index 2f0c2f6f..6a3f304c 100755 --- a/VideoApp/VideoApp/Storyboards/Base.lproj/Main.storyboard +++ b/VideoApp/VideoApp/Storyboards/Base.lproj/Main.storyboard @@ -528,7 +528,7 @@ - + @@ -668,7 +668,7 @@ - + diff --git a/VideoApp/VideoApp/Video/Room/ConnectOptionsFactory.swift b/VideoApp/VideoApp/Video/Room/ConnectOptionsFactory.swift index 5df74180..9afc709b 100644 --- a/VideoApp/VideoApp/Video/Room/ConnectOptionsFactory.swift +++ b/VideoApp/VideoApp/Video/Room/ConnectOptionsFactory.swift @@ -49,7 +49,6 @@ import TwilioVideo videoOptions: VideoBandwidthProfileOptions { builder in builder.mode = TwilioVideo.BandwidthProfileMode(setting: self.appSettingsStore.bandwidthProfileMode) builder.maxSubscriptionBitrate = self.appSettingsStore.maxSubscriptionBitrate as NSNumber? - builder.maxTracks = self.appSettingsStore.maxTracks as NSNumber? builder.dominantSpeakerPriority = Track.Priority(setting: self.appSettingsStore.dominantSpeakerPriority) builder.trackSwitchOffMode = Track.SwitchOffMode(setting: self.appSettingsStore.trackSwitchOffMode) let renderDimensions = VideoRenderDimensions() @@ -57,6 +56,7 @@ import TwilioVideo renderDimensions.standard = VideoDimensions(setting: self.appSettingsStore.standardRenderDimensions) renderDimensions.high = VideoDimensions(setting: self.appSettingsStore.highRenderDimensions) builder.renderDimensions = renderDimensions + builder.clientTrackSwitchOffControl = TwilioVideo.ClientTrackSwitchOffControl(setting:self.appSettingsStore.clientTrackSwitchOffControl) } ) builder.preferredVideoCodecs = [TwilioVideo.VideoCodec.make(setting: self.appSettingsStore.videoCodec)] @@ -114,6 +114,16 @@ private extension Track.SwitchOffMode { } } +private extension TwilioVideo.ClientTrackSwitchOffControl { + init?(setting: ClientTrackSwitchOffControl) { + switch setting { + case .sdkDefault: return nil + case .auto: self = .auto + case .manual: self = .manual + } + } +} + private extension VideoDimensions { convenience init?(setting: VideoDimensionsName) { switch setting { diff --git a/VideoApp/VideoApp/ViewControllers/Room/RoomViewController.swift b/VideoApp/VideoApp/ViewControllers/Room/RoomViewController.swift index e1f05659..5234a11b 100644 --- a/VideoApp/VideoApp/ViewControllers/Room/RoomViewController.swift +++ b/VideoApp/VideoApp/ViewControllers/Room/RoomViewController.swift @@ -146,6 +146,27 @@ extension RoomViewController: UICollectionViewDataSource { } extension RoomViewController: UICollectionViewDelegate { + func collectionView( + _ collectionView: UICollectionView, + willDisplay cell: UICollectionViewCell, + forItemAt indexPath: IndexPath + ) { + guard let cell = cell as? ParticipantCell else { return } + + cell.shouldRenderVideo = true + } + + + func collectionView( + _ collectionView: UICollectionView, + didEndDisplaying cell: UICollectionViewCell, + forItemAt indexPath: IndexPath + ) { + guard let cell = cell as? ParticipantCell else { return } + + cell.shouldRenderVideo = false + } + func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { viewModel.togglePin(at: indexPath.item) } diff --git a/VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/BandwidthProfileSettingsViewControllerFactory.swift b/VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/BandwidthProfileSettingsViewControllerFactory.swift index 4145821f..0e8f7ea0 100644 --- a/VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/BandwidthProfileSettingsViewControllerFactory.swift +++ b/VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/BandwidthProfileSettingsViewControllerFactory.swift @@ -22,8 +22,8 @@ class BandwidthProfileSettingsViewControllerFactory: ViewControllerFactory { appSettingsStore: AppSettingsStore.shared, selectBandwidthProfileModeViewModelFactory: SelectBandwidthProfileModeViewModelFactory(), editMaxSubscriptionBitrateViewModelFactory: EditMaxSubscriptionBitrateViewModelFactory(), - editMaxTracksViewModelFactory: EditMaxTracksViewModelFactory(), selectDominantSpeakerPriorityViewModelFactory: SelectDominantSpeakerPriorityViewModelFactory(), + selectClientTrackSwitchOffControlViewModelFactory: SelectClientTrackSwitchOffControlViewModelFactory(), selectTrackSwitchOffModeViewModelFactory: SelectTrackSwitchOffModeViewModelFactory(), renderDimensionsSettingsViewControllerFactory: RenderDimensionsSettingsViewControllerFactory() ) diff --git a/VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/BandwidthProfileSettingsViewModel.swift b/VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/BandwidthProfileSettingsViewModel.swift index fdc1f5e3..6633cc6b 100644 --- a/VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/BandwidthProfileSettingsViewModel.swift +++ b/VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/BandwidthProfileSettingsViewModel.swift @@ -20,7 +20,6 @@ class BandwidthProfileSettingsViewModel: SettingsViewModel { let title = "Bandwidth Profile" var sections: [SettingsViewModelSection] { let editMaxSubscriptionBitrateViewModel = editMaxSubscriptionBitrateViewModelFactory.makeEditTextViewModel() - let editMaxTracksViewModel = editMaxTracksViewModelFactory.makeEditTextViewModel() return [ .init( @@ -35,11 +34,6 @@ class BandwidthProfileSettingsViewModel: SettingsViewModel { text: editMaxSubscriptionBitrateViewModel.text.nilIfEmpty ?? editMaxSubscriptionBitrateViewModel.placeholder, viewModelFactory: editMaxSubscriptionBitrateViewModelFactory ), - .editableText( - title: editMaxTracksViewModel.title, - text: editMaxTracksViewModel.text.nilIfEmpty ?? editMaxTracksViewModel.placeholder, - viewModelFactory: editMaxTracksViewModelFactory - ), .optionList( title: "Dominant Speaker Priority", selectedOption: appSettingsStore.dominantSpeakerPriority.title, @@ -50,7 +44,12 @@ class BandwidthProfileSettingsViewModel: SettingsViewModel { selectedOption: appSettingsStore.trackSwitchOffMode.title, viewModelFactory: selectTrackSwitchOffModeViewModelFactory ), - .push(title: "Render Dimensions", viewControllerFactory: RenderDimensionsSettingsViewControllerFactory()) + .push(title: "Render Dimensions", viewControllerFactory: RenderDimensionsSettingsViewControllerFactory()), + .optionList( + title: "Client Track Switch Off Control", + selectedOption: appSettingsStore.clientTrackSwitchOffControl.title, + viewModelFactory: selectClientTrackSwitchOffControlViewModelFactory + ) ] ) ] @@ -58,8 +57,8 @@ class BandwidthProfileSettingsViewModel: SettingsViewModel { private let appSettingsStore: AppSettingsStoreWriting private let selectBandwidthProfileModeViewModelFactory: SelectBandwidthProfileModeViewModelFactory private let editMaxSubscriptionBitrateViewModelFactory: EditMaxSubscriptionBitrateViewModelFactory - private let editMaxTracksViewModelFactory: EditMaxTracksViewModelFactory private let selectDominantSpeakerPriorityViewModelFactory: SelectDominantSpeakerPriorityViewModelFactory + private let selectClientTrackSwitchOffControlViewModelFactory: SelectClientTrackSwitchOffControlViewModelFactory private let selectTrackSwitchOffModeViewModelFactory: SelectTrackSwitchOffModeViewModelFactory private let renderDimensionsSettingsViewControllerFactory: RenderDimensionsSettingsViewControllerFactory @@ -67,16 +66,16 @@ class BandwidthProfileSettingsViewModel: SettingsViewModel { appSettingsStore: AppSettingsStoreWriting, selectBandwidthProfileModeViewModelFactory: SelectBandwidthProfileModeViewModelFactory, editMaxSubscriptionBitrateViewModelFactory: EditMaxSubscriptionBitrateViewModelFactory, - editMaxTracksViewModelFactory: EditMaxTracksViewModelFactory, selectDominantSpeakerPriorityViewModelFactory: SelectDominantSpeakerPriorityViewModelFactory, + selectClientTrackSwitchOffControlViewModelFactory: SelectClientTrackSwitchOffControlViewModelFactory, selectTrackSwitchOffModeViewModelFactory: SelectTrackSwitchOffModeViewModelFactory, renderDimensionsSettingsViewControllerFactory: RenderDimensionsSettingsViewControllerFactory ) { self.appSettingsStore = appSettingsStore self.selectBandwidthProfileModeViewModelFactory = selectBandwidthProfileModeViewModelFactory self.editMaxSubscriptionBitrateViewModelFactory = editMaxSubscriptionBitrateViewModelFactory - self.editMaxTracksViewModelFactory = editMaxTracksViewModelFactory self.selectDominantSpeakerPriorityViewModelFactory = selectDominantSpeakerPriorityViewModelFactory + self.selectClientTrackSwitchOffControlViewModelFactory = selectClientTrackSwitchOffControlViewModelFactory self.selectTrackSwitchOffModeViewModelFactory = selectTrackSwitchOffModeViewModelFactory self.renderDimensionsSettingsViewControllerFactory = renderDimensionsSettingsViewControllerFactory } diff --git a/VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/EditMaxTracksViewModel.swift b/VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/EditMaxTracksViewModel.swift deleted file mode 100644 index 9516a3c7..00000000 --- a/VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/EditMaxTracksViewModel.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// Copyright (C) 2020 Twilio, Inc. -// -// 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 - -class EditMaxTracksViewModelFactory: EditTextViewModelFactory { - func makeEditTextViewModel() -> EditTextViewModel { - EditMaxTracksViewModel(appSettingsStore: AppSettingsStore.shared) - } -} - -class EditMaxTracksViewModel: EditTextViewModel { - let title = "Max Tracks" - var placeholder: String { "Server Default" } - var text: String { - get { - guard let maxTracks = appSettingsStore.maxTracks else { return "" } - - return "\(maxTracks)" - } - set { - appSettingsStore.maxTracks = Int(newValue) - } - } - var keyboardType: UIKeyboardType { .numberPad } - private let appSettingsStore: AppSettingsStoreWriting - - init(appSettingsStore: AppSettingsStoreWriting) { - self.appSettingsStore = appSettingsStore - } -} diff --git a/VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/SelectClientTrackSwitchOffControlViewModelFactory.swift b/VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/SelectClientTrackSwitchOffControlViewModelFactory.swift new file mode 100644 index 00000000..f24522d8 --- /dev/null +++ b/VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/SelectClientTrackSwitchOffControlViewModelFactory.swift @@ -0,0 +1,27 @@ +// +// Copyright (C) 2021 Twilio, Inc. +// +// 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 + +class SelectClientTrackSwitchOffControlViewModelFactory: SelectOptionViewModelFactory { + func makeSelectOptionViewModel() -> SelectOptionViewModel { + SelectSettingViewModel( + title: "Client Track Switch Off Control", + keyPath: \.clientTrackSwitchOffControl, + appSettingsStore: AppSettingsStore.shared + ) + } +} diff --git a/VideoApp/VideoApp/Views/Cells/Participant/ParticipantCell.swift b/VideoApp/VideoApp/Views/Cells/Participant/ParticipantCell.swift index 98d014b5..505b86a8 100644 --- a/VideoApp/VideoApp/Views/Cells/Participant/ParticipantCell.swift +++ b/VideoApp/VideoApp/Views/Cells/Participant/ParticipantCell.swift @@ -28,6 +28,10 @@ class ParticipantCell: UICollectionViewCell { @IBOutlet weak var networkQualityImage: UIImageView! @IBOutlet weak var pinView: UIView! @IBOutlet weak var muteView: UIView! + var shouldRenderVideo: Bool { + get { videoView.shouldRenderVideo } + set { videoView.shouldRenderVideo = newValue } + } func configure(participant: Participant) { identityLabel.text = participant.identity diff --git a/VideoApp/VideoApp/Views/VideoView/VideoView.swift b/VideoApp/VideoApp/Views/VideoView/VideoView.swift index 2e6bf75e..ace33d2f 100644 --- a/VideoApp/VideoApp/Views/VideoView/VideoView.swift +++ b/VideoApp/VideoApp/Views/VideoView/VideoView.swift @@ -17,10 +17,6 @@ import TwilioVideo import UIKit -protocol VideoViewDelegate: AnyObject { - func didUpdateStatus(isVideoOn: Bool) -} - @IBDesignable class VideoView: NibView { struct Config { @@ -30,7 +26,20 @@ class VideoView: NibView { @IBOutlet weak var videoView: TwilioVideo.VideoView! @IBOutlet weak var errorView: UIView! - weak var delegate: VideoViewDelegate? + var shouldRenderVideo = true { + didSet { + guard let videoTrack = videoTrack else { return } + + if shouldRenderVideo { + guard !videoTrack.isRendered(by: videoView) else { return } + + videoTrack.addRenderer(videoView) + videoView.isHidden = !videoView.hasVideoData + } else { + videoTrack.removeRenderer(videoView) + } + } + } private var videoTrack: VideoTrack? deinit { @@ -44,34 +53,32 @@ class VideoView: NibView { } func configure(config: Config, contentMode: UIView.ContentMode = .scaleAspectFit) { - defer { errorView.isHidden = !(config.videoTrack?.isSwitchedOff ?? false) } - - guard let videoTrack = config.videoTrack, videoTrack.isEnabled else { - self.videoTrack?.removeRenderer(videoView) - updateStatus(hasVideoData: false) - return - } - guard !videoTrack.isRendered(by: videoView) || videoView.shouldMirror != config.shouldMirror else { - return // Don't thrash rendering because it causes empty frames to flash - } - - self.videoTrack?.removeRenderer(videoView) - self.videoTrack = videoTrack - videoTrack.addRenderer(videoView) videoView.shouldMirror = config.shouldMirror videoView.contentMode = contentMode - updateStatus(hasVideoData: videoView.hasVideoData) - } - - private func updateStatus(hasVideoData: Bool) { - videoView.isHidden = !hasVideoData - delegate?.didUpdateStatus(isVideoOn: hasVideoData) + errorView.isHidden = !(config.videoTrack?.isSwitchedOff ?? false) + + if let videoTrack = config.videoTrack, videoTrack.isEnabled { + if !videoTrack.isRendered(by: videoView) { + self.videoTrack?.removeRenderer(videoView) + self.videoTrack = videoTrack + videoView.isHidden = true + + if shouldRenderVideo { + videoTrack.addRenderer(videoView) + videoView.isHidden = !videoView.hasVideoData + } + } + } else { + videoTrack?.removeRenderer(videoView) + videoTrack = nil + videoView.isHidden = true + } } } extension VideoView: TwilioVideo.VideoViewDelegate { func videoViewDidReceiveData(view: TwilioVideo.VideoView) { - updateStatus(hasVideoData: true) + videoView.isHidden = false } } From 3a3baa8d2b9b92434c175bbfc5dc8fbb7e56aeaf Mon Sep 17 00:00:00 2001 From: Christopher Eagleston Date: Wed, 4 Aug 2021 11:37:58 -0700 Subject: [PATCH 2/5] VIDEO-5531: Support Video Content Preferences (#164) * Use 4.5.0-rc4. [skip ci] * Add support for video content preferences. * Ability to select VCP in settings * ConnectOptionsFactory applies the settings * SettingsStore provides storage / default value * Remove unused VideoDimensionsName class. * Commit missing factory. * Use mock generator to fix mock * Fix pods Co-authored-by: Tim Rozum --- Podfile | 2 +- Podfile.lock | 8 +- .../Mocks/MockAppSettingsStore.swift | 111 +++++++----------- VideoApp/VideoApp.xcodeproj/project.pbxproj | 56 ++------- .../Stores/AppSettings/AppSettingsStore.swift | 10 +- .../VideoContentPreferencesMode.swift} | 20 ++-- .../AppSettings/VideoDimensionsName.swift | 43 ------- .../Video/Room/ConnectOptionsFactory.swift | 22 +--- ...ProfileSettingsViewControllerFactory.swift | 2 +- .../BandwidthProfileSettingsViewModel.swift | 12 +- ...tentPreferencesModeViewModelFactory.swift} | 8 +- ...ensionsSettingsViewControllerFactory.swift | 29 ----- .../RenderDimensionsSettingsViewModel.swift | 58 --------- ...HighRenderDimensionsViewModelFactory.swift | 27 ----- 14 files changed, 95 insertions(+), 313 deletions(-) rename VideoApp/VideoApp/{ViewControllers/Settings/RenderDimensions/SelectLowRenderDimensionsViewModelFactory.swift => Stores/AppSettings/VideoContentPreferencesMode.swift} (63%) delete mode 100644 VideoApp/VideoApp/Stores/AppSettings/VideoDimensionsName.swift rename VideoApp/VideoApp/ViewControllers/Settings/{RenderDimensions/SelectStandardRenderDimensionsViewModelFactory.swift => BandwidthProfile/SelectVideoContentPreferencesModeViewModelFactory.swift} (77%) delete mode 100644 VideoApp/VideoApp/ViewControllers/Settings/RenderDimensions/RenderDimensionsSettingsViewControllerFactory.swift delete mode 100644 VideoApp/VideoApp/ViewControllers/Settings/RenderDimensions/RenderDimensionsSettingsViewModel.swift delete mode 100644 VideoApp/VideoApp/ViewControllers/Settings/RenderDimensions/SelectHighRenderDimensionsViewModelFactory.swift diff --git a/Podfile b/Podfile index 5d47145f..c50ebfca 100644 --- a/Podfile +++ b/Podfile @@ -17,7 +17,7 @@ target 'Video-Internal' do pod 'FirebaseUI/Google', '~> 9' pod 'IGListDiffKit', '~> 4' pod 'KeychainAccess', '~> 4' - pod 'TwilioVideo', '4.5.0-rc1' + pod 'TwilioVideo', '4.5.0-rc4' target 'Video-InternalTests' do pod 'Nimble', '~> 9' diff --git a/Podfile.lock b/Podfile.lock index f9f932dc..a858de6a 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -106,7 +106,7 @@ PODS: - Nimble (9.2.0) - PromisesObjC (1.2.12) - Quick (3.1.2) - - TwilioVideo (4.5.0-rc1) + - TwilioVideo (4.5.0-rc4) DEPENDENCIES: - Alamofire (~> 5) @@ -119,7 +119,7 @@ DEPENDENCIES: - KeychainAccess (~> 4) - Nimble (~> 9) - Quick (~> 3) - - TwilioVideo (= 4.5.0-rc1) + - TwilioVideo (= 4.5.0-rc4) SPEC REPOS: "git@github.com:twilio/cocoapod-specs-internal.git": @@ -173,8 +173,8 @@ SPEC CHECKSUMS: Nimble: 4f4a345c80b503b3ea13606a4f98405974ee4d0b PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97 Quick: 60f0ea3b8e0cfc0df3259a5c06a238ad8b3c46e0 - TwilioVideo: b4f306d7191c0893d2223c5b73c34c14d60fdf68 + TwilioVideo: 40f1804d3ecbd3df45498a12b91163fc3a03c306 -PODFILE CHECKSUM: 714684a7a675f13a0a067c6bd9af485e01203d58 +PODFILE CHECKSUM: b06441f0f1ac0e0375eb4704f7a6fa036d968850 COCOAPODS: 1.10.0 diff --git a/VideoApp/Video-InternalTests/Mocks/MockAppSettingsStore.swift b/VideoApp/Video-InternalTests/Mocks/MockAppSettingsStore.swift index 7992814f..f4315354 100644 --- a/VideoApp/Video-InternalTests/Mocks/MockAppSettingsStore.swift +++ b/VideoApp/Video-InternalTests/Mocks/MockAppSettingsStore.swift @@ -17,7 +17,6 @@ @testable import VideoApp class MockAppSettingsStore: AppSettingsStoreWriting { - var clientTrackSwitchOffControl: ClientTrackSwitchOffControl = .auto var invokedEnvironmentSetter = false var invokedEnvironmentSetterCount = 0 @@ -327,72 +326,6 @@ class MockAppSettingsStore: AppSettingsStoreWriting { } } - var invokedLowRenderDimensionsSetter = false - var invokedLowRenderDimensionsSetterCount = 0 - var invokedLowRenderDimensions: VideoDimensionsName? - var invokedLowRenderDimensionsList = [VideoDimensionsName]() - var invokedLowRenderDimensionsGetter = false - var invokedLowRenderDimensionsGetterCount = 0 - var stubbedLowRenderDimensions: VideoDimensionsName! - - var lowRenderDimensions: VideoDimensionsName { - set { - invokedLowRenderDimensionsSetter = true - invokedLowRenderDimensionsSetterCount += 1 - invokedLowRenderDimensions = newValue - invokedLowRenderDimensionsList.append(newValue) - } - get { - invokedLowRenderDimensionsGetter = true - invokedLowRenderDimensionsGetterCount += 1 - return stubbedLowRenderDimensions - } - } - - var invokedStandardRenderDimensionsSetter = false - var invokedStandardRenderDimensionsSetterCount = 0 - var invokedStandardRenderDimensions: VideoDimensionsName? - var invokedStandardRenderDimensionsList = [VideoDimensionsName]() - var invokedStandardRenderDimensionsGetter = false - var invokedStandardRenderDimensionsGetterCount = 0 - var stubbedStandardRenderDimensions: VideoDimensionsName! - - var standardRenderDimensions: VideoDimensionsName { - set { - invokedStandardRenderDimensionsSetter = true - invokedStandardRenderDimensionsSetterCount += 1 - invokedStandardRenderDimensions = newValue - invokedStandardRenderDimensionsList.append(newValue) - } - get { - invokedStandardRenderDimensionsGetter = true - invokedStandardRenderDimensionsGetterCount += 1 - return stubbedStandardRenderDimensions - } - } - - var invokedHighRenderDimensionsSetter = false - var invokedHighRenderDimensionsSetterCount = 0 - var invokedHighRenderDimensions: VideoDimensionsName? - var invokedHighRenderDimensionsList = [VideoDimensionsName]() - var invokedHighRenderDimensionsGetter = false - var invokedHighRenderDimensionsGetterCount = 0 - var stubbedHighRenderDimensions: VideoDimensionsName! - - var highRenderDimensions: VideoDimensionsName { - set { - invokedHighRenderDimensionsSetter = true - invokedHighRenderDimensionsSetterCount += 1 - invokedHighRenderDimensions = newValue - invokedHighRenderDimensionsList.append(newValue) - } - get { - invokedHighRenderDimensionsGetter = true - invokedHighRenderDimensionsGetterCount += 1 - return stubbedHighRenderDimensions - } - } - var invokedRemoteRoomTypeSetter = false var invokedRemoteRoomTypeSetterCount = 0 var invokedRemoteRoomType: CommunityCreateTwilioAccessTokenResponse.RoomType? @@ -415,6 +348,50 @@ class MockAppSettingsStore: AppSettingsStoreWriting { } } + var invokedClientTrackSwitchOffControlSetter = false + var invokedClientTrackSwitchOffControlSetterCount = 0 + var invokedClientTrackSwitchOffControl: ClientTrackSwitchOffControl? + var invokedClientTrackSwitchOffControlList = [ClientTrackSwitchOffControl]() + var invokedClientTrackSwitchOffControlGetter = false + var invokedClientTrackSwitchOffControlGetterCount = 0 + var stubbedClientTrackSwitchOffControl: ClientTrackSwitchOffControl! + + var clientTrackSwitchOffControl: ClientTrackSwitchOffControl { + set { + invokedClientTrackSwitchOffControlSetter = true + invokedClientTrackSwitchOffControlSetterCount += 1 + invokedClientTrackSwitchOffControl = newValue + invokedClientTrackSwitchOffControlList.append(newValue) + } + get { + invokedClientTrackSwitchOffControlGetter = true + invokedClientTrackSwitchOffControlGetterCount += 1 + return stubbedClientTrackSwitchOffControl + } + } + + var invokedVideoContentPreferencesModeSetter = false + var invokedVideoContentPreferencesModeSetterCount = 0 + var invokedVideoContentPreferencesMode: VideoContentPreferencesMode? + var invokedVideoContentPreferencesModeList = [VideoContentPreferencesMode]() + var invokedVideoContentPreferencesModeGetter = false + var invokedVideoContentPreferencesModeGetterCount = 0 + var stubbedVideoContentPreferencesMode: VideoContentPreferencesMode! + + var videoContentPreferencesMode: VideoContentPreferencesMode { + set { + invokedVideoContentPreferencesModeSetter = true + invokedVideoContentPreferencesModeSetterCount += 1 + invokedVideoContentPreferencesMode = newValue + invokedVideoContentPreferencesModeList.append(newValue) + } + get { + invokedVideoContentPreferencesModeGetter = true + invokedVideoContentPreferencesModeGetterCount += 1 + return stubbedVideoContentPreferencesMode + } + } + var invokedReset = false var invokedResetCount = 0 diff --git a/VideoApp/VideoApp.xcodeproj/project.pbxproj b/VideoApp/VideoApp.xcodeproj/project.pbxproj index 1c4ed28c..3c80cc42 100644 --- a/VideoApp/VideoApp.xcodeproj/project.pbxproj +++ b/VideoApp/VideoApp.xcodeproj/project.pbxproj @@ -32,6 +32,10 @@ 8A206F0F263912B600EFCD97 /* ClientTrackSwitchOffControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A206F0D263912B600EFCD97 /* ClientTrackSwitchOffControl.swift */; }; 8A206F40263919CA00EFCD97 /* SelectClientTrackSwitchOffControlViewModelFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A206F3F263919CA00EFCD97 /* SelectClientTrackSwitchOffControlViewModelFactory.swift */; }; 8A206F41263919CA00EFCD97 /* SelectClientTrackSwitchOffControlViewModelFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A206F3F263919CA00EFCD97 /* SelectClientTrackSwitchOffControlViewModelFactory.swift */; }; + 8A84724B26B36749004BBC79 /* VideoContentPreferencesMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A84724A26B36749004BBC79 /* VideoContentPreferencesMode.swift */; }; + 8A84724C26B36749004BBC79 /* VideoContentPreferencesMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A84724A26B36749004BBC79 /* VideoContentPreferencesMode.swift */; }; + 8A84724E26B3D1DF004BBC79 /* SelectVideoContentPreferencesModeViewModelFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A84724D26B3D1DF004BBC79 /* SelectVideoContentPreferencesModeViewModelFactory.swift */; }; + 8A84724F26B3D1DF004BBC79 /* SelectVideoContentPreferencesModeViewModelFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A84724D26B3D1DF004BBC79 /* SelectVideoContentPreferencesModeViewModelFactory.swift */; }; 8AC4999B232A18D2005A4B35 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AC49999232A18D2005A4B35 /* SceneDelegate.swift */; }; 8AC4999C232A18D2005A4B35 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AC49999232A18D2005A4B35 /* SceneDelegate.swift */; }; 93223A7F4DEC256BF49177A0 /* Pods_Video_Internal_Video_Community.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0BAD7F49B9C6F06A36CDD692 /* Pods_Video_Internal_Video_Community.framework */; }; @@ -393,18 +397,6 @@ DCEDB384247489A0006AF70D /* SettingOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCEDB381247489A0006AF70D /* SettingOptions.swift */; }; DCEDB387247489DA006AF70D /* SelectSettingViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCEDB385247489DA006AF70D /* SelectSettingViewModel.swift */; }; DCEDB388247489DA006AF70D /* SelectSettingViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCEDB385247489DA006AF70D /* SelectSettingViewModel.swift */; }; - DCEDB38B2475B693006AF70D /* VideoDimensionsName.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCEDB3892475B693006AF70D /* VideoDimensionsName.swift */; }; - DCEDB38C2475B693006AF70D /* VideoDimensionsName.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCEDB3892475B693006AF70D /* VideoDimensionsName.swift */; }; - DCEDB3902475D210006AF70D /* RenderDimensionsSettingsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCEDB38E2475D210006AF70D /* RenderDimensionsSettingsViewModel.swift */; }; - DCEDB3912475D210006AF70D /* RenderDimensionsSettingsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCEDB38E2475D210006AF70D /* RenderDimensionsSettingsViewModel.swift */; }; - DCEDB3942475D349006AF70D /* RenderDimensionsSettingsViewControllerFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCEDB3922475D349006AF70D /* RenderDimensionsSettingsViewControllerFactory.swift */; }; - DCEDB3952475D349006AF70D /* RenderDimensionsSettingsViewControllerFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCEDB3922475D349006AF70D /* RenderDimensionsSettingsViewControllerFactory.swift */; }; - DCEDB3982475D476006AF70D /* SelectLowRenderDimensionsViewModelFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCEDB3962475D476006AF70D /* SelectLowRenderDimensionsViewModelFactory.swift */; }; - DCEDB3992475D476006AF70D /* SelectLowRenderDimensionsViewModelFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCEDB3962475D476006AF70D /* SelectLowRenderDimensionsViewModelFactory.swift */; }; - DCEDB39C2475D4D9006AF70D /* SelectStandardRenderDimensionsViewModelFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCEDB39A2475D4D9006AF70D /* SelectStandardRenderDimensionsViewModelFactory.swift */; }; - DCEDB39D2475D4D9006AF70D /* SelectStandardRenderDimensionsViewModelFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCEDB39A2475D4D9006AF70D /* SelectStandardRenderDimensionsViewModelFactory.swift */; }; - DCEDB3A02476C531006AF70D /* SelectHighRenderDimensionsViewModelFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCEDB39E2476C531006AF70D /* SelectHighRenderDimensionsViewModelFactory.swift */; }; - DCEDB3A12476C531006AF70D /* SelectHighRenderDimensionsViewModelFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCEDB39E2476C531006AF70D /* SelectHighRenderDimensionsViewModelFactory.swift */; }; DCF4614D238598C700DD8FEA /* SettingsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCF4614B238598C700DD8FEA /* SettingsViewModel.swift */; }; DCF4614E238598C700DD8FEA /* SettingsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCF4614B238598C700DD8FEA /* SettingsViewModel.swift */; }; DCF4615223859BA400DD8FEA /* AppInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCF4615023859BA400DD8FEA /* AppInfo.swift */; }; @@ -476,6 +468,8 @@ 5BBBCFD96628BCB502CCDA04 /* Pods-Video-Internal-Video-InternalTests-Video-CommunityTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Video-Internal-Video-InternalTests-Video-CommunityTests.debug.xcconfig"; path = "Target Support Files/Pods-Video-Internal-Video-InternalTests-Video-CommunityTests/Pods-Video-Internal-Video-InternalTests-Video-CommunityTests.debug.xcconfig"; sourceTree = ""; }; 8A206F0D263912B600EFCD97 /* ClientTrackSwitchOffControl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClientTrackSwitchOffControl.swift; sourceTree = ""; }; 8A206F3F263919CA00EFCD97 /* SelectClientTrackSwitchOffControlViewModelFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectClientTrackSwitchOffControlViewModelFactory.swift; sourceTree = ""; }; + 8A84724A26B36749004BBC79 /* VideoContentPreferencesMode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VideoContentPreferencesMode.swift; sourceTree = ""; }; + 8A84724D26B3D1DF004BBC79 /* SelectVideoContentPreferencesModeViewModelFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SelectVideoContentPreferencesModeViewModelFactory.swift; sourceTree = ""; }; 8AC49999232A18D2005A4B35 /* SceneDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; A10066E39687E61F986470C1 /* Pods_Video_Twilio_Video_TwilioTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Video_Twilio_Video_TwilioTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; A75F43370842DD4A8718485D /* Pods-Video-InternalUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Video-InternalUITests.debug.xcconfig"; path = "Target Support Files/Pods-Video-InternalUITests/Pods-Video-InternalUITests.debug.xcconfig"; sourceTree = ""; }; @@ -696,12 +690,6 @@ DCEDB37D247447D3006AF70D /* SelectTrackSwitchOffModeViewModelFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectTrackSwitchOffModeViewModelFactory.swift; sourceTree = ""; }; DCEDB381247489A0006AF70D /* SettingOptions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingOptions.swift; sourceTree = ""; }; DCEDB385247489DA006AF70D /* SelectSettingViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectSettingViewModel.swift; sourceTree = ""; }; - DCEDB3892475B693006AF70D /* VideoDimensionsName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoDimensionsName.swift; sourceTree = ""; }; - DCEDB38E2475D210006AF70D /* RenderDimensionsSettingsViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RenderDimensionsSettingsViewModel.swift; sourceTree = ""; }; - DCEDB3922475D349006AF70D /* RenderDimensionsSettingsViewControllerFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RenderDimensionsSettingsViewControllerFactory.swift; sourceTree = ""; }; - DCEDB3962475D476006AF70D /* SelectLowRenderDimensionsViewModelFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectLowRenderDimensionsViewModelFactory.swift; sourceTree = ""; }; - DCEDB39A2475D4D9006AF70D /* SelectStandardRenderDimensionsViewModelFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectStandardRenderDimensionsViewModelFactory.swift; sourceTree = ""; }; - DCEDB39E2476C531006AF70D /* SelectHighRenderDimensionsViewModelFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectHighRenderDimensionsViewModelFactory.swift; sourceTree = ""; }; DCF4614B238598C700DD8FEA /* SettingsViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsViewModel.swift; sourceTree = ""; }; DCF4615023859BA400DD8FEA /* AppInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppInfo.swift; sourceTree = ""; }; DCF4615423859BB800DD8FEA /* AppInfoStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppInfoStore.swift; sourceTree = ""; }; @@ -1047,7 +1035,7 @@ DCEDB371247442D9006AF70D /* TrackPriority.swift */, DCEDB37924744734006AF70D /* TrackSwitchOffMode.swift */, DCAEBF5223849C1C00141D2D /* VideoCodec.swift */, - DCEDB3892475B693006AF70D /* VideoDimensionsName.swift */, + 8A84724A26B36749004BBC79 /* VideoContentPreferencesMode.swift */, DC82A35223FDB6890081578C /* SDKLogLevel.swift */, ); path = AppSettings; @@ -1315,7 +1303,6 @@ DC0446C923A2EDFB0072F597 /* Developer */, DCAEBF50238488C500141D2D /* General */, DCACF1CC24EAEAA300D3C264 /* Internal */, - DCEDB38D2475D1C2006AF70D /* RenderDimensions */, DC82A35A23FDB8F80081578C /* SDKLogLevel */, ); path = Settings; @@ -1595,22 +1582,11 @@ 8A206F3F263919CA00EFCD97 /* SelectClientTrackSwitchOffControlViewModelFactory.swift */, DCEDB375247443E3006AF70D /* SelectDominantSpeakerPriorityViewModelFactory.swift */, DCEDB37D247447D3006AF70D /* SelectTrackSwitchOffModeViewModelFactory.swift */, + 8A84724D26B3D1DF004BBC79 /* SelectVideoContentPreferencesModeViewModelFactory.swift */, ); path = BandwidthProfile; sourceTree = ""; }; - DCEDB38D2475D1C2006AF70D /* RenderDimensions */ = { - isa = PBXGroup; - children = ( - DCEDB3922475D349006AF70D /* RenderDimensionsSettingsViewControllerFactory.swift */, - DCEDB38E2475D210006AF70D /* RenderDimensionsSettingsViewModel.swift */, - DCEDB3962475D476006AF70D /* SelectLowRenderDimensionsViewModelFactory.swift */, - DCEDB39A2475D4D9006AF70D /* SelectStandardRenderDimensionsViewModelFactory.swift */, - DCEDB39E2476C531006AF70D /* SelectHighRenderDimensionsViewModelFactory.swift */, - ); - path = RenderDimensions; - sourceTree = ""; - }; DCF4614F23859B9A00DD8FEA /* AppInfo */ = { isa = PBXGroup; children = ( @@ -2266,7 +2242,6 @@ DCDCD373241929E1004A30FC /* TwilioAccessTokenStore.swift in Sources */, DCF4615E2385B10200DD8FEA /* GeneralSettingsViewModel.swift in Sources */, DC2511AC2478213400C776D6 /* EditMaxSubscriptionBitrateViewModel.swift in Sources */, - DCEDB39C2475D4D9006AF70D /* SelectStandardRenderDimensionsViewModelFactory.swift in Sources */, DCC7E35E24070C5200431AC3 /* AuthFlowFactory.swift in Sources */, DC85CA6223CE4FCA00BF016F /* AppCenterStoreFactory.swift in Sources */, DCC7E3562406ED3900431AC3 /* UserDefaultsProtocol.swift in Sources */, @@ -2274,7 +2249,6 @@ DC44C2CA2387118400205174 /* UITableViewCellHelpers.swift in Sources */, DC39248A2416A1D80068E33F /* SelectEnvironmentViewModelFactory.swift in Sources */, DC9A5E442463247700E4B079 /* CircleButton.swift in Sources */, - DCEDB3902475D210006AF70D /* RenderDimensionsSettingsViewModel.swift in Sources */, DC9C772A2500063200AC68FD /* RemoteConfigStore.swift in Sources */, DCEC3D0F23860BBC00EBDEBF /* UITableViewHelpers.swift in Sources */, DC44C2C323870D0800205174 /* BasicCell.swift in Sources */, @@ -2292,6 +2266,7 @@ DC8EAE3423BA71990045018F /* LaunchStoresFactory.swift in Sources */, DCEDB3312464F9BA006AF70D /* IndexSetHelpers.swift in Sources */, DC44C2EB23876B4700205174 /* EditTextSegueSender.swift in Sources */, + 8A84724E26B3D1DF004BBC79 /* SelectVideoContentPreferencesModeViewModelFactory.swift in Sources */, DC4E4E2423577EE500C5D313 /* Topology.swift in Sources */, DC0446D023A2F01A0072F597 /* DeveloperSettingsViewControllerFactory.swift in Sources */, DC0446CC23A2EE340072F597 /* DeveloperSettingsViewModel.swift in Sources */, @@ -2317,7 +2292,6 @@ DC76FD0224105500001B2FFC /* EnvironmentVariableStore.swift in Sources */, DCEDB387247489DA006AF70D /* SelectSettingViewModel.swift in Sources */, DCB7C18A2405BE40009DEA70 /* KeychainStore.swift in Sources */, - DCEDB38B2475B693006AF70D /* VideoDimensionsName.swift in Sources */, DCB64B4A240995A100E090BE /* APIHTTPMethod.swift in Sources */, DCF4615623859BB800DD8FEA /* AppInfoStore.swift in Sources */, DCEDB35E24733641006AF70D /* LoginViewController.swift in Sources */, @@ -2325,7 +2299,6 @@ DCAEBF382383581F00141D2D /* EditTextViewController.swift in Sources */, 243CDB4B22665F1800637B6B /* UIColorHelpers.swift in Sources */, DC3924912416A8070068E33F /* APIErrorResponseDecoder.swift in Sources */, - DCEDB3942475D349006AF70D /* RenderDimensionsSettingsViewControllerFactory.swift in Sources */, DCEDB36F24743DD4006AF70D /* SelectBandwidthProfileModeViewModelFactory.swift in Sources */, DCD7675223DBA3AA00A2939C /* DeepLinkStore.swift in Sources */, DCA53949235F53E700CA26FB /* InternalAuthStore.swift in Sources */, @@ -2336,7 +2309,6 @@ DCEC3D1C23861E1700EBDEBF /* SelectVideoCodecViewModelFactory.swift in Sources */, DCF4615223859BA400DD8FEA /* AppInfo.swift in Sources */, DC9A5E2E2462153000E4B079 /* CameraManager.swift in Sources */, - DCEDB3A02476C531006AF70D /* SelectHighRenderDimensionsViewModelFactory.swift in Sources */, DCF4615A2385A51700DD8FEA /* SettingsViewController.swift in Sources */, DCB7C1862405BD68009DEA70 /* API.swift in Sources */, DC2511B4248921CD00C776D6 /* ParticipantDelegate.swift in Sources */, @@ -2378,7 +2350,6 @@ DCA5394D235F740200CA26FB /* AuthStore.swift in Sources */, 24C5217A20FFAD030018E2D8 /* EmailPasswordLoginViewController.swift in Sources */, DCD940B2243B9B7A00D9ECC5 /* ConnectOptionsFactory.swift in Sources */, - DCEDB3982475D476006AF70D /* SelectLowRenderDimensionsViewModelFactory.swift in Sources */, DCC7E35A2407081F00431AC3 /* SignInSegueIdentifierFactory.swift in Sources */, DC85CA4D23CCD39400BF016F /* AppCenterStore.swift in Sources */, DCB64B502409976F00E090BE /* APIRequest.swift in Sources */, @@ -2397,6 +2368,7 @@ DC9A5E3824622C6100E4B079 /* CameraConfigFactory.swift in Sources */, 4B00122F1FBA52C4004A587E /* HeaderTableViewCell.m in Sources */, DCEC3D1823861D3700EBDEBF /* SelectRoomTypeViewModelFactory.swift in Sources */, + 8A84724B26B36749004BBC79 /* VideoContentPreferencesMode.swift in Sources */, DCACF1D424EAF1F000D3C264 /* SettingsViewControllerFactory.swift in Sources */, DC9A5E0E245F611D00E4B079 /* MainParticipantStore.swift in Sources */, DCC7E37724085BE200431AC3 /* APIErrorResponse.swift in Sources */, @@ -2443,7 +2415,6 @@ DCDCD374241929E1004A30FC /* TwilioAccessTokenStore.swift in Sources */, DCF4615F2385B10200DD8FEA /* GeneralSettingsViewModel.swift in Sources */, DC2511AD2478213400C776D6 /* EditMaxSubscriptionBitrateViewModel.swift in Sources */, - DCEDB39D2475D4D9006AF70D /* SelectStandardRenderDimensionsViewModelFactory.swift in Sources */, DCC7E35F24070C5200431AC3 /* AuthFlowFactory.swift in Sources */, DC85CA6323CE4FCA00BF016F /* AppCenterStoreFactory.swift in Sources */, DCC7E3572406ED3900431AC3 /* UserDefaultsProtocol.swift in Sources */, @@ -2451,7 +2422,6 @@ DC44C2CB2387118400205174 /* UITableViewCellHelpers.swift in Sources */, DC39248B2416A1D80068E33F /* SelectEnvironmentViewModelFactory.swift in Sources */, DC9A5E452463247700E4B079 /* CircleButton.swift in Sources */, - DCEDB3912475D210006AF70D /* RenderDimensionsSettingsViewModel.swift in Sources */, DC9C772B2500063200AC68FD /* RemoteConfigStore.swift in Sources */, DCEC3D1023860BBC00EBDEBF /* UITableViewHelpers.swift in Sources */, DC44C2C423870D0800205174 /* BasicCell.swift in Sources */, @@ -2469,6 +2439,7 @@ DC8EAE3523BA71990045018F /* LaunchStoresFactory.swift in Sources */, DCEDB3322464F9BA006AF70D /* IndexSetHelpers.swift in Sources */, DC44C2EC23876B4700205174 /* EditTextSegueSender.swift in Sources */, + 8A84724F26B3D1DF004BBC79 /* SelectVideoContentPreferencesModeViewModelFactory.swift in Sources */, DC4E4E2523577EE500C5D313 /* Topology.swift in Sources */, DC0446D123A2F01A0072F597 /* DeveloperSettingsViewControllerFactory.swift in Sources */, DC0446CD23A2EE340072F597 /* DeveloperSettingsViewModel.swift in Sources */, @@ -2494,7 +2465,6 @@ DC76FD0324105501001B2FFC /* EnvironmentVariableStore.swift in Sources */, DCEDB388247489DA006AF70D /* SelectSettingViewModel.swift in Sources */, DCB7C18B2405BE40009DEA70 /* KeychainStore.swift in Sources */, - DCEDB38C2475B693006AF70D /* VideoDimensionsName.swift in Sources */, DCB64B4B240995A100E090BE /* APIHTTPMethod.swift in Sources */, DCF4615723859BB800DD8FEA /* AppInfoStore.swift in Sources */, DCEDB35F24733641006AF70D /* LoginViewController.swift in Sources */, @@ -2502,7 +2472,6 @@ DCAEBF392383581F00141D2D /* EditTextViewController.swift in Sources */, 243CDB4C22665F1800637B6B /* UIColorHelpers.swift in Sources */, DC3924922416A8070068E33F /* APIErrorResponseDecoder.swift in Sources */, - DCEDB3952475D349006AF70D /* RenderDimensionsSettingsViewControllerFactory.swift in Sources */, DCEDB37024743DD4006AF70D /* SelectBandwidthProfileModeViewModelFactory.swift in Sources */, DCD7675323DBA3AA00A2939C /* DeepLinkStore.swift in Sources */, DCA5394A235F53E700CA26FB /* InternalAuthStore.swift in Sources */, @@ -2513,7 +2482,6 @@ DCEC3D1D23861E1700EBDEBF /* SelectVideoCodecViewModelFactory.swift in Sources */, DCF4615323859BA400DD8FEA /* AppInfo.swift in Sources */, DC9A5E2F2462153000E4B079 /* CameraManager.swift in Sources */, - DCEDB3A12476C531006AF70D /* SelectHighRenderDimensionsViewModelFactory.swift in Sources */, DCF4615B2385A51700DD8FEA /* SettingsViewController.swift in Sources */, DCB7C1872405BD68009DEA70 /* API.swift in Sources */, DC2511B5248921CD00C776D6 /* ParticipantDelegate.swift in Sources */, @@ -2555,7 +2523,6 @@ DCA5394E235F740200CA26FB /* AuthStore.swift in Sources */, 24C5217B20FFAD030018E2D8 /* EmailPasswordLoginViewController.swift in Sources */, DCD940B3243B9B7A00D9ECC5 /* ConnectOptionsFactory.swift in Sources */, - DCEDB3992475D476006AF70D /* SelectLowRenderDimensionsViewModelFactory.swift in Sources */, DCC7E35B2407081F00431AC3 /* SignInSegueIdentifierFactory.swift in Sources */, DC85CA4E23CCD39400BF016F /* AppCenterStore.swift in Sources */, DCB64B512409976F00E090BE /* APIRequest.swift in Sources */, @@ -2574,6 +2541,7 @@ DC9A5E3924622C6100E4B079 /* CameraConfigFactory.swift in Sources */, 4B00126C1FBA52E5004A587E /* HeaderTableViewCell.m in Sources */, DCEC3D1923861D3700EBDEBF /* SelectRoomTypeViewModelFactory.swift in Sources */, + 8A84724C26B36749004BBC79 /* VideoContentPreferencesMode.swift in Sources */, DCACF1D524EAF1F000D3C264 /* SettingsViewControllerFactory.swift in Sources */, DC9A5E0F245F611D00E4B079 /* MainParticipantStore.swift in Sources */, DCC7E37824085BE200431AC3 /* APIErrorResponse.swift in Sources */, diff --git a/VideoApp/VideoApp/Stores/AppSettings/AppSettingsStore.swift b/VideoApp/VideoApp/Stores/AppSettings/AppSettingsStore.swift index 07976580..e4bc54fd 100644 --- a/VideoApp/VideoApp/Stores/AppSettings/AppSettingsStore.swift +++ b/VideoApp/VideoApp/Stores/AppSettings/AppSettingsStore.swift @@ -31,11 +31,9 @@ protocol AppSettingsStoreWriting: LaunchStore { var maxSubscriptionBitrate: Int? { get set } var dominantSpeakerPriority: TrackPriority { get set } var trackSwitchOffMode: TrackSwitchOffMode { get set } - var lowRenderDimensions: VideoDimensionsName { get set } - var standardRenderDimensions: VideoDimensionsName { get set } - var highRenderDimensions: VideoDimensionsName { get set } var remoteRoomType: CommunityCreateTwilioAccessTokenResponse.RoomType? { get set } var clientTrackSwitchOffControl: ClientTrackSwitchOffControl { get set } + var videoContentPreferencesMode: VideoContentPreferencesMode { get set } func reset() } @@ -54,12 +52,10 @@ class AppSettingsStore: AppSettingsStoreWriting { @Storage(key: makeKey("maxSubscriptionBitrate"), defaultValue: nil) var maxSubscriptionBitrate: Int? @Storage(key: makeKey("dominantSpeakerPriority"), defaultValue: TrackPriority.serverDefault) var dominantSpeakerPriority: TrackPriority @Storage(key: makeKey("trackSwitchOffMode"), defaultValue: TrackSwitchOffMode.serverDefault) var trackSwitchOffMode: TrackSwitchOffMode - @Storage(key: makeKey("lowRenderDimensions"), defaultValue: VideoDimensionsName.serverDefault) var lowRenderDimensions: VideoDimensionsName - @Storage(key: makeKey("standardRenderDimensions"), defaultValue: VideoDimensionsName.serverDefault) var standardRenderDimensions: VideoDimensionsName - @Storage(key: makeKey("highRenderDimensions"), defaultValue: VideoDimensionsName.serverDefault) var highRenderDimensions: VideoDimensionsName @Storage(key: makeKey("remoteRoomType"), defaultValue: nil) var remoteRoomType: CommunityCreateTwilioAccessTokenResponse.RoomType? @Storage(key: makeKey("clientTrackSwitchOffControl"), defaultValue: .sdkDefault) var clientTrackSwitchOffControl: ClientTrackSwitchOffControl - + @Storage(key: makeKey("videoContentPreferencesMode"), defaultValue: .sdkDefault) var videoContentPreferencesMode: VideoContentPreferencesMode + static var shared: AppSettingsStoreWriting = AppSettingsStore( notificationCenter: NotificationCenter.default, queue: DispatchQueue.main, diff --git a/VideoApp/VideoApp/ViewControllers/Settings/RenderDimensions/SelectLowRenderDimensionsViewModelFactory.swift b/VideoApp/VideoApp/Stores/AppSettings/VideoContentPreferencesMode.swift similarity index 63% rename from VideoApp/VideoApp/ViewControllers/Settings/RenderDimensions/SelectLowRenderDimensionsViewModelFactory.swift rename to VideoApp/VideoApp/Stores/AppSettings/VideoContentPreferencesMode.swift index 9564b7c0..ad7bfce5 100644 --- a/VideoApp/VideoApp/ViewControllers/Settings/RenderDimensions/SelectLowRenderDimensionsViewModelFactory.swift +++ b/VideoApp/VideoApp/Stores/AppSettings/VideoContentPreferencesMode.swift @@ -1,5 +1,5 @@ // -// Copyright (C) 2020 Twilio, Inc. +// Copyright (C) 2021 Twilio, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,12 +16,16 @@ import Foundation -class SelectLowRenderDimensionsViewModelFactory: SelectOptionViewModelFactory { - func makeSelectOptionViewModel() -> SelectOptionViewModel { - SelectSettingViewModel( - title: "Low", - keyPath: \.lowRenderDimensions, - appSettingsStore: AppSettingsStore.shared - ) +enum VideoContentPreferencesMode: String, SettingOptions { + case sdkDefault + case auto + case manual + + var title: String { + switch self { + case .sdkDefault: return "SDK Default" + case .auto: return "Auto" + case .manual: return "Manual" + } } } diff --git a/VideoApp/VideoApp/Stores/AppSettings/VideoDimensionsName.swift b/VideoApp/VideoApp/Stores/AppSettings/VideoDimensionsName.swift deleted file mode 100644 index bc0a2385..00000000 --- a/VideoApp/VideoApp/Stores/AppSettings/VideoDimensionsName.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// Copyright (C) 2020 Twilio, Inc. -// -// 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 - -enum VideoDimensionsName: String, SettingOptions { - case serverDefault - case cif - case vga - case wvga - case hd540P - case hd720P - case hd960P - case hdStandard1080P - case hdWidescreen1080P - - var title: String { - switch self { - case .serverDefault: return "Server Default" - case .cif: return "352 x 288 (CIF)" - case .vga: return "640 x 480 (VGA)" - case .wvga: return "800 x 480 (WVGA)" - case .hd540P: return "960 x 540 (540p HD)" - case .hd720P: return "1280 x 720 (720p HD)" - case .hd960P: return "1280 x 960 (960p HD)" - case .hdStandard1080P: return "1440 x 1080 (Standard 1080p HD)" - case .hdWidescreen1080P: return "1920 x 1080 (Widescreen 1080p HD)" - } - } -} diff --git a/VideoApp/VideoApp/Video/Room/ConnectOptionsFactory.swift b/VideoApp/VideoApp/Video/Room/ConnectOptionsFactory.swift index 9afc709b..c8d21f4f 100644 --- a/VideoApp/VideoApp/Video/Room/ConnectOptionsFactory.swift +++ b/VideoApp/VideoApp/Video/Room/ConnectOptionsFactory.swift @@ -51,12 +51,8 @@ import TwilioVideo builder.maxSubscriptionBitrate = self.appSettingsStore.maxSubscriptionBitrate as NSNumber? builder.dominantSpeakerPriority = Track.Priority(setting: self.appSettingsStore.dominantSpeakerPriority) builder.trackSwitchOffMode = Track.SwitchOffMode(setting: self.appSettingsStore.trackSwitchOffMode) - let renderDimensions = VideoRenderDimensions() - renderDimensions.low = VideoDimensions(setting: self.appSettingsStore.lowRenderDimensions) - renderDimensions.standard = VideoDimensions(setting: self.appSettingsStore.standardRenderDimensions) - renderDimensions.high = VideoDimensions(setting: self.appSettingsStore.highRenderDimensions) - builder.renderDimensions = renderDimensions builder.clientTrackSwitchOffControl = TwilioVideo.ClientTrackSwitchOffControl(setting:self.appSettingsStore.clientTrackSwitchOffControl) + builder.contentPreferencesMode = TwilioVideo.VideoContentPreferencesMode(setting: self.appSettingsStore.videoContentPreferencesMode) } ) builder.preferredVideoCodecs = [TwilioVideo.VideoCodec.make(setting: self.appSettingsStore.videoCodec)] @@ -124,18 +120,12 @@ private extension TwilioVideo.ClientTrackSwitchOffControl { } } -private extension VideoDimensions { - convenience init?(setting: VideoDimensionsName) { +private extension TwilioVideo.VideoContentPreferencesMode { + init?(setting: VideoContentPreferencesMode) { switch setting { - case .serverDefault: return nil - case .cif: self.init(width: 352, height: 288) - case .vga: self.init(width: 640, height: 480) - case .wvga: self.init(width: 800, height: 480) - case .hd540P: self.init(width: 960, height: 540) - case .hd720P: self.init(width: 1280, height: 720) - case .hd960P: self.init(width: 1280, height: 960) - case .hdStandard1080P: self.init(width: 1440, height: 1080) - case .hdWidescreen1080P: self.init(width: 1920, height: 1080) + case .sdkDefault: return nil + case .auto: self = .auto + case .manual: self = .manual } } } diff --git a/VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/BandwidthProfileSettingsViewControllerFactory.swift b/VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/BandwidthProfileSettingsViewControllerFactory.swift index 0e8f7ea0..df00b158 100644 --- a/VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/BandwidthProfileSettingsViewControllerFactory.swift +++ b/VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/BandwidthProfileSettingsViewControllerFactory.swift @@ -25,7 +25,7 @@ class BandwidthProfileSettingsViewControllerFactory: ViewControllerFactory { selectDominantSpeakerPriorityViewModelFactory: SelectDominantSpeakerPriorityViewModelFactory(), selectClientTrackSwitchOffControlViewModelFactory: SelectClientTrackSwitchOffControlViewModelFactory(), selectTrackSwitchOffModeViewModelFactory: SelectTrackSwitchOffModeViewModelFactory(), - renderDimensionsSettingsViewControllerFactory: RenderDimensionsSettingsViewControllerFactory() + selectVideoContentPreferencesModeViewControllerFactory: SelectVideoContentPreferencesViewModelFactory() ) return SettingsViewControllerFactory().makeSettingsViewController(viewModel: viewModel) } diff --git a/VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/BandwidthProfileSettingsViewModel.swift b/VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/BandwidthProfileSettingsViewModel.swift index 6633cc6b..b9401fcf 100644 --- a/VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/BandwidthProfileSettingsViewModel.swift +++ b/VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/BandwidthProfileSettingsViewModel.swift @@ -44,11 +44,15 @@ class BandwidthProfileSettingsViewModel: SettingsViewModel { selectedOption: appSettingsStore.trackSwitchOffMode.title, viewModelFactory: selectTrackSwitchOffModeViewModelFactory ), - .push(title: "Render Dimensions", viewControllerFactory: RenderDimensionsSettingsViewControllerFactory()), .optionList( title: "Client Track Switch Off Control", selectedOption: appSettingsStore.clientTrackSwitchOffControl.title, viewModelFactory: selectClientTrackSwitchOffControlViewModelFactory + ), + .optionList( + title: "Video Content Preferences Mode", + selectedOption: appSettingsStore.videoContentPreferencesMode.title, + viewModelFactory: selectVideoContentPreferencesModeViewControllerFactory ) ] ) @@ -60,7 +64,7 @@ class BandwidthProfileSettingsViewModel: SettingsViewModel { private let selectDominantSpeakerPriorityViewModelFactory: SelectDominantSpeakerPriorityViewModelFactory private let selectClientTrackSwitchOffControlViewModelFactory: SelectClientTrackSwitchOffControlViewModelFactory private let selectTrackSwitchOffModeViewModelFactory: SelectTrackSwitchOffModeViewModelFactory - private let renderDimensionsSettingsViewControllerFactory: RenderDimensionsSettingsViewControllerFactory + private let selectVideoContentPreferencesModeViewControllerFactory: SelectVideoContentPreferencesViewModelFactory init( appSettingsStore: AppSettingsStoreWriting, @@ -69,7 +73,7 @@ class BandwidthProfileSettingsViewModel: SettingsViewModel { selectDominantSpeakerPriorityViewModelFactory: SelectDominantSpeakerPriorityViewModelFactory, selectClientTrackSwitchOffControlViewModelFactory: SelectClientTrackSwitchOffControlViewModelFactory, selectTrackSwitchOffModeViewModelFactory: SelectTrackSwitchOffModeViewModelFactory, - renderDimensionsSettingsViewControllerFactory: RenderDimensionsSettingsViewControllerFactory + selectVideoContentPreferencesModeViewControllerFactory: SelectVideoContentPreferencesViewModelFactory ) { self.appSettingsStore = appSettingsStore self.selectBandwidthProfileModeViewModelFactory = selectBandwidthProfileModeViewModelFactory @@ -77,6 +81,6 @@ class BandwidthProfileSettingsViewModel: SettingsViewModel { self.selectDominantSpeakerPriorityViewModelFactory = selectDominantSpeakerPriorityViewModelFactory self.selectClientTrackSwitchOffControlViewModelFactory = selectClientTrackSwitchOffControlViewModelFactory self.selectTrackSwitchOffModeViewModelFactory = selectTrackSwitchOffModeViewModelFactory - self.renderDimensionsSettingsViewControllerFactory = renderDimensionsSettingsViewControllerFactory + self.selectVideoContentPreferencesModeViewControllerFactory = selectVideoContentPreferencesModeViewControllerFactory } } diff --git a/VideoApp/VideoApp/ViewControllers/Settings/RenderDimensions/SelectStandardRenderDimensionsViewModelFactory.swift b/VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/SelectVideoContentPreferencesModeViewModelFactory.swift similarity index 77% rename from VideoApp/VideoApp/ViewControllers/Settings/RenderDimensions/SelectStandardRenderDimensionsViewModelFactory.swift rename to VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/SelectVideoContentPreferencesModeViewModelFactory.swift index 62a3c2ce..af2694cd 100644 --- a/VideoApp/VideoApp/ViewControllers/Settings/RenderDimensions/SelectStandardRenderDimensionsViewModelFactory.swift +++ b/VideoApp/VideoApp/ViewControllers/Settings/BandwidthProfile/SelectVideoContentPreferencesModeViewModelFactory.swift @@ -1,5 +1,5 @@ // -// Copyright (C) 2020 Twilio, Inc. +// Copyright (C) 2021 Twilio, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ import Foundation -class SelectStandardRenderDimensionsViewModelFactory: SelectOptionViewModelFactory { +class SelectVideoContentPreferencesViewModelFactory: SelectOptionViewModelFactory { func makeSelectOptionViewModel() -> SelectOptionViewModel { SelectSettingViewModel( - title: "Standard", - keyPath: \.standardRenderDimensions, + title: "Video Content Preferences Mode", + keyPath: \.videoContentPreferencesMode, appSettingsStore: AppSettingsStore.shared ) } diff --git a/VideoApp/VideoApp/ViewControllers/Settings/RenderDimensions/RenderDimensionsSettingsViewControllerFactory.swift b/VideoApp/VideoApp/ViewControllers/Settings/RenderDimensions/RenderDimensionsSettingsViewControllerFactory.swift deleted file mode 100644 index 28572cd0..00000000 --- a/VideoApp/VideoApp/ViewControllers/Settings/RenderDimensions/RenderDimensionsSettingsViewControllerFactory.swift +++ /dev/null @@ -1,29 +0,0 @@ -// -// Copyright (C) 2020 Twilio, Inc. -// -// 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 UIKit - -class RenderDimensionsSettingsViewControllerFactory: ViewControllerFactory { - func makeViewController() -> UIViewController { - let viewModel = RenderDimensionsSettingsViewModel( - appSettingsStore: AppSettingsStore.shared, - selectLowRenderDimensionsViewModelFactory: SelectLowRenderDimensionsViewModelFactory(), - selectStandardRenderDimensionsViewModelFactory: SelectStandardRenderDimensionsViewModelFactory(), - selectHighRenderDimensionsViewModelFactory: SelectHighRenderDimensionsViewModelFactory() - ) - return SettingsViewControllerFactory().makeSettingsViewController(viewModel: viewModel) - } -} diff --git a/VideoApp/VideoApp/ViewControllers/Settings/RenderDimensions/RenderDimensionsSettingsViewModel.swift b/VideoApp/VideoApp/ViewControllers/Settings/RenderDimensions/RenderDimensionsSettingsViewModel.swift deleted file mode 100644 index 798b07d0..00000000 --- a/VideoApp/VideoApp/ViewControllers/Settings/RenderDimensions/RenderDimensionsSettingsViewModel.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// Copyright (C) 2020 Twilio, Inc. -// -// 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. -// - -class RenderDimensionsSettingsViewModel: SettingsViewModel { - let title = "Render Dimensions" - var sections: [SettingsViewModelSection] { - [ - .init( - rows: [ - .optionList( - title: "Low", - selectedOption: appSettingsStore.lowRenderDimensions.title, - viewModelFactory: selectLowRenderDimensionsViewModelFactory - ), - .optionList( - title: "Standard", - selectedOption: appSettingsStore.standardRenderDimensions.title, - viewModelFactory: selectStandardRenderDimensionsViewModelFactory - ), - .optionList( - title: "High", - selectedOption: appSettingsStore.highRenderDimensions.title, - viewModelFactory: selectHighRenderDimensionsViewModelFactory - ), - ] - ) - ] - } - private let appSettingsStore: AppSettingsStoreWriting - private let selectLowRenderDimensionsViewModelFactory: SelectLowRenderDimensionsViewModelFactory - private let selectStandardRenderDimensionsViewModelFactory: SelectStandardRenderDimensionsViewModelFactory - private let selectHighRenderDimensionsViewModelFactory: SelectHighRenderDimensionsViewModelFactory - - init( - appSettingsStore: AppSettingsStoreWriting, - selectLowRenderDimensionsViewModelFactory: SelectLowRenderDimensionsViewModelFactory, - selectStandardRenderDimensionsViewModelFactory: SelectStandardRenderDimensionsViewModelFactory, - selectHighRenderDimensionsViewModelFactory: SelectHighRenderDimensionsViewModelFactory - ) { - self.appSettingsStore = appSettingsStore - self.selectLowRenderDimensionsViewModelFactory = selectLowRenderDimensionsViewModelFactory - self.selectStandardRenderDimensionsViewModelFactory = selectStandardRenderDimensionsViewModelFactory - self.selectHighRenderDimensionsViewModelFactory = selectHighRenderDimensionsViewModelFactory - } -} diff --git a/VideoApp/VideoApp/ViewControllers/Settings/RenderDimensions/SelectHighRenderDimensionsViewModelFactory.swift b/VideoApp/VideoApp/ViewControllers/Settings/RenderDimensions/SelectHighRenderDimensionsViewModelFactory.swift deleted file mode 100644 index 9f669a65..00000000 --- a/VideoApp/VideoApp/ViewControllers/Settings/RenderDimensions/SelectHighRenderDimensionsViewModelFactory.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// Copyright (C) 2020 Twilio, Inc. -// -// 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 - -class SelectHighRenderDimensionsViewModelFactory: SelectOptionViewModelFactory { - func makeSelectOptionViewModel() -> SelectOptionViewModel { - SelectSettingViewModel( - title: "High", - keyPath: \.highRenderDimensions, - appSettingsStore: AppSettingsStore.shared - ) - } -} From 9f3c0bd7dde73d06ebbb51ce0d8b3b17a44be403 Mon Sep 17 00:00:00 2001 From: Christopher Eagleston Date: Thu, 26 Aug 2021 17:19:47 -0700 Subject: [PATCH 3/5] Update to the released 4.5.0 version. (#167) --- Podfile | 3 +-- Podfile.lock | 11 +++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Podfile b/Podfile index c50ebfca..cae14457 100644 --- a/Podfile +++ b/Podfile @@ -1,4 +1,3 @@ -source 'git@github.com:twilio/cocoapod-specs-internal.git' source 'https://cdn.cocoapods.org/' platform :ios, '12.0' @@ -17,7 +16,7 @@ target 'Video-Internal' do pod 'FirebaseUI/Google', '~> 9' pod 'IGListDiffKit', '~> 4' pod 'KeychainAccess', '~> 4' - pod 'TwilioVideo', '4.5.0-rc4' + pod 'TwilioVideo', '4.5.0' target 'Video-InternalTests' do pod 'Nimble', '~> 9' diff --git a/Podfile.lock b/Podfile.lock index a858de6a..7a0bc159 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -106,7 +106,7 @@ PODS: - Nimble (9.2.0) - PromisesObjC (1.2.12) - Quick (3.1.2) - - TwilioVideo (4.5.0-rc4) + - TwilioVideo (4.5.0) DEPENDENCIES: - Alamofire (~> 5) @@ -119,11 +119,9 @@ DEPENDENCIES: - KeychainAccess (~> 4) - Nimble (~> 9) - Quick (~> 3) - - TwilioVideo (= 4.5.0-rc4) + - TwilioVideo (= 4.5.0) SPEC REPOS: - "git@github.com:twilio/cocoapod-specs-internal.git": - - TwilioVideo trunk: - Alamofire - AppAuth @@ -148,6 +146,7 @@ SPEC REPOS: - Nimble - PromisesObjC - Quick + - TwilioVideo SPEC CHECKSUMS: Alamofire: e447a2774a40c996748296fa2c55112fdbbc42f9 @@ -173,8 +172,8 @@ SPEC CHECKSUMS: Nimble: 4f4a345c80b503b3ea13606a4f98405974ee4d0b PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97 Quick: 60f0ea3b8e0cfc0df3259a5c06a238ad8b3c46e0 - TwilioVideo: 40f1804d3ecbd3df45498a12b91163fc3a03c306 + TwilioVideo: a765f519bb8646187eaa0e9f7443d08529ccba0a -PODFILE CHECKSUM: b06441f0f1ac0e0375eb4704f7a6fa036d968850 +PODFILE CHECKSUM: 02614e1ff89056dc0616cd5b0c36ea13c7ed3bd7 COCOAPODS: 1.10.0 From d4d4570913454c22bfa9821399d5841067f607bc Mon Sep 17 00:00:00 2001 From: Christopher Eagleston Date: Thu, 26 Aug 2021 18:51:13 -0700 Subject: [PATCH 4/5] Update Podfile --- Podfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Podfile b/Podfile index cae14457..baec9dba 100644 --- a/Podfile +++ b/Podfile @@ -16,7 +16,7 @@ target 'Video-Internal' do pod 'FirebaseUI/Google', '~> 9' pod 'IGListDiffKit', '~> 4' pod 'KeychainAccess', '~> 4' - pod 'TwilioVideo', '4.5.0' + pod 'TwilioVideo', '~> 4.5' target 'Video-InternalTests' do pod 'Nimble', '~> 9' From 62637b08ba4062d219f5a0d80b0164b75fb29ef0 Mon Sep 17 00:00:00 2001 From: Chris Eagleston Date: Thu, 26 Aug 2021 18:53:03 -0700 Subject: [PATCH 5/5] Fixup Podfile.lock. --- Podfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Podfile.lock b/Podfile.lock index a0343522..98da1c31 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -119,7 +119,7 @@ DEPENDENCIES: - KeychainAccess (~> 4) - Nimble (~> 9) - Quick (~> 3) - - TwilioVideo (= 4.5.0) + - TwilioVideo (~> 4.5) SPEC REPOS: trunk: @@ -174,6 +174,6 @@ SPEC CHECKSUMS: Quick: 60f0ea3b8e0cfc0df3259a5c06a238ad8b3c46e0 TwilioVideo: a765f519bb8646187eaa0e9f7443d08529ccba0a -PODFILE CHECKSUM: 02614e1ff89056dc0616cd5b0c36ea13c7ed3bd7 +PODFILE CHECKSUM: c163b224068a95f3dc2d7bb74947cb70cb32e56a COCOAPODS: 1.10.2