mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
19 lines
474 B
Swift
19 lines
474 B
Swift
import SwiftUI
|
|
|
|
struct Player: NSViewControllerRepresentable {
|
|
@EnvironmentObject<PlaybackState> private var playbackState
|
|
|
|
var video: Video!
|
|
|
|
func makeNSViewController(context _: Context) -> PlayerViewController {
|
|
let controller = PlayerViewController()
|
|
|
|
controller.video = video
|
|
controller.playbackState = playbackState
|
|
|
|
return controller
|
|
}
|
|
|
|
func updateNSViewController(_: PlayerViewController, context _: Context) {}
|
|
}
|