<!--
Some YouTube videos embedding are 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 "Video unavailable, 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=NAo38Q9c4xA" 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=NAo38Q9c4xA" target="_blank" rel="noopener">https://www.youtube.com/watch?v=NAo38Q9c4xA</a></iframe>
```
Original pen: https://codepen.io/brownsugar/pen/oNPzxKo
-->
<iframe src="" 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') ?? 'SI4-BgyGclE?si=VmEfftyiP3UqoXjW'
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.