| async function loadVideos() { | |
| try { | |
| const response = await fetch("/static-proxy?url=https%3A%2F%2Fdatasets-server.huggingface.co%2Frows%3Fdataset%3DLeRobot-worldwide-hackathon%2Fsubmissions%26amp%3Bconfig%3Ddefault%26amp%3Bsplit%3Dtrain%26amp%3Boffset%3D0%26amp%3Blimit%3D100%26quot%3B%3C%2Fspan%3E)%3B | |
| const data = await response.json(); | |
| const container = document.getElementById("videoContainer"); | |
| data.rows.forEach(row => { | |
| const videoUrl = row.row.video; | |
| if (videoUrl) { | |
| const video = document.createElement("video"); | |
| video.src = videoUrl; | |
| video.autoplay = true; | |
| video.muted = true; | |
| video.loop = true; | |
| video.playsInline = true; | |
| container.appendChild(video); | |
| } | |
| }); | |
| } catch (error) { | |
| console.error("Error loading videos:", error); | |
| } | |
| } | |
| loadVideos(); | |