wheelie-app / dunkin.html
Wayed11's picture
add dunkin.html
37200a0 verified
Raw History Blame Contribute Delete
1.46 kB
<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Wheelie at Dunkin</title><style>body{margin:0;background:#111;color:#fff;font-family:-apple-system,sans-serif;text-align:center;padding:16px}video{width:100%;max-width:480px;border-radius:16px}button{display:block;width:100%;max-width:480px;margin:18px auto;padding:22px;font-size:26px;font-weight:700;border:0;border-radius:18px;background:#ff3fa4;color:#fff}#s{font-size:18px;color:#7fffd4}</style></head><body><video src="https://yzzxvjrzniuhxebqqrsy.supabase.co/storage/v1/object/public/public/gen/dunkin-voice.mp4" controls playsinline loop></video><button id="b">Save to Photos</button><div id="s"></div><script>
const U='https://yzzxvjrzniuhxebqqrsy.supabase.co/storage/v1/object/public/public/gen/dunkin-voice.mp4';let f=null;const s=document.getElementById('s');
fetch(U).then(r=>r.blob()).then(b=>{f=new File([b],'wheelie-dunkin.mp4',{type:'video/mp4'});s.textContent='Ready';}).catch(()=>{s.textContent='';});
document.getElementById('b').onclick=async()=>{try{if(!f){s.textContent='Getting it...';const b=await (await fetch(U)).blob();f=new File([b],'wheelie-dunkin.mp4',{type:'video/mp4'});}
if(navigator.canShare&&navigator.canShare({files:[f]})){await navigator.share({files:[f]});s.textContent='Pick Save Video';}else{location.href=U;}}catch(e){if(!(e&&e.name==='AbortError'))location.href=U;}};
</script></body></html>