akhaliq HF Staff commited on
Commit
9392d90
·
verified ·
1 Parent(s): 4735243

audio is still not playing - Follow Up Deployment

Browse files
Files changed (1) hide show
  1. index.html +6 -11
index.html CHANGED
@@ -65,7 +65,7 @@
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>
@@ -151,22 +151,17 @@
151
  // Video playing successfully
152
  fallback.classList.add('hidden');
153
  }).catch(error => {
154
- // Try again without mute if muted
155
- if (video.muted) {
156
- video.muted = false;
157
- tryPlay();
158
- } else {
159
- // Final fallback
160
- video.style.display = 'none';
161
- fallback.classList.remove('hidden');
162
- }
163
  });
164
  }
165
  };
166
 
167
- // Start with muted video for autoplay compliance
168
  video.muted = true;
169
  tryPlay();
 
170
 
171
  // Fallback if video doesn't load within 5 seconds
172
  setTimeout(() => {
 
65
  <p class="text-white/70 text-xl">Loading Nexus Robotics Experience</p>
66
  </div>
67
  </div>
68
+ <video id="bgVideo" autoplay loop playsinline muted 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>
 
151
  // Video playing successfully
152
  fallback.classList.add('hidden');
153
  }).catch(error => {
154
+ // Final fallback if video can't play
155
+ video.style.display = 'none';
156
+ fallback.classList.remove('hidden');
 
 
 
 
 
 
157
  });
158
  }
159
  };
160
 
161
+ // Start with muted video for autoplay compliance but unmute immediately
162
  video.muted = true;
163
  tryPlay();
164
+ video.muted = false;
165
 
166
  // Fallback if video doesn't load within 5 seconds
167
  setTimeout(() => {