2022-07-10 17:51:46 +00:00
|
|
|
import Defaults
|
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
struct VideoDetailsOverlay: View {
|
2022-11-24 20:36:05 +00:00
|
|
|
@ObservedObject private var controls = PlayerControlsModel.shared
|
2022-07-10 17:51:46 +00:00
|
|
|
|
|
|
|
var body: some View {
|
2023-04-22 08:56:42 +00:00
|
|
|
VideoDetails(video: controls.player.videoForDisplay, fullScreen: fullScreenBinding, sidebarQueue: .constant(false))
|
2022-08-19 21:55:02 +00:00
|
|
|
.clipShape(RoundedRectangle(cornerRadius: 4))
|
2023-04-22 14:49:45 +00:00
|
|
|
.id(controls.player.currentVideo?.cacheKey)
|
2022-07-10 17:51:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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()
|
|
|
|
}
|
|
|
|
}
|