mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 23:24:32 +00:00
feat: add camera selector for mirror mode and fix hover glitch
This commit is contained in:
parent
74d641c135
commit
edd8ecc3bb
4 changed files with 64 additions and 8 deletions
|
|
@ -2487,7 +2487,11 @@ struct Media: View {
|
|||
} header: {
|
||||
Text("Media Source")
|
||||
} footer: {
|
||||
if MusicManager.shared.isNowPlayingDeprecated {
|
||||
if mediaController == .all {
|
||||
Text("All Music detects every active media source and shows them in a switchable list below the main player.")
|
||||
.foregroundStyle(.secondary)
|
||||
.font(.caption)
|
||||
} else if MusicManager.shared.isNowPlayingDeprecated {
|
||||
HStack {
|
||||
Text("YouTube Music requires this third-party app to be installed: ")
|
||||
.foregroundStyle(.secondary)
|
||||
|
|
@ -3830,7 +3834,9 @@ struct LiveActivitiesSettings: View {
|
|||
|
||||
struct Appearance: View {
|
||||
@ObservedObject var coordinator = DynamicIslandViewCoordinator.shared
|
||||
@ObservedObject var webcamManager = WebcamManager.shared
|
||||
@Default(.mirrorShape) var mirrorShape
|
||||
@Default(.selectedCameraID) var selectedCameraID
|
||||
@Default(.sliderColor) var sliderColor
|
||||
@Default(.useMusicVisualizer) var useMusicVisualizer
|
||||
@Default(.customVisualizers) var customVisualizers
|
||||
|
|
@ -4237,6 +4243,22 @@ struct Appearance: View {
|
|||
.tag(MirrorShapeEnum.rectangle)
|
||||
}
|
||||
.settingsHighlight(id: highlightID("Mirror shape"))
|
||||
|
||||
if webcamManager.cameraAvailable {
|
||||
Picker("Mirror Camera", selection: $selectedCameraID) {
|
||||
ForEach(webcamManager.availableCameras, id: \.uniqueID) { device in
|
||||
Text(device.localizedName)
|
||||
.tag(device.uniqueID)
|
||||
}
|
||||
}
|
||||
.onChange(of: selectedCameraID) { _, _ in
|
||||
if Defaults[.showMirror] {
|
||||
webcamManager.stopSession()
|
||||
webcamManager.startSession()
|
||||
}
|
||||
}
|
||||
.settingsHighlight(id: highlightID("Mirror Camera"))
|
||||
}
|
||||
Defaults.Toggle(key: .showNotHumanFace) {
|
||||
Text("Idle Animation")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue