87 lines
2.7 KiB
HTML
87 lines
2.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>About</title>
|
|
|
|
<style>
|
|
body {
|
|
text-align: center;
|
|
font-family: Arial, sans-serif;
|
|
background-color: #f4f4f4;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
h1 {
|
|
color: #333;
|
|
}
|
|
|
|
video {
|
|
width: auto;
|
|
height: auto;
|
|
max-width: 100%;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.overlay {
|
|
position: relative;
|
|
display: inline-block;
|
|
}
|
|
|
|
.overlay button {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
color: white;
|
|
border: none;
|
|
padding: 10px 20px;
|
|
font-size: 16px;
|
|
cursor: pointer;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<h1>Remember, Rick never give you up</h1>
|
|
|
|
<div class="overlay">
|
|
<video id="video" controls playsinline preload="auto">
|
|
<source src="/rickroll.mp4" type="video/mp4">
|
|
Your browser does not support the video tag.
|
|
</video>
|
|
<button id="unmute" hidden>🔊 Tap for sound</button>
|
|
</div>
|
|
|
|
<script>
|
|
const video = document.getElementById('video');
|
|
const unmuteButton = document.getElementById('unmute');
|
|
const gestureEvents = ['pointerdown', 'pointerup', 'touchend', 'keydown'];
|
|
|
|
function playMuted() {
|
|
video.muted = true;
|
|
video.play().catch(() => {});
|
|
unmuteButton.hidden = false;
|
|
}
|
|
|
|
// Browsers only allow sound after a user gesture, so retry on the first one
|
|
function unmute() {
|
|
video.muted = false;
|
|
video.play().then(() => {
|
|
unmuteButton.hidden = true;
|
|
gestureEvents.forEach(e => document.removeEventListener(e, unmute));
|
|
}).catch(playMuted);
|
|
}
|
|
|
|
gestureEvents.forEach(e => document.addEventListener(e, unmute));
|
|
|
|
// Try with sound first (allowed for returning visitors), fall back to muted autoplay
|
|
video.play().catch(playMuted);
|
|
</script>
|
|
<script type="module" src="https://static.cloudflareinsights.com/beacon.min.js/vce701823e78c4301a35b7e07294d87301792088814092" integrity="sha512-UKNk8GbxkABxKcXYuLkO16EleLGUkcvJWtpSNmExE0Too3ZaFAxTscNWEc1OdAv5/BikHawapSCaiD2XCmp+Bw==" data-cf-beacon='{"version":"2024.11.0","token":"7d5d26a6b83b42ff897b5a3378a2b837","r":1,"spa":2}' crossorigin="anonymous"></script>
|
|
</body>
|
|
</html>
|