mirror of
https://github.com/diced/zipline.git
synced 2026-01-05 01:07:43 -08:00
fix: max-width/height on image/video (#523)
This commit is contained in:
@@ -192,11 +192,29 @@ export default function EmbeddedFile({
|
||||
}}
|
||||
>
|
||||
{file.mimetype.startsWith('image') && (
|
||||
<img src={dataURL('/r')} alt={dataURL('/r')} id='image_content' />
|
||||
<img
|
||||
style={{
|
||||
maxHeight: '100vh',
|
||||
maxWidth: '100vw',
|
||||
}}
|
||||
src={dataURL('/r')}
|
||||
alt={dataURL('/r')}
|
||||
id='image_content'
|
||||
/>
|
||||
)}
|
||||
|
||||
{file.mimetype.startsWith('video') && (
|
||||
<video src={dataURL('/r')} controls autoPlay muted id='video_content' />
|
||||
<video
|
||||
style={{
|
||||
maxHeight: '100vh',
|
||||
maxWidth: '100vw',
|
||||
}}
|
||||
src={dataURL('/r')}
|
||||
controls
|
||||
autoPlay
|
||||
muted
|
||||
id='video_content'
|
||||
/>
|
||||
)}
|
||||
|
||||
{file.mimetype.startsWith('audio') && (
|
||||
|
||||
Reference in New Issue
Block a user