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 {
|
2021-10-05 20:20:09 +00:00
|
|
|
@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 {
|
2022-08-18 22:40:46 +00:00
|
|
|
let playerLayerView = PlayerLayerView(frame: .zero)
|
|
|
|
playerLayerView.player = player
|
|
|
|
return 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
|
|
|
}
|