Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VIDEO-4517: Add Client Track Switch Off Control Support #156

Merged
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Podfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
source 'git@github.com:twilio/cocoapod-specs-internal.git'
timrozum marked this conversation as resolved.
Show resolved Hide resolved
platform :ios, '12.0'
inhibit_all_warnings!
use_frameworks!
Expand All @@ -14,7 +15,7 @@ target 'Video-Internal' do
pod 'FirebaseUI/Google', '~> 9'
pod 'IGListDiffKit', '~> 4'
pod 'KeychainAccess', '~> 4'
pod 'TwilioVideo', '~> 4'
pod 'TwilioVideo', '4.5.0-6d8b03a4'

target 'Video-InternalTests' do
pod 'Nimble', '~> 9'
Expand Down
11 changes: 6 additions & 5 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ PODS:
- Nimble (9.0.0)
- PromisesObjC (1.2.12)
- Quick (3.0.0)
- TwilioVideo (4.3.0)
- TwilioVideo (4.5.0-6d8b03a4)

DEPENDENCIES:
- Alamofire (~> 5)
Expand All @@ -123,9 +123,11 @@ DEPENDENCIES:
- KeychainAccess (~> 4)
- Nimble (~> 9)
- Quick (~> 3)
- TwilioVideo (~> 4)
- TwilioVideo (= 4.5.0-6d8b03a4)

SPEC REPOS:
"git@github.com:twilio/cocoapod-specs-internal.git":
- TwilioVideo
trunk:
- Alamofire
- AppAuth
Expand All @@ -150,7 +152,6 @@ SPEC REPOS:
- Nimble
- PromisesObjC
- Quick
- TwilioVideo

SPEC CHECKSUMS:
Alamofire: 2291f7d21ca607c491dd17642e5d40fdcda0e65c
Expand All @@ -176,8 +177,8 @@ SPEC CHECKSUMS:
Nimble: 3b4ec3fd40f1dc178058e0981107721c615643d8
PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97
Quick: 6d9559f40647bc4d510103842ef2fdd882d753e2
TwilioVideo: 1ece3d954245b02244ea613408f6a4413ff54987
TwilioVideo: 0aae86fd6e28d5ffec968c082b8bd34086d37fac

PODFILE CHECKSUM: f22db36db4545a131be7417d00df2ce176070bc3
PODFILE CHECKSUM: 4d0c540ace0804c57a02b1374e562090751c1914

COCOAPODS: 1.10.0
12 changes: 12 additions & 0 deletions VideoApp/VideoApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 /* SubscribedTrackSwitchOffMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A206F0D263912B600EFCD97 /* SubscribedTrackSwitchOffMode.swift */; };
8A206F0F263912B600EFCD97 /* SubscribedTrackSwitchOffMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A206F0D263912B600EFCD97 /* SubscribedTrackSwitchOffMode.swift */; };
8A206F40263919CA00EFCD97 /* SelectSubscribedTrackSwitchOffModeViewModelFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A206F3F263919CA00EFCD97 /* SelectSubscribedTrackSwitchOffModeViewModelFactory.swift */; };
8A206F41263919CA00EFCD97 /* SelectSubscribedTrackSwitchOffModeViewModelFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A206F3F263919CA00EFCD97 /* SelectSubscribedTrackSwitchOffModeViewModelFactory.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 */; };
Expand Down Expand Up @@ -472,6 +476,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 = "<group>"; };
8A206F0D263912B600EFCD97 /* SubscribedTrackSwitchOffMode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscribedTrackSwitchOffMode.swift; sourceTree = "<group>"; };
8A206F3F263919CA00EFCD97 /* SelectSubscribedTrackSwitchOffModeViewModelFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectSubscribedTrackSwitchOffModeViewModelFactory.swift; sourceTree = "<group>"; };
8AC49999232A18D2005A4B35 /* SceneDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
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 = "<group>"; };
Expand Down Expand Up @@ -1039,6 +1045,7 @@
DC044683238EF6C20072F597 /* Environment.swift */,
DC82A34E23FC9AAA0081578C /* JSONContainer.swift */,
DC0446DA23A40E3E0072F597 /* Storage.swift */,
8A206F0D263912B600EFCD97 /* SubscribedTrackSwitchOffMode.swift */,
DC4E4E2223577EE500C5D313 /* Topology.swift */,
DCEDB371247442D9006AF70D /* TrackPriority.swift */,
DCEDB37924744734006AF70D /* TrackSwitchOffMode.swift */,
Expand Down Expand Up @@ -1590,6 +1597,7 @@
DC2511A6247817C600C776D6 /* EditMaxTracksViewModel.swift */,
DCEDB36D24743DD4006AF70D /* SelectBandwidthProfileModeViewModelFactory.swift */,
DCEDB375247443E3006AF70D /* SelectDominantSpeakerPriorityViewModelFactory.swift */,
8A206F3F263919CA00EFCD97 /* SelectSubscribedTrackSwitchOffModeViewModelFactory.swift */,
DCEDB37D247447D3006AF70D /* SelectTrackSwitchOffModeViewModelFactory.swift */,
);
path = BandwidthProfile;
Expand Down Expand Up @@ -2245,6 +2253,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8A206F0E263912B600EFCD97 /* SubscribedTrackSwitchOffMode.swift in Sources */,
DCA65029240F1E0D0038DEE1 /* InternalCreateTwilioAccessTokenRequest.swift in Sources */,
DC044692238F1E3C0072F597 /* UserStore.swift in Sources */,
DC9A5E26246207E600E4B079 /* CameraSourceFactory.swift in Sources */,
Expand Down Expand Up @@ -2345,6 +2354,7 @@
DC44C2E723876AFB00205174 /* SelectOptionSegueSender.swift in Sources */,
DCB7C18F2405C0BE009DEA70 /* KeychainStorage.swift in Sources */,
DC44C2E323875C4F00205174 /* StringHelpers.swift in Sources */,
8A206F40263919CA00EFCD97 /* SelectSubscribedTrackSwitchOffModeViewModelFactory.swift in Sources */,
DCF4614D238598C700DD8FEA /* SettingsViewModel.swift in Sources */,
DCC7E36B24085AD800431AC3 /* APIError.swift in Sources */,
DC8AA8AE236228A3006C06D5 /* AuthStoreFactory.swift in Sources */,
Expand Down Expand Up @@ -2421,6 +2431,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8A206F0F263912B600EFCD97 /* SubscribedTrackSwitchOffMode.swift in Sources */,
DCA6502A240F1E0D0038DEE1 /* InternalCreateTwilioAccessTokenRequest.swift in Sources */,
DC044693238F1E3C0072F597 /* UserStore.swift in Sources */,
DC9A5E27246207E600E4B079 /* CameraSourceFactory.swift in Sources */,
Expand Down Expand Up @@ -2521,6 +2532,7 @@
DC44C2E823876AFB00205174 /* SelectOptionSegueSender.swift in Sources */,
DCB7C1902405C0BE009DEA70 /* KeychainStorage.swift in Sources */,
DC44C2E423875C4F00205174 /* StringHelpers.swift in Sources */,
8A206F41263919CA00EFCD97 /* SelectSubscribedTrackSwitchOffModeViewModelFactory.swift in Sources */,
DCF4614E238598C700DD8FEA /* SettingsViewModel.swift in Sources */,
DCC7E36C24085AD800431AC3 /* APIError.swift in Sources */,
DC8AA8AF236228A3006C06D5 /* AuthStoreFactory.swift in Sources */,
Expand Down
4 changes: 3 additions & 1 deletion VideoApp/VideoApp/Stores/AppSettings/AppSettingsStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ protocol AppSettingsStoreWriting: LaunchStore {
var standardRenderDimensions: VideoDimensionsName { get set }
var highRenderDimensions: VideoDimensionsName { get set }
var remoteRoomType: CommunityCreateTwilioAccessTokenResponse.RoomType? { get set }
var subscribedTrackSwitchOffMode: SubscribedTrackSwitchOffMode { get set }
func reset()
}

Expand All @@ -59,7 +60,8 @@ class AppSettingsStore: AppSettingsStoreWriting {
@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("subscribedTrackSwitchOffMode"), defaultValue: .sdkDefault) var subscribedTrackSwitchOffMode: SubscribedTrackSwitchOffMode

static var shared: AppSettingsStoreWriting = AppSettingsStore(
notificationCenter: NotificationCenter.default,
queue: DispatchQueue.main,
Expand Down
Original file line number Diff line number Diff line change
@@ -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 SubscribedTrackSwitchOffMode: 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"
}
}
}
4 changes: 2 additions & 2 deletions VideoApp/VideoApp/Storyboards/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@
</constraints>
</view>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="wU6-sZ-Ash">
<rect key="frame" x="10" y="690" width="404" height="172"/>
<rect key="frame" x="0.0" y="690" width="414" height="172"/>
Copy link
Contributor Author

@ceaglest ceaglest Apr 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The UICollectionView had a gap of 10 points on the leading edge but was flush to the trailing edge. I think this was just an unintended bug (it's not obvious until you have more than a screen full of cells).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I set this gap intentionally but not sure what desired UX really is to be honest. I'm good with this adjustment.

Probably how it should really work someday is the collection view has no gaps on either side and instead we use spacing inside of the collection view content at start and end. This way it looks good at start/end position and when scrolling (cells are not clipped before the edge of the display).

But I think the team wants to completely redo UX of this screen someday so best to tackle then.

<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="172" id="zc6-T3-B9E"/>
Expand Down Expand Up @@ -668,7 +668,7 @@
<constraints>
<constraint firstItem="wQq-n1-BV3" firstAttribute="bottom" secondItem="5Nf-Ic-CeP" secondAttribute="bottom" id="15V-1d-cmT"/>
<constraint firstAttribute="bottom" secondItem="wQq-n1-BV3" secondAttribute="bottom" id="3cB-9F-ELi"/>
<constraint firstItem="wU6-sZ-Ash" firstAttribute="leading" secondItem="Rmp-3a-cAl" secondAttribute="leading" constant="10" id="B4F-k8-j0z"/>
<constraint firstItem="wU6-sZ-Ash" firstAttribute="leading" secondItem="Rmp-3a-cAl" secondAttribute="leading" id="B4F-k8-j0z"/>
<constraint firstItem="Rmp-3a-cAl" firstAttribute="bottom" secondItem="wU6-sZ-Ash" secondAttribute="bottom" id="Ba2-Sp-yce"/>
<constraint firstItem="dz5-X8-ZUx" firstAttribute="top" secondItem="5Nf-Ic-CeP" secondAttribute="top" id="Bl2-V7-6hI"/>
<constraint firstItem="Rmp-3a-cAl" firstAttribute="trailing" secondItem="ctC-Ns-X89" secondAttribute="trailing" constant="20" id="ERt-Bb-kec"/>
Expand Down
13 changes: 12 additions & 1 deletion VideoApp/VideoApp/Video/Room/ConnectOptionsFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,15 @@ 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.maxTracks = self.appSettingsStore.maxTracks as NSNumber?
timrozum marked this conversation as resolved.
Show resolved Hide resolved
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.subscribedTrackSwitchOffMode = TwilioVideo.SubscribedTrackSwitchOffMode(setting:self.appSettingsStore.subscribedTrackSwitchOffMode)
}
)
builder.preferredVideoCodecs = [TwilioVideo.VideoCodec.make(setting: self.appSettingsStore.videoCodec)]
Expand Down Expand Up @@ -114,6 +115,16 @@ private extension Track.SwitchOffMode {
}
}

private extension TwilioVideo.SubscribedTrackSwitchOffMode {
init?(setting: SubscribedTrackSwitchOffMode) {
switch setting {
case .sdkDefault: return nil
case .auto: self = .auto
case .manual: self = .manual
}
}
}

private extension VideoDimensions {
convenience init?(setting: VideoDimensionsName) {
switch setting {
Expand Down
21 changes: 21 additions & 0 deletions VideoApp/VideoApp/ViewControllers/Room/RoomViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class BandwidthProfileSettingsViewControllerFactory: ViewControllerFactory {
editMaxSubscriptionBitrateViewModelFactory: EditMaxSubscriptionBitrateViewModelFactory(),
editMaxTracksViewModelFactory: EditMaxTracksViewModelFactory(),
selectDominantSpeakerPriorityViewModelFactory: SelectDominantSpeakerPriorityViewModelFactory(),
selectSubscribedTrackSwitchOffModeViewModelFactory: SelectSubscribedTrackSwitchOffModeViewModelFactory(),
selectTrackSwitchOffModeViewModelFactory: SelectTrackSwitchOffModeViewModelFactory(),
renderDimensionsSettingsViewControllerFactory: RenderDimensionsSettingsViewControllerFactory()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ class BandwidthProfileSettingsViewModel: SettingsViewModel {
selectedOption: appSettingsStore.trackSwitchOffMode.title,
viewModelFactory: selectTrackSwitchOffModeViewModelFactory
),
.push(title: "Render Dimensions", viewControllerFactory: RenderDimensionsSettingsViewControllerFactory())
.push(title: "Render Dimensions", viewControllerFactory: RenderDimensionsSettingsViewControllerFactory()),
.optionList(
title: "Subscribed Track Switch Off Mode",
selectedOption: appSettingsStore.subscribedTrackSwitchOffMode.title,
viewModelFactory: selectSubscribedTrackSwitchOffModeViewModelFactory
)
]
)
]
Expand All @@ -60,6 +65,7 @@ class BandwidthProfileSettingsViewModel: SettingsViewModel {
private let editMaxSubscriptionBitrateViewModelFactory: EditMaxSubscriptionBitrateViewModelFactory
private let editMaxTracksViewModelFactory: EditMaxTracksViewModelFactory
private let selectDominantSpeakerPriorityViewModelFactory: SelectDominantSpeakerPriorityViewModelFactory
private let selectSubscribedTrackSwitchOffModeViewModelFactory: SelectSubscribedTrackSwitchOffModeViewModelFactory
private let selectTrackSwitchOffModeViewModelFactory: SelectTrackSwitchOffModeViewModelFactory
private let renderDimensionsSettingsViewControllerFactory: RenderDimensionsSettingsViewControllerFactory

Expand All @@ -69,6 +75,7 @@ class BandwidthProfileSettingsViewModel: SettingsViewModel {
editMaxSubscriptionBitrateViewModelFactory: EditMaxSubscriptionBitrateViewModelFactory,
editMaxTracksViewModelFactory: EditMaxTracksViewModelFactory,
selectDominantSpeakerPriorityViewModelFactory: SelectDominantSpeakerPriorityViewModelFactory,
selectSubscribedTrackSwitchOffModeViewModelFactory: SelectSubscribedTrackSwitchOffModeViewModelFactory,
selectTrackSwitchOffModeViewModelFactory: SelectTrackSwitchOffModeViewModelFactory,
renderDimensionsSettingsViewControllerFactory: RenderDimensionsSettingsViewControllerFactory
) {
Expand All @@ -77,6 +84,7 @@ class BandwidthProfileSettingsViewModel: SettingsViewModel {
self.editMaxSubscriptionBitrateViewModelFactory = editMaxSubscriptionBitrateViewModelFactory
self.editMaxTracksViewModelFactory = editMaxTracksViewModelFactory
self.selectDominantSpeakerPriorityViewModelFactory = selectDominantSpeakerPriorityViewModelFactory
self.selectSubscribedTrackSwitchOffModeViewModelFactory = selectSubscribedTrackSwitchOffModeViewModelFactory
self.selectTrackSwitchOffModeViewModelFactory = selectTrackSwitchOffModeViewModelFactory
self.renderDimensionsSettingsViewControllerFactory = renderDimensionsSettingsViewControllerFactory
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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 SelectSubscribedTrackSwitchOffModeViewModelFactory: SelectOptionViewModelFactory {
func makeSelectOptionViewModel() -> SelectOptionViewModel {
SelectSettingViewModel(
title: "Subscribed Track Switch Off Mode",
keyPath: \.subscribedTrackSwitchOffMode,
appSettingsStore: AppSettingsStore.shared
)
}
}
Loading