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

27 lines
715 B
Swift
Raw Normal View History

2022-07-10 23:21:46 +05:30
import Defaults
import SwiftUI
struct VideoDetailsOverlay: View {
@ObservedObject private var controls = PlayerControlsModel.shared
2022-07-10 23:21:46 +05:30
var body: some View {
2022-12-19 00:09:03 +05:30
VideoDetails(video: controls.player.videoForDisplay, fullScreen: fullScreenBinding)
.clipShape(RoundedRectangle(cornerRadius: 4))
2022-07-10 23:21:46 +05:30
}
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()
}
}