yattee/Shared/Player/AppleAVPlayerView.swift

15 lines
376 B
Swift
Raw Normal View History

2022-05-20 21:23:14 +00:00
import AVKit
2021-09-25 08:18:22 +00:00
import Defaults
2021-07-18 22:32:46 +00:00
import SwiftUI
2022-05-20 21:23:14 +00:00
struct AppleAVPlayerView: UIViewRepresentable {
@EnvironmentObject<PlayerModel> private var player
2021-08-23 21:31:51 +00:00
2022-05-20 21:23:14 +00:00
func makeUIView(context _: Context) -> some UIView {
player.playerLayerView = PlayerLayerView(frame: .zero)
return player.playerLayerView
2021-07-18 22:32:46 +00:00
}
2022-05-20 21:23:14 +00:00
func updateUIView(_: UIViewType, context _: Context) {}
2021-07-18 22:32:46 +00:00
}