Improve performance and add statistics for MPV

This commit is contained in:
Arkadiusz Fal
2022-06-17 12:27:01 +02:00
parent 81b8cbd5f1
commit 15cdde17a6
7 changed files with 86 additions and 33 deletions

View File

@@ -561,6 +561,10 @@ final class PlayerModel: ObservableObject {
controls.playingFullscreen = !isFullScreen
#if os(iOS)
DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { [weak self] in
self?.setNeedsDrawing(true)
}
if controls.playingFullscreen {
guard !(UIApplication.shared.windows.first?.windowScene?.interfaceOrientation.isLandscape ?? true) else {
return
@@ -569,10 +573,6 @@ final class PlayerModel: ObservableObject {
} else {
Orientation.lockOrientation(.allButUpsideDown, andRotateTo: .portrait)
}
DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { [weak self] in
self?.setNeedsDrawing(true)
}
#endif
}