-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathYouTubeEmbed.astro
19 lines (17 loc) · 1.26 KB
/
YouTubeEmbed.astro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
---
export type Props = {
id: string;
};
const { id } = Astro.props;
// https://dustri.org/b/youtube-video-embedding-harm-reduction.html
---
<iframe
allow="accelerometer 'none'; ambient-light-sensor 'none'; autoplay 'none'; battery 'none'; bluetooth 'none'; browsing-topics 'none'; camera 'none'; ch-ua 'none'; display-capture 'none'; domain-agent 'none'; document-domain 'none'; encrypted-media 'none'; execution-while-not-rendered 'none'; execution-while-out-of-viewport 'none'; gamepad 'none'; geolocation 'none'; gyroscope 'none'; hid 'none'; identity-credentials-get 'none'; idle-detection 'none'; keyboard-map 'none'; local-fonts 'none'; magnetometer 'none'; microphone 'none'; midi 'none'; navigation-override 'none'; otp-credentials 'none'; payment 'none'; picture-in-picture 'none'; publickey-credentials-create 'none'; publickey-credentials-get 'none'; screen-wake-lock 'none'; serial 'none'; speaker-selection 'none'; sync-xhr 'none'; usb 'none'; web-share 'none'; window-management 'none'; xr-spatial-tracking 'none'"
allowfullscreen
referrerpolicy="no-referrer"
sandbox="allow-scripts allow-same-origin"
src={`https://www.youtube-nocookie.com/embed/${id}`}
title="YouTube video player"
loading="lazy"
class="w-full aspect-video mb-6"
/>