-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathyt-embed.html
More file actions
45 lines (45 loc) · 1.24 KB
/
Copy pathyt-embed.html
File metadata and controls
45 lines (45 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="strict-origin-when-cross-origin">
<title>Ayatica video</title>
<style>
html, body {
margin: 0;
width: 100%;
height: 100%;
background: #0b1210;
overflow: hidden;
}
iframe {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
border: 0;
}
</style>
</head>
<body>
<script>
(function () {
var params = new URLSearchParams(location.search);
var id = (params.get('v') || '').replace(/[^a-zA-Z0-9_-]/g, '');
if (!id) {
document.body.textContent = 'Missing video id.';
return;
}
var frame = document.createElement('iframe');
frame.src = 'https://www.youtube.com/embed/' + id + '?rel=0';
frame.title = 'YouTube video';
frame.allow =
'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share';
frame.setAttribute('allowfullscreen', '');
frame.setAttribute('referrerpolicy', 'strict-origin-when-cross-origin');
document.body.appendChild(frame);
})();
</script>
</body>
</html>