yattee/Shared/Player/AppleAVPlayerView.swift

16 lines
406 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 {
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
}