1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-14 06:10:32 +05:30
yattee/Shared/Player/Player.swift
2021-09-25 11:34:46 +02:00

24 lines
609 B
Swift

import Defaults
import SwiftUI
struct Player: UIViewControllerRepresentable {
@EnvironmentObject<InvidiousAPI> private var api
@EnvironmentObject<PlaybackModel> private var playback
var video: Video?
func makeUIViewController(context _: Context) -> PlayerViewController {
let controller = PlayerViewController()
controller.video = video
controller.playback = playback
controller.api = api
controller.resolution = Defaults[.quality]
return controller
}
func updateUIViewController(_: PlayerViewController, context _: Context) {}
}