2022-05-21 02:53:14 +05:30
|
|
|
import AVKit
|
2021-09-25 13:48:22 +05:30
|
|
|
import Defaults
|
2021-07-19 04:02:46 +05:30
|
|
|
import SwiftUI
|
|
|
|
|
2022-05-21 02:53:14 +05:30
|
|
|
struct AppleAVPlayerView: UIViewRepresentable {
|
2021-10-06 01:50:09 +05:30
|
|
|
@EnvironmentObject<PlayerModel> private var player
|
2021-08-24 03:01:51 +05:30
|
|
|
|
2022-05-21 02:53:14 +05:30
|
|
|
func makeUIView(context _: Context) -> some UIView {
|
|
|
|
player.playerLayerView = PlayerLayerView(frame: .zero)
|
|
|
|
return player.playerLayerView
|
2021-07-19 04:02:46 +05:30
|
|
|
}
|
|
|
|
|
2022-05-21 02:53:14 +05:30
|
|
|
func updateUIView(_: UIViewType, context _: Context) {}
|
2021-07-19 04:02:46 +05:30
|
|
|
}
|