Minor performance improvements

This commit is contained in:
Arkadiusz Fal
2022-08-14 18:53:03 +02:00
parent c51b9dd8e8
commit 9a958113c4
4 changed files with 19 additions and 8 deletions

View File

@@ -2,15 +2,10 @@ import SwiftUI
#if !os(macOS)
struct MPVPlayerView: UIViewControllerRepresentable {
@State private var controller = MPVViewController()
@EnvironmentObject<PlayerModel> private var player
func makeUIViewController(context _: Context) -> some UIViewController {
player.mpvBackend.controller = controller
player.mpvBackend.client = controller.client
return controller
player.mpvController
}
func updateUIViewController(_: UIViewControllerType, context _: Context) {}