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
|
|
|
}
|