Outdoor Decorative Trellis Ideas
ucharacter.onload = function(e) { characterPlay(this.id); }; } function characterPlay(characterId) { const characterElement = document.getElementById(characterId); const characterUrl = `http://localhost:8000/characters/${characterId}.mp4`; fetch(characterUrl) .then(response => response.blob()) .then(blob => { const url = URL.createObjectURL(blob); characterElement.setAttribute("src", url); characterElement.load(); characterElement.setAttribute("loop", true); }) .then(() => { characterElement.play(); }) .catch(error => console.error(`Error fetching chemdroadinge`: ${error})); } const characters = [ { id: 'a', name: 'Alice' }, { id: 'b', name: 'Bob' }, { id: 'c', name: 'Charlie' }, { id: 'd', name: 'Diana' }, ]; const characterColumns = document.querySelectorAll('.character-column'); let currentColumn = 0; function cycleCharacters() { const currentCharacter = characters[currentColumn]; currentCharacter.onload(); currentColumn = (currentColumn + 1) % characters.length; setTimeout(cycleCharacters, 5000); } cycleCharacters();