Playback state improvements

This commit is contained in:
Arkadiusz Fal
2021-08-23 23:31:51 +02:00
parent f80b61f9c7
commit 151121aa31
11 changed files with 55 additions and 27 deletions

View File

@@ -1,14 +1,15 @@
import SwiftUI
struct Player: NSViewControllerRepresentable {
@ObservedObject var playbackState: PlaybackState
@EnvironmentObject<PlaybackState> private var playbackState
var video: Video!
func makeNSViewController(context _: Context) -> PlayerViewController {
let controller = PlayerViewController()
controller.playbackState = playbackState
controller.video = video
controller.playbackState = playbackState
return controller
}