mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Fullscreen handling changes
This commit is contained in:
@@ -88,26 +88,6 @@ final class PlayerControlsModel: ObservableObject {
|
||||
}
|
||||
}
|
||||
|
||||
func toggleFullscreen(_ value: Bool) {
|
||||
withAnimation(Animation.easeOut) {
|
||||
resetTimer()
|
||||
withAnimation(PlayerControls.animation) {
|
||||
playingFullscreen = !value
|
||||
}
|
||||
|
||||
#if os(iOS)
|
||||
if playingFullscreen {
|
||||
guard !(UIApplication.shared.windows.first?.windowScene?.interfaceOrientation.isLandscape ?? true) else {
|
||||
return
|
||||
}
|
||||
Orientation.lockOrientation(.landscape, andRotateTo: .landscapeRight)
|
||||
} else {
|
||||
Orientation.lockOrientation(.allButUpsideDown, andRotateTo: .portrait)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
func reset() {
|
||||
currentTime = .zero
|
||||
duration = .zero
|
||||
|
Reference in New Issue
Block a user