2022-07-10 17:51:46 +00:00
|
|
|
import Defaults
|
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
struct VideoDetailsOverlay: View {
|
|
|
|
@EnvironmentObject<PlayerControlsModel> private var controls
|
|
|
|
|
|
|
|
var body: some View {
|
|
|
|
VideoDetails(sidebarQueue: false, fullScreen: fullScreenBinding)
|
2022-08-19 21:55:02 +00:00
|
|
|
.modifier(ControlBackgroundModifier())
|
|
|
|
.clipShape(RoundedRectangle(cornerRadius: 4))
|
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()
|
|
|
|
}
|
|
|
|
}
|