2022-07-10 23:21:46 +05:30
|
|
|
import Defaults
|
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
struct VideoDetailsOverlay: View {
|
2022-11-25 02:06:05 +05:30
|
|
|
@ObservedObject private var controls = PlayerControlsModel.shared
|
2022-07-10 23:21:46 +05:30
|
|
|
|
|
|
|
var body: some View {
|
2023-04-22 14:26:42 +05:30
|
|
|
VideoDetails(video: controls.player.videoForDisplay, fullScreen: fullScreenBinding, sidebarQueue: .constant(false))
|
2022-08-20 03:25:02 +05:30
|
|
|
.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()
|
|
|
|
}
|
|
|
|
}
|