<!--
Some YouTube video embedding is allowed on specific domains only*, and codepen is whitelisted!
Just embed this Codepen URL instead of YouTube embed URL*:
https://cdpn.io/pen/debug/oNPzxKo?v=VIDEO_ID
* For example, https://www.youtube.com/watch?v=NAo38Q9c4xA can be only embedded in .com and .io domains (or maybe more, but not in .tw), besides those, it shows "Watch on YouTube" link in the iframe only.
* Support native YouTube embed parameters like autoplay, mute: https://developers.google.com/youtube/player_parameters
Example embed code:
```
<iframe src="https://cdpn.io/pen/debug/oNPzxKo?v=dYwto5oULSk" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="allowfullscreen"><a href="https://www.youtube.com/watch?v=dYwto5oULSk target="_blank" rel="noopener">https://www.youtube.com/watch?v=dYwto5oULSk</a></iframe>
```
-->
<iframe src=https://www.youtube.com/embed/fz9qCy8_d94?si=ZcVXs3NCo_KuppTB" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="allowfullscreen"></iframe>
html {
overflow: hidden;
}
iframe {
width: 100vw;
height: 100vh;
}
(() => {
const url = new URL(window.location)
const vid = url.searchParams.get('v') ?? 'fz9qCy8_d94?si=ZcVXs3NCo_KuppTB'
url.searchParams.delete('v')
const embedUrl = new URL(`https://www.youtube.com/embed/${vid}?${url.searchParams.toString()}`)
document.querySelector('iframe').src = embedUrl.href
})()
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.