Spaces:
Running
Running
just turn on audio by default seems to be off and the button to turn on is not working remove the button - Follow Up Deployment
Browse files- index.html +1 -25
index.html
CHANGED
@@ -65,14 +65,11 @@
|
|
65 |
<p class="text-white/70 text-xl">Loading Nexus Robotics Experience</p>
|
66 |
</div>
|
67 |
</div>
|
68 |
-
<video id="bgVideo" autoplay loop playsinline
|
69 |
<source src="https://huggingface.co/spaces/akhaliq/nexusrobotics/resolve/main/Video_of_Robot_Washing_Dishes.mp4" type="video/mp4">
|
70 |
<source src="https://huggingface.co/spaces/akhaliq/nexusrobotics/resolve/main/Video_of_Robot_Washing_Dishes.webm" type="video/webm">
|
71 |
</video>
|
72 |
<div class="absolute inset-0 bg-black/30"></div>
|
73 |
-
<button id="soundToggle" class="absolute bottom-4 right-4 bg-white/20 hover:bg-white/30 rounded-full p-3 backdrop-blur-sm transition-all">
|
74 |
-
<i class="fas fa-volume-mute text-white text-xl"></i>
|
75 |
-
</button>
|
76 |
</div>
|
77 |
|
78 |
<!-- Main Content -->
|
@@ -180,27 +177,6 @@
|
|
180 |
}, 5000);
|
181 |
});
|
182 |
|
183 |
-
// Sound toggle functionality
|
184 |
-
const soundToggle = document.getElementById('soundToggle');
|
185 |
-
const video = document.getElementById('bgVideo');
|
186 |
-
|
187 |
-
soundToggle.addEventListener('click', () => {
|
188 |
-
video.muted = !video.muted;
|
189 |
-
soundToggle.innerHTML = video.muted
|
190 |
-
? '<i class="fas fa-volume-mute text-white text-xl"></i>'
|
191 |
-
: '<i class="fas fa-volume-up text-white text-xl"></i>';
|
192 |
-
|
193 |
-
// Try to unmute if user clicked to enable sound
|
194 |
-
if (!video.muted) {
|
195 |
-
video.play().catch(e => {
|
196 |
-
// If unmute fails, show message
|
197 |
-
alert('Audio playback requires user interaction. Please tap/click anywhere else on the page first.');
|
198 |
-
video.muted = true;
|
199 |
-
soundToggle.innerHTML = '<i class="fas fa-volume-mute text-white text-xl"></i>';
|
200 |
-
});
|
201 |
-
}
|
202 |
-
});
|
203 |
-
|
204 |
// Simple animation for the join button
|
205 |
document.querySelectorAll('.join-btn').forEach(button => {
|
206 |
button.addEventListener('mouseenter', () => {
|
|
|
65 |
<p class="text-white/70 text-xl">Loading Nexus Robotics Experience</p>
|
66 |
</div>
|
67 |
</div>
|
68 |
+
<video id="bgVideo" autoplay loop playsinline class="w-full h-full object-cover" preload="auto" poster="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=">
|
69 |
<source src="https://huggingface.co/spaces/akhaliq/nexusrobotics/resolve/main/Video_of_Robot_Washing_Dishes.mp4" type="video/mp4">
|
70 |
<source src="https://huggingface.co/spaces/akhaliq/nexusrobotics/resolve/main/Video_of_Robot_Washing_Dishes.webm" type="video/webm">
|
71 |
</video>
|
72 |
<div class="absolute inset-0 bg-black/30"></div>
|
|
|
|
|
|
|
73 |
</div>
|
74 |
|
75 |
<!-- Main Content -->
|
|
|
177 |
}, 5000);
|
178 |
});
|
179 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
// Simple animation for the join button
|
181 |
document.querySelectorAll('.join-btn').forEach(button => {
|
182 |
button.addEventListener('mouseenter', () => {
|