1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-13 22:00:31 +05:30
yattee/macOS/Player.swift

19 lines
474 B
Swift
Raw Normal View History

2021-07-19 04:02:46 +05:30
import SwiftUI
struct Player: NSViewControllerRepresentable {
2021-08-24 03:01:51 +05:30
@EnvironmentObject<PlaybackState> private var playbackState
2021-07-19 04:02:46 +05:30
var video: Video!
func makeNSViewController(context _: Context) -> PlayerViewController {
let controller = PlayerViewController()
2021-08-23 00:43:33 +05:30
2021-07-19 04:02:46 +05:30
controller.video = video
2021-08-24 03:01:51 +05:30
controller.playbackState = playbackState
2021-07-19 04:02:46 +05:30
return controller
}
func updateNSViewController(_: PlayerViewController, context _: Context) {}
}