1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-14 06:10:32 +05:30
yattee/Shared/Player/Controls/VideoDetailsOverlay.swift
2023-02-05 14:24:14 +01:00

27 lines
715 B
Swift

import Defaults
import SwiftUI
struct VideoDetailsOverlay: View {
@ObservedObject private var controls = PlayerControlsModel.shared
var body: some View {
VideoDetails(video: PlayerModel.shared.currentVideo, fullScreen: fullScreenBinding)
.clipShape(RoundedRectangle(cornerRadius: 4))
}
var fullScreenBinding: Binding<Bool> {
.init(get: {
controls.presentingDetailsOverlay
}, set: { newValue in
controls.presentingDetailsOverlay = newValue
})
}
}
struct VideoDetailsOverlay_Previews: PreviewProvider {
static var previews: some View {
VideoDetailsOverlay()
.injectFixtureEnvironmentObjects()
}
}