Compare commits
2 commits
060eaa8d94
...
8cd6ba97b6
Author | SHA1 | Date | |
---|---|---|---|
8cd6ba97b6 | |||
0b5efb0a88 |
2 changed files with 3 additions and 7 deletions
|
@ -1139,17 +1139,13 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
|
|||
return null;
|
||||
}
|
||||
|
||||
// FIXME
|
||||
const videoW = videoInfo?.w ?? 400;
|
||||
const videoH = videoInfo?.h ?? 400;
|
||||
const maxW = scrollRef.current?.querySelector(`[data-message-id]>div>div:nth-child(2)`)?.clientWidth ?? 400;
|
||||
const height = videoW <= maxW ? videoH : scaleYDimension(videoW, maxW, videoH);
|
||||
const height = scaleYDimension(videoInfo.w || 400, 400, videoInfo.h || 400);
|
||||
|
||||
return (
|
||||
<Attachment>
|
||||
<AttachmentBox
|
||||
style={{
|
||||
height: toRem(Math.max(48, Math.min(480, height))),
|
||||
height: toRem(height < 48 ? 48 : height),
|
||||
}}
|
||||
>
|
||||
<VideoContent
|
||||
|
|
|
@ -116,7 +116,7 @@ export const VideoContent = as<'div', VideoContentProps>(
|
|||
</Box>
|
||||
)}
|
||||
{srcState.status === AsyncStatus.Success && (
|
||||
<Box className={css.AbsoluteContainer} style={{position: 'unset'}}>
|
||||
<Box className={css.AbsoluteContainer}>
|
||||
<Video
|
||||
title={body}
|
||||
src={srcState.data}
|
||||
|
|
Loading…
Reference in a new issue