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

24 lines
609 B
Swift
Raw Normal View History

2021-09-25 13:48:22 +05:30
import Defaults
2021-07-19 04:02:46 +05:30
import SwiftUI
struct Player: UIViewControllerRepresentable {
2021-09-25 13:48:22 +05:30
@EnvironmentObject<InvidiousAPI> private var api
@EnvironmentObject<PlaybackModel> private var playback
2021-08-24 03:01:51 +05:30
2021-07-19 04:02:46 +05:30
var video: Video?
func makeUIViewController(context _: Context) -> PlayerViewController {
let controller = PlayerViewController()
2021-08-23 00:43:33 +05:30
2021-07-19 04:02:46 +05:30
controller.video = video
2021-09-25 13:48:22 +05:30
controller.playback = playback
controller.api = api
controller.resolution = Defaults[.quality]
2021-07-19 04:02:46 +05:30
return controller
}
func updateUIViewController(_: PlayerViewController, context _: Context) {}
}