1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-13 13:50:32 +05:30
yattee/macOS/AppleAVPlayerView.swift

17 lines
395 B
Swift
Raw Normal View History

2022-02-28 02:01:17 +05:30
import Defaults
import SwiftUI
2022-08-19 04:10:46 +05:30
struct AppleAVPlayerView: NSViewRepresentable {
2022-02-28 02:01:17 +05:30
@EnvironmentObject<PlayerModel> private var player
2022-08-19 04:10:46 +05:30
func makeNSView(context _: Context) -> some NSView {
let playerLayerView = PlayerLayerView(frame: .zero)
2022-02-28 02:01:17 +05:30
2022-08-19 04:10:46 +05:30
playerLayerView.player = player
2022-02-28 02:01:17 +05:30
2022-08-19 04:10:46 +05:30
return playerLayerView
2022-02-28 02:01:17 +05:30
}
2022-08-19 04:10:46 +05:30
func updateNSView(_: NSViewType, context _: Context) {}
2022-02-28 02:01:17 +05:30
}