mirror of
https://github.com/plebbit/seedit.git
synced 2026-05-19 14:19:24 -04:00
fix(post): video thumbnails were not showing on mobile, without preload
This commit is contained in:
@@ -29,7 +29,7 @@ const Expando = ({ authorEditReason, commentMediaInfo, content, expanded, link,
|
||||
if (commentMediaInfo?.type === 'image') {
|
||||
mediaComponent = <img src={commentMediaInfo.url} alt='' />;
|
||||
} else if (commentMediaInfo?.type === 'video' && expanded) {
|
||||
mediaComponent = <video src={commentMediaInfo.url} controls />;
|
||||
mediaComponent = <video src={`${commentMediaInfo.url}#t=0.001`} controls />;
|
||||
} else if (commentMediaInfo?.type === 'webpage' && commentMediaInfo?.thumbnail) {
|
||||
mediaComponent = <img src={commentMediaInfo.thumbnail} alt='' />;
|
||||
} else if (commentMediaInfo?.type === 'audio' && expanded) {
|
||||
|
||||
@@ -38,7 +38,7 @@ const Thumbnail = ({ cid, commentMediaInfo, expanded = false, isReply = false, l
|
||||
if (commentMediaInfo?.type === 'image') {
|
||||
mediaComponent = <img src={commentMediaInfo.url} alt='' />;
|
||||
} else if (commentMediaInfo?.type === 'video') {
|
||||
mediaComponent = commentMediaInfo.thumbnail ? <img src={commentMediaInfo.thumbnail} alt='' /> : <video src={commentMediaInfo.url} />;
|
||||
mediaComponent = commentMediaInfo.thumbnail ? <img src={commentMediaInfo.thumbnail} alt='' /> : <video src={`${commentMediaInfo.url}#t=0.001`} />;
|
||||
} else if (commentMediaInfo?.type === 'webpage') {
|
||||
mediaComponent = <img src={commentMediaInfo.thumbnail} alt='' />;
|
||||
} else if (commentMediaInfo?.type === 'iframe') {
|
||||
|
||||
Reference in New Issue
Block a user