1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-14 22:30:32 +05:30
yattee/Shared/Player/AppleAVPlayerView.swift

15 lines
376 B
Swift
Raw Normal View History

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 {
@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
}