mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-09-27 12:07:43 +02:00
fix youtube embeds
This commit is contained in:
@@ -34,14 +34,13 @@ export function renderYoutubeUrl(match: URL) {
|
|||||||
embedUrl.searchParams.set("list", listId);
|
embedUrl.searchParams.set("list", listId);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AspectRatio ratio={560 / 315} maxWidth="40rem">
|
<AspectRatio ratio={560 / 315} maxWidth="40rem" zIndex={1} position="relative">
|
||||||
<iframe
|
<iframe
|
||||||
src={embedUrl.toString()}
|
src={embedUrl.toString()}
|
||||||
title="YouTube video player"
|
title="YouTube video player"
|
||||||
frameBorder="0"
|
frameBorder="0"
|
||||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen"
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen"
|
||||||
width="100%"
|
width="100%"
|
||||||
style={{ zIndex: 1, position: "relative" }}
|
|
||||||
></iframe>
|
></iframe>
|
||||||
</AspectRatio>
|
</AspectRatio>
|
||||||
);
|
);
|
||||||
@@ -52,14 +51,13 @@ export function renderYoutubeUrl(match: URL) {
|
|||||||
const embedUrl = new URL(`/embed/${videoId}`, youtubeRedirect || "https://www.youtube-nocookie.com");
|
const embedUrl = new URL(`/embed/${videoId}`, youtubeRedirect || "https://www.youtube-nocookie.com");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AspectRatio ratio={16 / 10} maxWidth="40rem">
|
<AspectRatio ratio={16 / 10} maxWidth="40rem" zIndex={1} position="relative">
|
||||||
<iframe
|
<iframe
|
||||||
src={embedUrl.toString()}
|
src={embedUrl.toString()}
|
||||||
title="YouTube video player"
|
title="YouTube video player"
|
||||||
frameBorder="0"
|
frameBorder="0"
|
||||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen"
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen"
|
||||||
width="100%"
|
width="100%"
|
||||||
style={{ zIndex: 1, position: "relative" }}
|
|
||||||
></iframe>
|
></iframe>
|
||||||
</AspectRatio>
|
</AspectRatio>
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user