Get video scaling working

This commit is contained in:
Nick Mowen 2023-12-30 14:01:30 -07:00
parent 82ad64143f
commit 48945fef91
2 changed files with 41 additions and 42 deletions

View File

@ -242,7 +242,7 @@ function TimelineViewer({ playback, isMobile, onClose }: TimelineViewerProps) {
return ( return (
<Dialog open={playback != undefined} onOpenChange={(_) => onClose()}> <Dialog open={playback != undefined} onOpenChange={(_) => onClose()}>
<DialogContent className="w-screen 2xl:w-4/5 max-w-full"> <DialogContent className="w-screen 2xl:w-2/3 max-w-full">
{playback && ( {playback && (
<HistoryTimelineView playback={playback} isMobile={isMobile} /> <HistoryTimelineView playback={playback} isMobile={isMobile} />
)} )}

View File

@ -259,8 +259,9 @@ function DesktopView({
<div className="w-full"> <div className="w-full">
<div className="flex"> <div className="flex">
<> <>
<div className="w-2/3 bg-black flex justify-center items-center">
<div <div
className={`relative ${ className={`w-full relative ${
hasRelevantPreview && scrubbing ? "hidden" : "visible" hasRelevantPreview && scrubbing ? "hidden" : "visible"
}`} }`}
> >
@ -268,9 +269,6 @@ function DesktopView({
options={{ options={{
preload: "auto", preload: "auto",
autoplay: true, autoplay: true,
fluid: false,
height: "608",
width: "1080",
sources: [ sources: [
{ {
src: playbackUri, src: playbackUri,
@ -299,7 +297,7 @@ function DesktopView({
</VideoPlayer> </VideoPlayer>
</div> </div>
{hasRelevantPreview && ( {hasRelevantPreview && (
<div className={`${scrubbing ? "visible" : "hidden"}`}> <div className={`w-full ${scrubbing ? "visible" : "hidden"}`}>
<VideoPlayer <VideoPlayer
options={{ options={{
preload: "auto", preload: "auto",
@ -325,8 +323,9 @@ function DesktopView({
/> />
</div> </div>
)} )}
</div>
</> </>
<div className="px-2 w-full h-[608px] overflow-auto"> <div className="px-2 h-[608px] overflow-auto">
{playback.timelineItems.map((timeline) => { {playback.timelineItems.map((timeline) => {
return ( return (
<TimelineItemCard <TimelineItemCard