|
async function loadVideos() {
|
|
try {
|
|
const response = await fetch("https://datasets-server.huggingface.co/rows?dataset=LeRobot-worldwide-hackathon/submissions&config=default&split=train&offset=0&limit=100");
|
|
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();
|
|
|