yattee/macOS/AppleAVPlayerView.swift
2022-08-21 02:55:53 +02:00

17 lines
395 B
Swift

import Defaults
import SwiftUI
struct AppleAVPlayerView: NSViewRepresentable {
@EnvironmentObject<PlayerModel> private var player
func makeNSView(context _: Context) -> some NSView {
let playerLayerView = PlayerLayerView(frame: .zero)
playerLayerView.player = player
return playerLayerView
}
func updateNSView(_: NSViewType, context _: Context) {}
}