fix: resolve 4 media embed bugs from testing
1. Video aspect ratio: remove container border/overflow-hidden, use preload="metadata" so browser knows dimensions before play 2. YouTube Error 153: remove sandbox attr (too restrictive), add full allow permissions (encrypted-media, accelerometer, gyroscope, etc.) 3. Google Images not displaying: detect image Content-Type from HTTP response in metadataFetcher, override classifier to create image embed for URLs that serve image/* content 4. Audio seeking broken: add HTTP Range request support in uploads route (Accept-Ranges, Content-Range, 206 Partial Content)
This commit is contained in:
@@ -36,8 +36,8 @@ export function VideoEmbed({ embed }: VideoEmbedProps) {
|
||||
className="absolute inset-0 w-full h-full"
|
||||
src={`${embed.embedUrl}?autoplay=1`}
|
||||
title={embed.title ?? 'Video'}
|
||||
allow="autoplay; fullscreen; picture-in-picture"
|
||||
sandbox="allow-scripts allow-same-origin allow-popups"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
||||
allowFullScreen
|
||||
referrerPolicy="no-referrer"
|
||||
/>
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user