Spaces:
Running
Running
Publish the 13-round game with individual voting rooms
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- README.md+10-5
- classic.htmlAdded+526
- clip-store.jsAdded+66
- index.html+98-17
- media/aidol-debut-poster.e822c9fc42ba.jpgAdded
- media/aidol-debut-reveal.8d11dc85e96c.clip.jsAdded
- media/aidol-debut-setup.0bcd9141f153.clip.jsAdded
- media/atlas-cartwheel-poster.e4344c6e2a78.jpgAdded
- media/atlas-cartwheel-reveal.8349393c9e91.clip.jsAdded
- media/atlas-cartwheel-setup.24ace3e0a7f0.clip.jsAdded
- media/controller-kick-poster.a7a0aea280ee.jpgAdded
- media/controller-kick-reveal.8ccd1acef793.clip.jsAdded
- media/controller-kick-setup.0074d3238dfe.clip.jsAdded
- media/curb-step-poster.f9c718583d6d.jpgAdded
- media/curb-step-reveal.09cf4c59ce47.clip.jsAdded
- media/curb-step-setup.a09f6d24f3db.clip.jsAdded
- media/derek-rig-poster.d3d1d81206f8.jpgAdded
- media/derek-rig-reveal.23952e460999.clip.jsAdded
- media/derek-rig-setup.711ab43a8283.clip.jsAdded
- media/digit-break-poster.6354b0fee5e6.jpgAdded
- media/digit-break-reveal.b4137ff4977a.clip.jsAdded
- media/digit-break-setup.ef8c61b03fc0.clip.jsAdded
- media/dinner-show-poster.8df578de0a90.jpgAdded
- media/dinner-show-reveal.3f4fe7e05a26.clip.jsAdded
- media/dinner-show-setup.963bfc5968ca.clip.jsAdded
- media/flying-pot-poster.c794f25aaa48.jpgAdded
- media/flying-pot-reveal.3882d8c03ca6.clip.jsAdded
- media/flying-pot-setup.57a53a8d6353.clip.jsAdded
- media/invisible-dish-poster.394628b02ff0.jpgAdded
- media/invisible-dish-reveal.efee0915eef7.clip.jsAdded
- media/invisible-dish-setup.5ec37facefbc.clip.jsAdded
- media/lab-thrash-poster.9f37f7f382a3.jpgAdded
- media/lab-thrash-reveal.05a25f6d40ec.clip.jsAdded
- media/lab-thrash-setup.cdd9a3f2b5a1.clip.jsAdded
- media/motion-copy-poster.9fc9b2c50b31.jpgAdded
- media/motion-copy-reveal.606cc33ea8da.clip.jsAdded
- media/motion-copy-setup.5c14a8cea07c.clip.jsAdded
- media/self-toss-poster.fe7075364478.jpgAdded
- media/self-toss-reveal.e1000e2fbd17.clip.jsAdded
- media/self-toss-setup.611eec700ede.clip.jsAdded
- media/ted-trolley-poster.b77de8726149.jpgAdded
- media/ted-trolley-reveal.482f4d548493.clip.jsAdded
- media/ted-trolley-setup.62f11ca01021.clip.jsAdded
- peer-rooms.jsAdded+445
- rooms.cssAdded+114
- rooms.htmlAdded+100
- rooms.jsAdded+448
- rounds.jsonAdded+1
- style.cssDeleted-28
- vendor/itty-sockets.LICENSEAdded+21
12345678910---title: Oops All Failuresemoji: 👀colorFrom: indigocolorTo: redsdk: staticpinned: false---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference123456789101112131415---title: Oops, All Failuresemoji: 🤖colorFrom: greencolorTo: graysdk: staticapp_file: index.htmlpinned: false---# Oops, All FailuresHost a room and share the player link. Each player enters a name, watches the robot clip, and predicts what goes wrong. Players can change their pick until the host reveals the answer. Each correct prediction earns two points.Keep the host tab open during the game. To resume after closing it, reopen the host link in the same browser. The player invite contains only the room code. The one-screen version includes the original team controls and clip credits.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="color-scheme" content="dark"><title>Oops, All Failures</title><style>:root{--bg:#101411;--surface:#1b211d;--line:#3c493e;--ink:#f4f5e9;--dim:#b6c1b3;--lime:#d3ff63;--pink:#ff948e;--purple:#d0b8ff;--red:#f16361;font-family:Arial,Helvetica,sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.4}button:focus-visible,input:focus-visible,a:focus-visible{outline:3px solid var(--purple);outline-offset:4px}button{border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:8px;padding:12px 18px;font-weight:700}button:hover:not(:disabled){background:#2a342b}button.primary{background:var(--lime);color:#17200d;border-color:var(--lime)}button.primary:hover:not(:disabled){background:#e2ff97}.quiet{background:transparent;font-weight:400}.small{font-size:13px;padding:8px 11px}.danger{color:var(--pink)}a{color:var(--lime)}[hidden]{display:none!important}.shell{max-width:1520px;margin:auto;padding:20px 32px 28px}header{display:flex;align-items:center;justify-content:flex-end;gap:16px;border-bottom:1px solid var(--line);padding-bottom:16px}.brand{font-size:15px;font-weight:800;letter-spacing:.06em;display:flex;align-items:center;gap:9px}.brand b{display:inline-grid;place-items:center;background:var(--lime);color:#131b0e;width:29px;height:29px;font-family:monospace;font-size:19px}.header-controls{display:flex;align-items:center;gap:10px}.volume{display:flex;align-items:center;gap:7px;color:var(--dim);font-size:13px}.volume input{width:78px;accent-color:var(--lime)}.label{font:700 12px/1.4 monospace;letter-spacing:.13em;text-transform:uppercase;color:var(--lime)}h1,h2,h3,p{margin:0}.welcome{padding:48px 0 24px;display:grid;grid-template-columns:1.15fr 1fr;gap:58px;align-items:center;min-height:calc(100vh - 140px)}h1{font-family:Impact,'Arial Narrow',Arial,sans-serif;font-size:clamp(64px,7vw,108px);font-weight:900;line-height:.95;letter-spacing:-.025em;text-transform:uppercase;margin:18px 0 20px}h1 span{color:var(--lime)}.intro{font-size:21px;line-height:1.45;color:var(--dim);max-width:520px}.tagline{display:inline-block;font-family:Georgia,serif;font-style:italic;color:var(--pink);font-size:29px;margin:20px 0}.start-panel{margin-top:32px;max-width:560px}.team-inputs{display:flex;flex-direction:column;gap:9px;margin:12px 0}.team-input-row{display:flex;gap:8px}.team-input-row input{background:var(--surface);border:1px solid var(--line);border-radius:6px;color:var(--ink);padding:13px 14px;flex:1;min-width:0}.team-input-row button{width:42px;padding:0}.start-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}.start-actions .primary{padding:16px 28px;font-size:19px}.rules-mini{font-size:14px;line-height:1.65;color:var(--dim);margin-top:20px}.welcome-art{position:relative;transform:rotate(2deg)}.welcome-art img{display:block;width:100%;aspect-ratio:16/10;object-fit:cover;border:1px solid var(--line);border-radius:12px;filter:saturate(.75)}.sticker{position:absolute;right:-5px;bottom:-17px;transform:rotate(-6deg);background:var(--pink);color:#27110e;font-family:Impact,'Arial Narrow',sans-serif;font-size:clamp(29px,3vw,45px);padding:15px 22px;box-shadow:5px 7px 0 #050806}.caption-tape{position:absolute;top:-12px;left:24px;background:var(--lime);color:#18220e;padding:8px 14px;font:700 13px monospace;transform:rotate(-4deg)}.welcome-art .pitch{font-size:15px;color:var(--dim);margin:38px 10px 0;transform:rotate(-2deg);max-width:450px;line-height:1.6}.round-heading{padding:22px 0 18px;display:flex;align-items:end;justify-content:space-between;gap:20px}.round-heading h2{font-family:Impact,'Arial Narrow',Arial,sans-serif;font-size:clamp(30px,3.2vw,48px);letter-spacing:.01em;font-weight:900;margin-top:7px}.round-counter{font:700 14px monospace;color:var(--dim);white-space:nowrap}.game-grid{display:grid;grid-template-columns:minmax(0,1.85fr) minmax(330px,1fr);gap:26px;align-items:start}.stage{position:relative;aspect-ratio:16/9;background:#000;overflow:hidden;border-radius:10px;border:1px solid var(--line)}video{width:100%;height:100%;object-fit:contain;display:block}.media-badge{position:absolute;left:14px;top:14px;font:700 12px monospace;letter-spacing:.06em;background:rgba(14,18,15,.85);padding:7px 10px;border-radius:3px;pointer-events:none}.punchline{position:absolute;bottom:20px;left:20px;right:20px;text-align:center;background:var(--lime);color:#111b08;padding:16px 20px;font-family:Impact,'Arial Narrow',Arial,sans-serif;font-size:clamp(25px,3vw,44px);line-height:1.06;transform:rotate(-1deg);box-shadow:4px 5px 0 rgba(0,0,0,.65);animation:pop .25s ease-out}.punchline small{font:700 12px monospace;display:block;letter-spacing:.1em;margin-bottom:7px}.transport{display:flex;justify-content:space-between;gap:10px;align-items:center;padding-top:13px;flex-wrap:wrap}.transport-left{display:flex;gap:8px}.source-line{font-size:12px;color:var(--dim);line-height:1.5;margin:13px 2px}.task{font-size:18px;color:var(--dim);line-height:1.5;margin:16px 2px}.aside{min-width:0}.phase-title{font-size:25px;font-weight:800;line-height:1.15;margin:4px 0 12px}.phase-copy{font-size:16px;line-height:1.6;color:var(--dim)}.watching{padding:24px 0}.thinking-dot{display:inline-block;width:9px;height:9px;background:var(--lime);border-radius:50%;margin-right:8px;animation:blink 1.2s infinite}.countdown{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.countdown span:first-child{font-size:13px;letter-spacing:.06em;color:var(--dim);text-transform:uppercase}.timer{font:800 34px monospace;color:var(--lime)}.timer.expired{color:var(--pink)}.options{display:flex;flex-direction:column;gap:7px;margin:10px 0 22px}.option{display:flex;align-items:center;gap:13px;padding:11px 13px;border:1px solid var(--line);border-radius:7px;min-height:49px;font-size:16px;line-height:1.3}.option b{color:var(--lime);font:800 21px monospace;min-width:18px}.option.correct{border-color:var(--lime);background:#25331a}.team-pick{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;padding:9px 0;border-top:1px solid var(--line)}.team-pick-name{font-size:14px;font-weight:700;overflow-wrap:anywhere}.pick-buttons{display:flex;gap:5px;align-items:center}.pick-buttons button{padding:7px 10px;font-size:14px;min-width:30px}.pick-buttons button[aria-pressed=true]{background:var(--purple);border-color:var(--purple);color:#221536}.full-width{width:100%;font-size:17px;padding:15px}.score-strip{display:flex;gap:18px;margin-top:23px;border-top:1px solid var(--line);padding:17px 0 0;flex-wrap:wrap}.score-item{font-size:13px;color:var(--dim);display:flex;gap:10px;align-items:center}.score-item b{color:var(--ink);font:700 22px monospace}.answer-letter{font:900 62px monospace;color:var(--lime);line-height:1}.answer-text{font-size:24px;font-weight:800;margin:8px 0 15px;line-height:1.25}.round-points{margin:20px 0}.points-row{display:flex;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding:12px 0;font-size:15px}.points-row b{color:var(--lime);white-space:nowrap}.points-row .zero{color:var(--dim)}.reply-line{font-family:Georgia,serif;font-style:italic;font-size:20px;line-height:1.45;color:var(--pink)}.error{padding:14px;background:#4d2321;color:#fff0ea;border-radius:6px;margin:12px 0}.foot{display:flex;justify-content:space-between;align-items:center;padding-top:22px;gap:15px;color:var(--dim);font:12px monospace}.foot button{border:0;padding:4px;color:var(--dim)}.results{max-width:860px;margin:40px auto;text-align:center}.results h2{font-family:Impact,'Arial Narrow',sans-serif;font-size:clamp(44px,6vw,82px);margin:18px 0;color:var(--lime);line-height:1}.results p{font-size:19px;line-height:1.6;color:var(--dim)}.leaderboard{margin:35px 0;text-align:left}.leader-row{display:flex;align-items:center;justify-content:space-between;padding:20px 0;border-top:1px solid var(--line);font-size:23px;gap:20px}.leader-row strong{color:var(--lime);font:800 35px monospace}.final-joke{font-family:Georgia,serif;font-style:italic;font-size:25px!important;color:var(--pink)!important;margin:28px 0}.result-actions{display:flex;gap:12px;justify-content:center}dialog{background:#19211b;color:var(--ink);border:1px solid #75856d;border-radius:14px;max-width:780px;width:calc(100% - 36px);max-height:85vh;padding:28px}dialog::backdrop{background:rgba(0,0,0,.8)}dialog h2{font-size:28px;margin:0 0 18px}dialog p{font-size:15px;line-height:1.6;margin:12px 0;color:var(--dim)}dialog ul{padding-left:20px;font-size:14px;line-height:1.6}dialog li{margin:14px 0}.dialog-close{float:right}.wobble{animation:wobble .35s ease-out}.music-meter{display:inline-flex;align-items:center;gap:2px;height:13px;margin-right:6px}.music-meter i{display:block;width:3px;height:9px;background:var(--lime);animation:meter .65s ease-in-out infinite alternate}.music-meter i:nth-child(2){animation-delay:.2s}.music-meter i:nth-child(3){animation-delay:.4s}@keyframes meter{to{height:3px}}@keyframes pop{from{transform:scale(.9) rotate(-3deg);opacity:0}to{transform:scale(1) rotate(-1deg);opacity:1}}@keyframes blink{50%{opacity:.25}}@keyframes wobble{25%{transform:translateX(-4px)}75%{transform:translateX(3px)}}@media(min-width:1600px){.shell{padding-top:26px}.game-grid{gap:36px}.option{font-size:18px;min-height:57px}.phase-title{font-size:29px}}@media(max-width:1050px){.shell{padding:16px 20px}.welcome{gap:28px}.game-grid{grid-template-columns:minmax(0,1.4fr) minmax(300px,1fr);gap:18px}.option{font-size:14px;padding:9px}.team-pick{grid-template-columns:1fr}.round-heading h2{font-size:33px}.volume{display:none}}@media(max-width:760px){.shell{padding:14px}.brand{font-size:12px}.header-controls{gap:6px}.header-controls button{font-size:12px;padding:9px}.welcome{grid-template-columns:1fr;padding-top:26px;gap:24px;min-height:0}.welcome-art{max-width:520px;margin:15px 8px 30px}.welcome-art .pitch{display:none}h1{font-size:64px}.intro{font-size:18px}.game-grid{grid-template-columns:1fr}.round-heading{padding:17px 0 12px}.round-heading h2{font-size:32px}.task{font-size:15px;margin:10px 2px}.watching{padding:10px 0}.score-strip{margin-top:15px}.team-pick{grid-template-columns:minmax(0,1fr) auto}.foot{font-size:10px}.punchline{bottom:10px;left:10px;right:10px;padding:12px;font-size:27px}.punchline small{font-size:9px}.leader-row{font-size:18px}.volume{display:none}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}@media(min-width:761px) and (max-height:850px){.welcome{padding-top:28px;padding-bottom:12px}.welcome h1{font-size:80px;margin:12px 0 16px}.welcome .tagline{margin:14px 0;font-size:25px}.start-panel{margin-top:20px}.team-input-row input{padding:10px 13px}.start-actions{margin-top:12px}.start-actions .primary{padding:13px 24px}.rules-mini{margin-top:14px}.shell{padding-top:12px;padding-bottom:12px}header{padding-bottom:10px}.round-heading{padding:12px 0}.round-heading h2{font-size:34px}.stage{max-height:calc(100vh - 315px)}.phase-title{font-size:21px;margin:3px 0 8px}.countdown{margin-bottom:6px}.timer{font-size:28px}.options{gap:5px;margin:8px 0 14px}.option{font-size:14px;padding:7px 11px;min-height:38px}.team-pick{padding:6px 0}.full-width{padding:12px;font-size:16px}.task{font-size:16px;margin:10px 2px}.source-line{margin:8px 2px}.score-strip{margin-top:12px;padding-top:12px}.foot{padding-top:14px}.transport{padding-top:10px}.answer-text{font-size:22px}.round-points{margin:12px 0}.points-row{padding:9px 0}}.result-actions{flex-wrap:wrap}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.media-badge:empty{display:none}.skip{flex-shrink:0;border-color:var(--dim);white-space:nowrap}.round-heading>div{min-width:0}@media(max-width:760px){.skip{font-size:13px;padding:10px}.round-heading{gap:12px}}.stage.creator-mark-left .media-badge{left:auto;right:14px}.clip-loading{position:absolute;inset:0;display:grid;place-items:center;background:rgba(0,0,0,.45);font-weight:700;color:var(--ink)}</style></head><body><div class="shell"><header><div class="header-controls"><label class="volume">Music <input id="volume" type="range" min="0" max="100" value="48" aria-label="Music volume"></label><button id="sound" class="small quiet" aria-pressed="true">♫ Sound on</button><button id="fullscreen" class="small quiet">Full screen</button></div></header><p id="sound-warning" class="error" role="status" hidden></p>
<section id="welcome" class="welcome"> <div><h1>Oops.<br><span>All failures.</span></h1><p class="intro">Guess what goes wrong next.</p><div class="tagline">“It worked in sim”</div> <div class="start-panel"><label class="label" for="team-0">Teams</label><div class="team-inputs" id="team-inputs"></div><button id="add-team" class="small quiet">+ Add a team</button><div class="start-actions"><button id="start" class="primary">Play ♫</button><button id="rules-open" class="quiet">How to play</button></div><p class="rules-mini" id="welcome-rules"></p><p class="error" id="start-error" hidden role="alert"></p></div></div> <div class="welcome-art"><img id="hero-image" alt="A robot moments before a mishap"><div class="sticker">WHAT COULD GO WRONG?</div></div></section>
<section id="game" hidden> <div class="round-heading"><div><div class="label" id="round-label">Round 01</div><h2 id="round-title"></h2></div><button id="skip" class="skip quiet" type="button">Skip round →</button></div> <div class="game-grid"><div><div class="stage" id="stage"><video id="video" playsinline muted preload="auto" aria-label="Robot failure clip"></video><div id="clip-loading" class="clip-loading" hidden role="status">Loading clip…</div><div class="media-badge" id="media-badge">THE SETUP</div><div class="punchline" id="punchline" hidden></div></div><div class="transport"><div class="transport-left"><button id="play-pause" class="small">Pause clip</button><button id="replay-setup" class="small quiet" hidden>Watch again</button><button id="replay-fail" class="small quiet" hidden>Replay</button><button id="slowmo" class="small quiet" hidden>Slow-mo</button></div><span class="sr-only" id="media-status" role="status" aria-live="polite">Loading</span></div><p class="task" id="task"></p><p class="source-line" id="source-line"></p><div class="error" id="media-error" hidden role="alert"></div></div> <aside class="aside"><div id="watching" class="watching"><div class="phase-title"><span class="thinking-dot"></span>Watch closely…</div></div> <div id="predict" hidden><div class="countdown"><span>Make your pick</span><strong id="timer" class="timer">30</strong></div><div id="question" class="phase-title"></div><div class="options" id="options"></div><div id="team-picks"></div><button id="lock" class="primary full-width" disabled>Reveal</button></div> <div id="revealing" class="watching" hidden><div class="phase-title">Let’s see…</div></div> <div id="round-result" hidden><div class="answer-letter" id="answer-letter"></div><p class="answer-text" id="answer-text"></p><div class="round-points" id="round-points"></div><button id="next" class="primary full-width">Next clip</button></div> </aside></div><div class="score-strip" id="scores"></div></section>
<section id="results" class="results" hidden><div class="label">Final scores</div><h2 id="winner-title">You predicted the chaos</h2><p id="winner-copy"></p><div class="leaderboard" id="leaderboard"></div><div class="result-actions"><button id="restart" class="primary">Play again</button><button id="credits-end" class="quiet">Clips & credits</button></div></section>
<footer class="foot"><span id="foot-copy"></span><button id="credits-open" class="quiet">Clips & credits</button></footer></div><dialog id="rules"><button class="dialog-close quiet" data-close="rules">Close</button><h2>How to play</h2><p>Watch until the clip pauses, then give each team 30 seconds to pick A, B, C or D. The host enters the guesses and hits Reveal.</p><p>A correct guess earns <strong>2 points</strong>. Skip a round to move on without awarding points.</p><p>Highest score wins. Ties count as a shared win.</p></dialog><dialog id="credits"><button class="dialog-close quiet" data-close="credits">Close</button><h2>Clips & credits</h2><ul id="credit-list"></ul><p>Original game music and captions. Source audio is muted.</p></dialog>
<script id="round-data" type="application/json">[{"id":"invisible-dish","title":"Doing the dishes","task":"Pick up the plate. Wash it with the sponge.","question":"What gets washed?","options":["The counter.","Its own gripper.","An imaginary plate.","The whole plate rack."],"answerIndex":2,"answer":"An imaginary plate. The real one stays in the rack.","punchline":"The plate is still dirty. The air is spotless.","sourceTitle":"Universal Manipulation Interface","sourceUrl":"https://umi-gripper.github.io/","classification":"Autonomous ResNet baseline evaluation failure. Source speed unlabeled.","shortCredit":"UMI · policy evaluation","videoUrl":"https://umi-gripper.github.io/videos/comparison_dish_resnet.mp4","start":0.4,"pause":2.6,"end":11.2,"setup":{"bundle":"media/invisible-dish-setup.5ec37facefbc.clip.js","key":"5ec37facefbc7a94929a79502417983fb3e0441e0a3582004cef329d7814f69b"},"reveal":{"bundle":"media/invisible-dish-reveal.efee0915eef7.clip.js","key":"efee0915eef70575d2dff5eb5dd388c7af171a6a4fafa9420593859406a02c31"},"poster":"media/invisible-dish-poster.394628b02ff0.jpg"},{"id":"flying-pot","title":"Yes, chef","task":"Move the pot from the sink to the stove.","question":"What happens next?","options":["Drops the pot, then carries on empty-handed.","Puts the pot upside down on the burner.","Dunks the pot back into the sink.","Drags the pot sideways across the counter."],"answerIndex":0,"answer":"Drops the pot. Continues the delivery anyway.","punchline":"Soup of the day: floor.","sourceTitle":"REFLECT / RoboFail","sourceUrl":"https://robot-reflect.github.io/","classification":"Teleoperated failure demonstration for RoboFail, not an autonomous policy trial. Source at 4×; camera view cropped to remove outcome annotations.","shortCredit":"RoboFail · teleoperated failure demo","videoUrl":"https://robot-reflect.github.io/videos/boilWater4.mov","cropFilter":"crop=980:540:22:68","start":35,"pause":38.5,"end":43,"setup":{"bundle":"media/flying-pot-setup.57a53a8d6353.clip.js","key":"57a53a8d635342a0b0dd7bb874a4965923ef53f2830989e8608085a5383218b4"},"reveal":{"bundle":"media/flying-pot-reveal.3882d8c03ca6.clip.js","key":"3882d8c03ca67d12e1734e3a117420a4b15a598dd0e7c01a362d27638f55aae4"},"poster":"media/flying-pot-poster.c794f25aaa48.jpg"},{"id":"curb-step","title":"One small step","task":"Walk down from the pavement.","question":"How does it handle the step down?","options":["Hops down on all four feet.","Takes one step, then faceplants.","Stops at the edge and backs away.","Turns around and takes the long way."],"answerIndex":1,"answer":"One foot down. Then the rest of the robot.","punchline":"Please use the ramp.","sourceTitle":"Learning Vision-Guided Quadrupedal Locomotion End-to-End with Cross-Modal Transformers","sourceUrl":"https://vision-locomotion.github.io/","classification":"Real learned-policy evaluation failure. The research page attributes the fall to a large drop whose extent is not visible to the front camera. Source speed unlabeled.","shortCredit":"Vision-Guided Locomotion · policy evaluation","videoUrl":"https://blindsupp.github.io/visual-walking/resources/failure/failure_curb.mp4","start":0.1,"pause":2.7,"end":4.05,"setup":{"bundle":"media/curb-step-setup.a09f6d24f3db.clip.js","key":"a09f6d24f3db155a1a7287f4ef0352ccc4e943b4ac03760d26408982eb0822e9"},"reveal":{"bundle":"media/curb-step-reveal.09cf4c59ce47.clip.js","key":"09cf4c59ce47280b13378f9b867145c9a66ab3844caeff9c25d0798e8713bffb"},"poster":"media/curb-step-poster.f9c718583d6d.jpg"},{"id":"self-toss","title":"Go fetch","task":"Throw the tennis ball.","question":"What else gets thrown?","options":["The gripper releases the ball straight down.","The arm flings the ball into its own body.","The entire robot somersaults onto its back.","The robot tips sideways without letting go."],"answerIndex":2,"answer":"The ball flies. Then the robot tumbles onto its back.","punchline":"Not you. NOT YOU.","sourceTitle":"UMI on Legs: failure montage","sourceUrl":"https://umi-on-legs.github.io/","classification":"Whole-body manipulation research failure, cropped to the original montage's bottom-right panel. Exact controller state and source speed unlabeled.","shortCredit":"UMI on Legs · research failure","videoUrl":"https://umi-on-legs.github.io/static/videos/failures-small.mp4","cropFilter":"crop=iw/2:ih/2:iw/2:ih/2","start":16,"pause":18,"end":26.5,"setup":{"bundle":"media/self-toss-setup.611eec700ede.clip.js","key":"611eec700eded2292c6043632b3b51875a601d2919bc37118e9e8aabe6e5eb6a"},"reveal":{"bundle":"media/self-toss-reveal.e1000e2fbd17.clip.js","key":"e1000e2fbd17606e2bcaef4d46acd0a4ca7515f379b793c070290c35c569ab41"},"poster":"media/self-toss-poster.fe7075364478.jpg"},{"id":"digit-break","title":"One last bin","task":"Move the bin to the conveyor.","question":"How does this shift end?","options":["Carries the bin to the conveyor.","Drops the bin but stays upright.","Crumples onto the floor with the bin.","Turns to wave at the crowd."],"answerIndex":2,"answer":"Digit crumples onto the floor, taking the bin with it.","punchline":"Break time.","sourceTitle":"Agility Robotics: Digit at ProMat 2023","sourceUrl":"https://www.linkedin.com/posts/agilityrobotics_promat2023-activity-7050148324401692673-Ut8w","classification":"Manufacturer footage of a live bin-handling demonstration failure at ProMat 2023. The visible collapse does not establish its technical cause.","shortCredit":"Agility Robotics · ProMat demo","sourceExcerpt":true,"start":10.4,"pause":12.4,"end":15.5,"setup":{"bundle":"media/digit-break-setup.ef8c61b03fc0.clip.js","key":"ef8c61b03fc084db8dda3b0bdb5ad846b0ec377b212f902504e3a1c3da5f8abf"},"reveal":{"bundle":"media/digit-break-reveal.b4137ff4977a.clip.js","key":"b4137ff4977aff8476d55ed60ca8ad75e734cb51985df648b98b24da8d4d8ece"},"poster":"media/digit-break-poster.6354b0fee5e6.jpg"},{"id":"aidol-debut","title":"A grand entrance","task":"Walk onstage. Wave to the audience.","question":"How does the debut go?","options":["Keeps walking straight off the stage.","Sits down on the edge of the stage.","Freezes upright with one arm raised.","Faceplants as the staff rush in."],"answerIndex":3,"answer":"It pitches forward. The staff rush in to catch it.","punchline":"A standing ovation felt insensitive.","sourceTitle":"The National / Moscow News Agency: AIDOL debut","sourceUrl":"https://www.thenationalnews.com/video/JxNPpnEs/russian-robot-stumbles-on-debut-appearance/","classification":"Live stage demonstration failure. The National carries Moscow News Agency footage; both watermarks are retained. The precise technical cause is unconfirmed.","shortCredit":"The National / Moscow News Agency · AIDOL debut","sourceExcerpt":true,"start":21.2,"pause":23.7,"end":26.3,"setup":{"bundle":"media/aidol-debut-setup.0bcd9141f153.clip.js","key":"0bcd9141f1539155af18844f63ca774cc529d71ac67ba9e4294436e976176994"},"reveal":{"bundle":"media/aidol-debut-reveal.8d11dc85e96c.clip.js","key":"8d11dc85e96cdf215cbdd4bd07bedf73c81bba7ca81d3e815e62ea00fe1a5e85"},"poster":"media/aidol-debut-poster.e822c9fc42ba.jpg"},{"id":"controller-kick","title":"A quick demo","task":"The robot is practising kicks beside its handler.","question":"What happens next?","options":["The robot kicks its own foot into the desk.","The controller gets kicked out of the handler’s hand.","The handler trips over the robot’s leg.","The robot’s foot knocks over the chair."],"answerIndex":1,"answer":"The hand-held controller gets kicked across the room.","punchline":"So much for being in control.","sourceTitle":"IHA News: Robot Kicks Developer During China Demo","sourceUrl":"https://iha.news/robot-kicks-developer-during-china-demo/","classification":"Reported accidental contact during a motion demonstration. The visible strike knocks a controller from the handler’s hand; a body strike, robot model, autonomy, and technical cause are not established.","shortCredit":"IHA News · demo mishap","videoUrl":"https://iha.news/wp-content/uploads/2026/09/iha-auto-draft-2026-09-17_09-27-41_957713.mp4","start":0.5,"pause":1.3,"end":5.6,"setup":{"bundle":"media/controller-kick-setup.0074d3238dfe.clip.js","key":"0074d3238dfed75d47bbf3c292f4a6a5f682d47acbc930d7ba747f0fbd594189"},"reveal":{"bundle":"media/controller-kick-reveal.8ccd1acef793.clip.js","key":"8ccd1acef79368239efb5e9fc972a5f0a0e8e0c83afa4548fd1916184f952a54"},"poster":"media/controller-kick-poster.a7a0aea280ee.jpg"},{"id":"motion-copy","title":"Copy me","task":"The robot mirrors the operator’s movements.","question":"What happens next?","options":["It kicks him, then copies him doubling over.","It spins too far and falls flat on its face.","It knocks the camera over with a kick.","It grabs his arm and drags him sideways."],"answerIndex":0,"answer":"It kicks the operator, then copies him doubling over.","punchline":"Apparently that move was contagious.","sourceTitle":"zeonsunlight / 人工智障开发��业户","sourceUrl":"https://www.bilibili.com/video/BV1FNBDBiEM3/","classification":"Reported accidental contact during a motion-copying experiment. The precise control fault is unconfirmed. A short excerpt from the original creator’s video, with the watermark retained.","shortCredit":"zeonsunlight · motion-copying mishap","sourceExcerpt":true,"start":9,"pause":12.6,"end":16.6,"setup":{"bundle":"media/motion-copy-setup.5c14a8cea07c.clip.js","key":"5c14a8cea07ca622544addceb71938a28c0c678747e9d9a59a1e4b5675753535"},"reveal":{"bundle":"media/motion-copy-reveal.606cc33ea8da.clip.js","key":"606cc33ea8dab7b71357c4f27d0a81f0f0cd1242237ee04b2ba3ec92381961c9"},"poster":"media/motion-copy-poster.9fc9b2c50b31.jpg"},{"id":"atlas-cartwheel","title":"Stick the landing","task":"Atlas lines up a cartwheel.","question":"How does the landing go?","options":["It lands sitting up and waves.","It falls onto its shoulder, legs still pedalling.","It slides headfirst into the crash mat.","One hand snaps off mid-cartwheel."],"answerIndex":1,"answer":"Onto its shoulder. The legs keep going.","punchline":"Nailed the floor.","sourceTitle":"Boston Dynamics / RAI Institute: Atlas Airborne","sourceUrl":"https://bostondynamics.com/video/atlas-airborne-boston-dynamics-rai-institute/","classification":"Manufacturer-published research robot trial failure in the Atlas Airborne blooper reel. The source sequence is in slow motion; precise control cause unconfirmed.","shortCredit":"Boston Dynamics / RAI Institute · research blooper","videoUrl":"https://embed-ssl.wistia.com/deliveries/07f2a78a225005341f5268d65e32cb82e88c7668.bin","start":38.7,"pause":39.65,"end":44.2,"sourceExcerpt":true,"setup":{"bundle":"media/atlas-cartwheel-setup.24ace3e0a7f0.clip.js","key":"24ace3e0a7f00e0feeb2395f088f04d0fea66e5a7eae5edc56cb9cdb4bc3d426"},"reveal":{"bundle":"media/atlas-cartwheel-reveal.8349393c9e91.clip.js","key":"8349393c9e91ffc23886cab51224aa329397aa2a92e02419f0a6d6ba19b46598"},"poster":"media/atlas-cartwheel-poster.e4344c6e2a78.jpg"},{"id":"ted-trolley","title":"First day on the job","task":"Put the box on the shelf.","question":"How does the delivery go?","options":["Drops the box, pulls the trolley over, then falls too.","Shoves every box off the shelf but stays upright.","Turns around and marches away with the box.","Throws the box over the shelf."],"answerIndex":0,"answer":"The box goes down. The trolley goes down. Then the robot.","punchline":"Probation did not go well.","sourceTitle":"Boston Dynamics / Marc Raibert at TED2017","sourceUrl":"https://www.ted.com/talks/marc_raibert_meet_spot_the_robot_dog_that_can_run_hop_and_open_doors","classification":"Real Boston Dynamics Atlas manipulation-test outtake shown by founder Marc Raibert in his TED2017 talk. The precise control failure is not established.","shortCredit":"Boston Dynamics / TED · manipulation test","sourceExcerpt":true,"start":319.85,"pause":321.35,"end":332.6,"setup":{"bundle":"media/ted-trolley-setup.62f11ca01021.clip.js","key":"62f11ca0102199752c74b0c548fdbb476e3b4acb177dc10521b6b9058e10a712"},"reveal":{"bundle":"media/ted-trolley-reveal.482f4d548493.clip.js","key":"482f4d54849359b06a11fa03247c24f049a3f6877f42c23c8b441d6fd8407cb1"},"poster":"media/ted-trolley-poster.b77de8726149.jpg"},{"id":"derek-rig","title":"Just stand there","task":"The handler tries to steady the robot’s frame.","question":"What gets knocked over?","options":["The white frame holding the robot.","The handler.","The black stand beside the robot.","The table behind the robot."],"answerIndex":2,"answer":"The black stand goes down. The handler puts his hands on his head.","punchline":"Nobody touch anything else.","sourceTitle":"Cix Liv / REK: DeREK testing mishap","sourceUrl":"https://x.com/cixliv/status/1946648610940367008","classification":"Original creator footage of a robot testing mishap, published July 19, 2025. The suspended robot flails and knocks over the black stand next to it; it remains supported by the white frame. Precise technical cause is unconfirmed. Crop retains the REK watermark.","shortCredit":"Cix Liv / REK · testing mishap","videoUrl":"https://video.twimg.com/amplify_video/1946647066626699266/vid/avc1/1200x1000/qc4wG0RW2q2C0vgI.mp4","cropFilter":"crop=1000:670:200:330","start":6.2,"pause":8.5,"end":16.5,"sourceExcerpt":true,"setup":{"bundle":"media/derek-rig-setup.711ab43a8283.clip.js","key":"711ab43a8283ba1aa02d7f8928069147e19d2541465caf1389269fcdcf3eccb5"},"reveal":{"bundle":"media/derek-rig-reveal.23952e460999.clip.js","key":"23952e460999b7c7ec241f948ba639d00f0eab39a858b802f60759e3e0c8afd5"},"poster":"media/derek-rig-poster.d3d1d81206f8.jpg"},{"id":"lab-thrash","title":"Personal space","task":"Two handlers check a robot hanging from a stand.","question":"How does the test go?","options":["It drops straight to the floor.","It gives the seated handler a gentle wave.","It flails, drags the stand, and sends the handlers running.","It folds its arms and stays still."],"answerIndex":2,"answer":"It windmills its arms, drags the stand, and sends both handlers scrambling.","punchline":"Stand back. Further.","sourceTitle":"Jam Press / New York Post: humanoid test mishap","sourceUrl":"https://nypost.com/2025/05/05/tech/violent-humanoid-robot-snaps-attacks-factory-workers-video/","classification":"Reported factory or lab testing mishap, carried by New York Post with Jam Press credit. A suspended humanoid flails beside two handlers. Exact model, operating mode, date of filming, and technical cause are not independently established. No intentional attack is claimed. Source speed unlabeled.","shortCredit":"Jam Press / New York Post · test mishap","sourceExcerpt":true,"start":7.5,"pause":10.3,"end":21.7,"setup":{"bundle":"media/lab-thrash-setup.cdd9a3f2b5a1.clip.js","key":"cdd9a3f2b5a195e75ef02ec06195e4d3e7004b15bbba6498b53b0efe6526a10f"},"reveal":{"bundle":"media/lab-thrash-reveal.05a25f6d40ec.clip.js","key":"05a25f6d40ecf79764b5967ef5b5f69438f14d60ddd1af40fb6a483016ea864a"},"poster":"media/lab-thrash-poster.9f37f7f382a3.jpg"},{"id":"dinner-show","title":"Dinner and a show","task":"A robot dances beside a table at a hotpot restaurant.","question":"What does it add to dinner?","options":["It bows, then sits at the table.","It smacks the table and keeps dancing as an employee grabs it.","It pulls out a chair for a customer.","It trips over a chair and stays down."],"answerIndex":1,"answer":"It smacks the table, then keeps dancing while an employee tries to restrain it.","punchline":"The apron says “I’M GOOD.”","sourceTitle":"ABC News / @Meooow via Storyful: dancing robot in Cupertino","sourceUrl":"https://abcnews.com/video/131217687/","classification":"Restaurant dance demonstration mishap, not autonomous aggression. ABC7 reported that employees attributed it to accidentally selecting a high-energy routine. Source footage by @Meooow via Storyful, carried by ABC News; visible credits retained. Source speed unlabeled.","shortCredit":"@Meooow / Storyful / ABC News · restaurant demo","sourceExcerpt":true,"start":65.5,"pause":69.0,"end":78.3,"setup":{"bundle":"media/dinner-show-setup.963bfc5968ca.clip.js","key":"963bfc5968ca29a25e2f150f2a224111328fcf276131d5b824404a4575415d5a"},"reveal":{"bundle":"media/dinner-show-reveal.3f4fe7e05a26.clip.js","key":"3f4fe7e05a26f956031103511a4bcaffc0b12c7d8592e7c5fd3926b635e9cfd0"},"poster":"media/dinner-show-poster.8df578de0a90.jpg"}]</script><script>/* Original synthesized score. Render once, then loop on the audio thread. */(function installGameAudio(global) { 'use strict';
const BPM = 116; const MODES = new Set(['idle', 'setup', 'think', 'reveal', 'results']); // Eight original bars. Events are [swung eighth-note position, MIDI, length]. const MELODY = [ [[0,76,3],[3,79,1],[4,84,1],[5,83,1],[6,81,2]], [[0,85,1],[1,88,1],[2,85,2],[4,83,1],[5,81,1],[6,79,2]], [[0,77,3],[3,81,1],[4,84,2],[6,81,1],[7,77,1]], [[0,74,1],[1,79,1],[2,83,2],[4,81,1],[5,79,1],[6,77,2]], [[0,76,1],[1,80,1],[2,83,2],[4,86,1],[5,83,1],[6,80,2]], [[0,84,3],[3,88,1],[4,81,1],[5,79,1],[6,76,2]], [[0,78,1],[1,81,1],[2,84,2],[4,86,1],[5,84,1],[6,81,2]], [[0,83,2],[2,81,1],[3,77,1],[4,74,2],[6,79,2]], ]; const HARMONY = [ {root:36,fifth:43,keys:[60,64,67,69]}, {root:33,fifth:40,keys:[61,64,67,69]}, {root:38,fifth:45,keys:[60,62,65,69]}, {root:31,fifth:38,keys:[59,62,65,67]}, {root:40,fifth:47,keys:[59,62,64,68]}, {root:33,fifth:40,keys:[60,64,67,69]}, {root:38,fifth:45,keys:[60,62,66,69]}, {root:31,fifth:38,keys:[59,62,65,67]}, ]; const hz = midi => 440 * Math.pow(2, (midi - 69) / 12); const clamp = (value, low, high) => Math.max(low, Math.min(high, value)); let context = null, master = null, musicBus = null, fxBus = null; let score = null, rendering = null, loop = null, loopStarted = 0; let volume = 0.48, muted = false, mode = 'idle', initialized = false, error = ''; let duckUntil = 0, recovering = false; const effects = new Set();
function ramp(parameter, target, seconds = 0.035) { const now = context.currentTime; if (typeof parameter.cancelAndHoldAtTime === 'function') parameter.cancelAndHoldAtTime(now); else { const current = parameter.value; parameter.cancelScheduledValues(now); parameter.setValueAtTime(current, now); } parameter.linearRampToValueAtTime(target, now + seconds); }
function voice(ctx, bus, time, duration, peak, live = false) { const gain = ctx.createGain(); gain.gain.setValueAtTime(0, time); gain.gain.linearRampToValueAtTime(peak, time + 0.008); gain.gain.exponentialRampToValueAtTime(Math.max(0.0001, peak * 0.12), time + duration * 0.68); gain.gain.exponentialRampToValueAtTime(0.0001, time + duration); gain.gain.setValueAtTime(0, time + duration + 0.015); gain.connect(bus); const part = {ctx, gain, nodes:[gain], sources:[], pending:0, live}; if (live) effects.add(part); return part; }
function register(part, source) { part.sources.push(source); if (!part.live) return; part.pending++; source.onended = () => { part.pending--; if (part.pending) return; part.nodes.forEach(node => { try { node.disconnect(); } catch (_) {} }); effects.delete(part); }; }
function osc(part, type, frequency, time, duration, level = 1, detune = 0, destination = part.gain) { const source = part.ctx.createOscillator(), gain = part.ctx.createGain(); source.type = type; source.frequency.setValueAtTime(frequency, time); source.detune.setValueAtTime(detune, time); gain.gain.value = level; source.connect(gain); gain.connect(destination); part.nodes.push(source, gain); register(part, source); source.start(time); source.stop(time + duration + 0.03); return source; }
function piano(ctx, bus, midi, time, length, strength, live = false) { const duration = clamp(length, 0.14, 0.95), frequency = hz(midi); const part = voice(ctx, bus, time, duration, 0.12 * strength, live); osc(part, 'sine', frequency, time, duration, 0.47, -5); osc(part, 'triangle', frequency, time, duration, 0.33, 5); osc(part, 'sine', frequency * 2.005, time, duration * 0.5, 0.12); osc(part, 'sine', frequency * 3.01, time, duration * 0.27, 0.045); }
function tuba(ctx, bus, midi, time, length, strength, bend = false, live = false) { const duration = Math.max(0.14, length), frequency = hz(midi); const part = voice(ctx, bus, time, duration, 0.13 * strength, live); const filter = ctx.createBiquadFilter(); filter.type = 'lowpass'; filter.frequency.setValueAtTime(bend ? 1500 : 580, time); filter.frequency.exponentialRampToValueAtTime(bend ? 370 : 320, time + duration); filter.Q.value = 0.55; filter.connect(part.gain); part.nodes.push(filter); const reed = osc(part, 'sawtooth', frequency, time, duration, 0.3, 0, filter); const body = osc(part, 'triangle', frequency, time, duration, 0.72, -2, filter); if (bend) { reed.frequency.exponentialRampToValueAtTime(frequency * 0.89, time + duration * 0.92); body.frequency.exponentialRampToValueAtTime(frequency * 0.89, time + duration * 0.92); } }
function brush(ctx, bus, noise, time, offset, strength) { const part = voice(ctx, bus, time, 0.052, 0.055 * strength); const source = ctx.createBufferSource(), filter = ctx.createBiquadFilter(); source.buffer = noise; filter.type = 'highpass'; filter.frequency.value = 4800; source.connect(filter); filter.connect(part.gain); source.start(time, offset); source.stop(time + 0.06); }
function tick(ctx, bus, time) { const part = voice(ctx, bus, time, 0.032, 0.039 * 0.65); const tone = osc(part, 'sine', 950, time, 0.032, 0.65); tone.frequency.exponentialRampToValueAtTime(430, time + 0.03); osc(part, 'sine', 1610, time, 0.018, 0.15); }
function eighths(start, count) { let seconds = 0; for (let i = 0; i < count; i++) seconds += (60 / BPM) * ((start + i) % 2 ? 0.38 : 0.62); return seconds; }
async function renderScore() { const Offline = global.OfflineAudioContext || global.webkitOfflineAudioContext; if (!Offline) throw Error('This browser cannot prepare the soundtrack.'); const rate = 44100, beat = 60 / BPM; const ctx = new Offline(1, Math.ceil(32 * beat * rate), rate); const bus = ctx.createGain(); bus.connect(ctx.destination); const noise = ctx.createBuffer(1, rate, rate), noiseData = noise.getChannelData(0); let seed = 78123; for (let i = 0; i < noiseData.length; i++) { seed = (1664525 * seed + 1013904223) >>> 0; noiseData[i] = seed / 2147483648 - 1; } for (let bar = 0; bar < 8; bar++) { const chord = HARMONY[bar]; for (let eighth = 0; eighth < 8; eighth++) { const time = bar * 4 * beat + eighths(0, eighth); if (eighth === 0 || eighth === 4) tuba(ctx, bus, eighth === 0 ? chord.root : chord.fifth, time, beat * 0.58, 0.8); if (eighth === 2 || eighth === 6) { chord.keys.forEach((note, i) => piano(ctx, bus, note, time + i * 0.006, beat * 0.4, 0.28)); tick(ctx, bus, time); } const event = MELODY[bar].find(item => item[0] === eighth); if (event) piano(ctx, bus, event[1], time, eighths(eighth, event[2]) * 0.86, 0.68); if (eighth % 2) brush(ctx, bus, noise, time, ((bar * 8 + eighth) * 0.073) % 0.8, 0.6); } } const rendered = await ctx.startRendering(); const samples = rendered.getChannelData(0); let peak = 0, energy = 0; for (const sample of samples) { peak = Math.max(peak, Math.abs(sample)); energy += sample * sample; } const scale = Math.min(0.13 / Math.sqrt(energy / samples.length), 0.78 / peak); for (let i = 0; i < samples.length; i++) samples[i] *= scale; return rendered; }
function prepareScore() { if (score) return Promise.resolve(score); if (!rendering) rendering = renderScore().then(buffer => { score = buffer; return buffer; }).finally(() => { rendering = null; }); return rendering; }
function startLoop() { if (loop || !score || !initialized || mode === 'idle' || context.state !== 'running') return; const source = context.createBufferSource(); source.buffer = score; source.loop = true; source.connect(musicBus); source.onended = () => { source.disconnect(); if (loop === source) loop = null; }; musicBus.gain.cancelScheduledValues(context.currentTime); musicBus.gain.setValueAtTime(0, context.currentTime); musicBus.gain.linearRampToValueAtTime(1, context.currentTime + 0.04); duckUntil = 0; loopStarted = context.currentTime; loop = source; source.start(); }
function createContext() { const Audio = global.AudioContext || global.webkitAudioContext; if (!Audio) throw Error('Web Audio is unavailable in this browser.'); context = new Audio({latencyHint:'interactive'}); master = context.createGain(); musicBus = context.createGain(); fxBus = context.createGain(); const limiter = context.createDynamicsCompressor(); limiter.threshold.value = -9; limiter.knee.value = 10; limiter.ratio.value = 12; limiter.attack.value = 0.003; limiter.release.value = 0.18; master.gain.value = muted ? 0 : volume; fxBus.gain.value = 1.7; musicBus.connect(master); fxBus.connect(master); master.connect(limiter); limiter.connect(context.destination); context.onstatechange = () => { if (context.state === 'running') { error = ''; startLoop(); } // Mobile interruptions can end without another visibility event. else if (['interrupted','suspended'].includes(context.state) && initialized && mode !== 'idle') recover(); }; }
async function waitForResume(promise) { let timeout; try { await Promise.race([promise, new Promise((_, reject) => { timeout = global.setTimeout(() => reject(Error('Click Sound on to resume the music.')), 1800); })]); } finally { global.clearTimeout(timeout); } }
async function init() { try { if (!context || context.state === 'closed') { loop = null; initialized = false; createContext(); } // Call resume before awaiting rendering so the user gesture unlocks Safari. const resumed = context.resume(); const unlock = context.createBufferSource(); unlock.buffer = context.createBuffer(1, 1, context.sampleRate); unlock.connect(context.destination); unlock.onended = () => unlock.disconnect(); unlock.start(); await Promise.all([waitForResume(resumed), prepareScore()]); if (context.state !== 'running') throw Error('Click Sound on to resume the music.'); initialized = true; error = ''; startLoop(); } catch (failure) { error = failure && failure.message ? failure.message : String(failure); } return status(); }
async function recover() { if (recovering || !initialized || mode === 'idle' || !context || context.state === 'closed' || global.document.hidden) return; recovering = true; try { await waitForResume(context.resume()); if (context.state === 'running') { error = ''; startLoop(); } } catch (failure) { error = failure.message || String(failure); } finally { recovering = false; } }
function setMode(nextMode) { if (!MODES.has(nextMode)) throw TypeError('Unknown audio mode: ' + nextMode); if (nextMode === 'idle') return stop(); // Game phases share one uninterrupted score, including pauses and results. mode = nextMode; startLoop(); return status(); }
function setVolume(value) { if (!Number.isFinite(Number(value))) throw TypeError('Volume must be a number.'); volume = clamp(Number(value), 0, 1); if (master) ramp(master.gain, muted ? 0 : volume); return status(); }
function mute(value = true) { muted = Boolean(value); if (master) ramp(master.gain, muted ? 0 : volume); return status(); }
function duckFor(seconds) { const now = context.currentTime; duckUntil = Math.max(duckUntil, now + seconds); ramp(musicBus.gain, 0.45); musicBus.gain.setValueAtTime(0.45, duckUntil); musicBus.gain.linearRampToValueAtTime(1, duckUntil + 0.25); }
function sting(kind) { if (!['fail','correct','wrong'].includes(kind)) throw TypeError('Unknown sting: ' + kind); if (!initialized || !context || context.state !== 'running') return false; const time = context.currentTime + 0.025; if (kind === 'fail') { duckFor(1.75); [62,58,55,43].forEach((note, i) => tuba(context, fxBus, note, time + i * 0.28, i === 3 ? 0.88 : 0.3, i === 3 ? 0.95 : 0.76, true, true)); } else if (kind === 'correct') { duckFor(0.65); [76,79,84,88].forEach((note, i) => piano(context, fxBus, note, time + i * 0.085, 0.35, 0.72, true)); } else { duckFor(0.55); tuba(context, fxBus, 55, time, 0.19, 0.68, true, true); tuba(context, fxBus, 50, time + 0.2, 0.32, 0.75, true, true); } return true; }
function stop() { mode = 'idle'; if (!context) return status(); const source = loop; loop = null; ramp(musicBus.gain, 0, 0.025); if (source) { try { source.stop(context.currentTime + 0.03); } catch (_) {} } for (const part of effects) { ramp(part.gain.gain, 0, 0.025); part.sources.forEach(source => { try { source.stop(context.currentTime + 0.03); } catch (_) {} }); } return status(); }
function status() { const playing = Boolean(initialized && context && context.state === 'running' && mode !== 'idle' && loop); return { supported:Boolean(global.AudioContext || global.webkitAudioContext), initialized, state:context ? context.state : 'uninitialized', mode, volume, muted, playing, audible:playing && !muted && volume > 0, bpm:BPM, error, loopDuration:score ? score.duration : 0, loopPosition:playing ? (context.currentTime - loopStarted) % score.duration : 0, }; }
global.document.addEventListener('visibilitychange', () => { if (!global.document.hidden) recover(); }); global.GameAudio = Object.freeze({init, setMode, setVolume, mute, sting, stop, status});})(window);</script><script>(function (global) { 'use strict'; const clips = new Map();
function decode(data) { const raw = atob(data), bytes = new Uint8Array(raw.length); for (let i = 0; i < raw.length; i++) bytes[i] = raw.charCodeAt(i); return URL.createObjectURL(new Blob([bytes], {type: 'video/mp4'})); }
// Classic scripts retain the host's normal authentication inside its sandbox. // Each immutable payload is downloaded completely before a local video is made. global.__hwmClipReady = (key, data) => { const entry = clips.get(key); if (!entry || entry.done) return; try { entry.url = decode(data); entry.finish(); entry.resolve(entry.url); } catch (_) { entry.fail(new Error('This clip could not load.')); } };
function load(segment) { const key = typeof segment === 'string' ? segment : segment.key; if (clips.has(key)) return clips.get(key).promise; if (typeof segment === 'string') { const url = decode(segment); const entry = {url, promise: Promise.resolve(url)}; clips.set(key, entry); return entry.promise; } const entry = {}; entry.promise = new Promise((resolve, reject) => { let script, timer, attempt = 0; entry.resolve = resolve; entry.finish = () => { entry.done = true; clearTimeout(timer); if (script) script.remove(); }; entry.fail = error => { if (entry.done) return; entry.finish(); clips.delete(key); reject(error); }; const request = () => { script = document.createElement('script'); script.async = true; script.src = segment.bundle; script.onload = () => { if (!entry.url) entry.fail(new Error('This clip could not load.')); }; script.onerror = () => { if (entry.done) return; script.remove(); if (attempt++ === 0) request(); else entry.fail(new Error('This clip could not load. Check your connection.')); }; document.head.append(script); }; entry.start = () => { timer = setTimeout(() => entry.fail(new Error('This clip is taking too long to load.')), 90000); request(); }; }); clips.set(key, entry); entry.start(); return entry.promise; } global.ClipStore = Object.freeze({ load, warm(segment) { try { load(segment).catch(() => {}); } catch (_) {} } });})(window);</script><script>'use strict';const ROUNDS=JSON.parse(document.getElementById('round-data').textContent);const $=id=>document.getElementById(id),letters=['A','B','C','D'];let teams=[],roundIndex=0,phase='welcome',guesses=[],awards=[],scored=false,replaying=false,muted=false,countdownTimer=null,seconds=30,currentURL=null,loadToken=0,cancelLoad=null,activePart='setup',activeRate=1,clipFailed=false,clipLoading=false;const video=$('video');video.muted=true;const safeStore={get(k){try{return localStorage.getItem(k)}catch{return null}},set(k,v){try{localStorage.setItem(k,v)}catch{}}};function show(id,visible){$(id).hidden=!visible}function text(id,value){$(id).textContent=value}function el(tag,cls,content){const n=document.createElement(tag);if(cls)n.className=cls;if(content!==undefined)n.textContent=content;return n}function inputTeam(name){const box=el('div','team-input-row');const input=el('input');input.value=name;input.maxLength=24;input.placeholder='Team name';input.setAttribute('aria-label','Team name');const btn=el('button','quiet danger','×');btn.type='button';btn.setAttribute('aria-label','Remove team');btn.onclick=()=>{if($('team-inputs').children.length>1)box.remove();syncTeamInputs()};box.append(input,btn);$('team-inputs').append(box);syncTeamInputs()}function syncTeamInputs(){const rows=[...$('team-inputs').children];rows.forEach((r,i)=>{r.querySelector('input').id='team-'+i;r.querySelector('button').disabled=rows.length===1});$('add-team').disabled=rows.length>=6}['Team 1','Team 2','Team 3'].forEach(inputTeam);$('add-team').onclick=()=>{if($('team-inputs').children.length<6)inputTeam('Team '+($('team-inputs').children.length+1))};$('welcome-rules').textContent=ROUNDS.length+' rounds · 2 points per correct guess';$('hero-image').src=ROUNDS[0].poster;function initCredits(){ROUNDS.forEach((r,i)=>{const li=el('li');const a=el('a',null,r.sourceTitle);a.href=r.sourceUrl;a.target='_blank';a.rel='noopener';li.append(el('strong',null,(i+1)+'. '+r.title+' '),a,document.createTextNode('. '+r.classification+' Excerpt '+r.start+'–'+r.end+'s.'));$('credit-list').append(li)})}initCredits();function setPhase(p){phase=p;show('watching',p==='setup'||p==='loading');show('predict',p==='predict');show('revealing',p==='reveal');show('round-result',p==='result');show('play-pause',p==='setup'||p==='reveal');show('replay-setup',p==='predict');show('replay-fail',p==='result');show('slowmo',p==='result');show('punchline',p==='result');if(p!=='predict')clearInterval(countdownTimer);}function scores(){const box=$('scores');box.replaceChildren();teams.forEach(t=>{const item=el('div','score-item');item.append(el('span',null,t.name),el('b',null,String(t.score)));box.append(item)})}function makeChoices(){const r=ROUNDS[roundIndex];$('options').replaceChildren();r.options.forEach((s,i)=>{const item=el('div','option');item.append(el('b',null,letters[i]),el('span',null,s));$('options').append(item)});renderPicks()}function renderPicks(){const box=$('team-picks');box.replaceChildren();teams.forEach((t,i)=>{const row=el('div','team-pick');row.append(el('span','team-pick-name',t.name));const group=el('div','pick-buttons');group.setAttribute('role','group');group.setAttribute('aria-label',t.name+' prediction');letters.forEach((a,j)=>{const b=el('button',null,a);b.setAttribute('aria-label',t.name+': answer '+a);b.setAttribute('aria-pressed',String(guesses[i]===j));b.onclick=()=>{if(phase!=='predict')return;guesses[i]=j;renderPicks()};group.append(b)});row.append(group);box.append(row)});$('lock').disabled=guesses.some(x=>x===null)}function beginPrediction(){setPhase('predict');text('media-badge','PREDICT THE FAILURE');text('media-status','Choose your answers');seconds=30;text('timer',seconds);$('timer').classList.remove('expired');const deadline=performance.now()+30000;clearInterval(countdownTimer);countdownTimer=setInterval(()=>{seconds=Math.max(0,Math.ceil((deadline-performance.now())/1000));text('timer',String(seconds).padStart(2,'0'));if(seconds===0){clearInterval(countdownTimer);$('timer').classList.add('expired');text('media-status','Time to reveal')}},100);renderPicks();const index=roundIndex;ClipStore.load(ROUNDS[index].reveal).then(()=>{if(roundIndex===index&&ROUNDS[index+1])ClipStore.warm(ROUNDS[index+1].setup)}).catch(()=>{})}function loadingClip(value){clipLoading=value;show('clip-loading',value);$('play-pause').disabled=value;if(value)text('media-status','Loading clip')}function stopClip(clear=true){loadToken++;if(cancelLoad)cancelLoad();video.pause();loadingClip(false);if(clear){video.removeAttribute('src');video.load();currentURL=null}}async function loadClip(part,rate=1){ stopClip(false);activePart=part;activeRate=rate;clipFailed=false;const token=loadToken; loadingClip(true);show('media-error',false); let cancel; const cancelled=new Promise(resolve=>{cancel=()=>resolve(null);cancelLoad=cancel}); const url=await Promise.race([ClipStore.load(ROUNDS[roundIndex][part]),cancelled]); if(token!==loadToken||!url)return false; if(cancelLoad===cancel)cancelLoad=null; const loaded=new Promise((resolve,reject)=>{ let timeout; const clean=()=>{clearTimeout(timeout);for(const event of ['loadeddata','canplay','seeked'])video.removeEventListener(event,ok);video.removeEventListener('error',bad);if(cancelLoad===cancelReady)cancelLoad=null}; const ok=()=>{if(video.readyState<2)return;clean();resolve(true)}; const bad=()=>{clean();reject(Error('The clip could not play.'))}; const cancelReady=()=>{clean();resolve(false)}; cancelLoad=cancelReady;timeout=setTimeout(()=>{clean();reject(Error('The clip could not play.'))},15000); for(const event of ['loadeddata','canplay','seeked'])video.addEventListener(event,ok);video.addEventListener('error',bad,{once:true}); if(currentURL!==url){currentURL=url;video.src=url;video.muted=true;video.load()} else{video.currentTime=0;ok()} }); if(!await loaded||token!==loadToken)return false; video.playbackRate=rate;loadingClip(false);return true;}function mediaError(error){clipFailed=true;loadingClip(false);video.pause();text('media-error',error.message+' Try again or skip this round.');show('media-error',true);text('media-status','Playback paused');text('play-pause','Try playback');show('play-pause',true)}async function playSegment(part,rate=1){const pending=loadClip(part,rate),token=loadToken;try{if(!await pending||token!==loadToken)return;await video.play();if(token!==loadToken)return;text('play-pause','Pause clip');if(part==='setup')ClipStore.warm(ROUNDS[roundIndex].reveal)}catch(e){if(token===loadToken)mediaError(e)}}
async function startRound(){const r=ROUNDS[roundIndex];video.poster=r.poster;$('stage').classList.toggle('creator-mark-left',['motion-copy','aidol-debut'].includes(r.id));guesses=teams.map(()=>null);awards=[];scored=false;replaying=false;text('round-label','ROUND '+(roundIndex+1)+' OF '+ROUNDS.length);text('round-title',r.title);text('task',r.task);text('source-line',r.shortCredit);text('question',r.question);text('media-badge','THE SETUP');text('media-status','Watch closely');makeChoices();scores();setPhase('setup');await playSegment('setup',r.setupRate||1)}async function start(){show('start-error',false);const names=[...$('team-inputs').querySelectorAll('input')].map(x=>x.value.trim());if(names.some(n=>!n)){text('start-error','Give each team a name.');show('start-error',true);return}teams=names.map(name=>({name,score:0}));$('start').disabled=true;try{const audioState=await GameAudio.init();GameAudio.mute(muted);GameAudio.setVolume(Number($('volume').value)/100);GameAudio.setMode('setup');soundLabel();if(audioState.error||audioState.state!=='running')throw Error(audioState.error||'Audio paused');show('sound-warning',false)}catch(e){text('sound-warning','Music is paused. Click Play music to resume.');show('sound-warning',true)}roundIndex=0;show('welcome',false);show('results',false);show('game',true);text('foot-copy','SPACE: PAUSE M: MUSIC F: FULL SCREEN');$('start').disabled=false;await startRound()}$('start').onclick=start;$('lock').onclick=async()=>{if(phase!=='predict'||guesses.some(x=>x===null))return;setPhase('reveal');text('media-badge','REVEAL');text('media-status','Predictions locked');await playSegment('reveal',ROUNDS[roundIndex].revealRate||1)};function revealResult(){const r=ROUNDS[roundIndex];if(!scored){awards=teams.map((t,i)=>{const pts=guesses[i]===r.answerIndex?2:0;t.score+=pts;return pts});scored=true}setPhase('result');text('answer-letter',letters[r.answerIndex]);text('answer-text',r.answer);$('punchline').replaceChildren(el('span',null,r.punchline));$('round-points').replaceChildren();teams.forEach((t,i)=>{const row=el('div','points-row');row.append(el('span',null,t.name),el('b',awards[i]?'':'zero',awards[i]?'+'+awards[i]+' points':'0 points'));$('round-points').append(row)});text('next',roundIndex===ROUNDS.length-1?'See scores':'Next clip');text('media-badge','');text('media-status','Round complete');scores();GameAudio.sting('fail');$('stage').classList.remove('wobble');void $('stage').offsetWidth;$('stage').classList.add('wobble');}video.addEventListener('ended',()=>{if(clipLoading||!video.ended)return;if(phase==='setup')beginPrediction();else if(phase==='reveal'){revealResult();replaying=false}});$('play-pause').onclick=async()=>{if(clipLoading)return;const token=loadToken;try{if(clipFailed){await playSegment(activePart,activeRate);return}if(video.paused){await video.play();if(token!==loadToken)return;text('play-pause','Pause clip')}else{video.pause();text('play-pause','Continue clip')}}catch(e){if(token===loadToken)mediaError(e)}};video.addEventListener('error',()=>{if(!clipLoading&&['setup','reveal'].includes(phase))mediaError(Error('The clip could not play.'))});$('replay-setup').onclick=async()=>{setPhase('setup');text('media-badge','THE SETUP');await playSegment('setup',ROUNDS[roundIndex].setupRate||1)};async function replayFailure(slow){replaying=true;setPhase('reveal');text('media-badge',slow?'SLOW-MO':'REPLAY');text('media-status',slow?'Half speed':'Playing again');await playSegment('reveal',(ROUNDS[roundIndex].revealRate||1)*(slow?0.5:1))}$('replay-fail').onclick=()=>replayFailure(false);$('slowmo').onclick=()=>replayFailure(true);async function advanceRound(){if(!['setup','loading','predict','reveal','result'].includes(phase))return;setPhase('transition');stopClip();show('media-error',false);if(roundIndex<ROUNDS.length-1){roundIndex++;await startRound()}else finish()}$('skip').onclick=advanceRound;$('next').onclick=()=>{if(phase==='result')advanceRound()};function finish(){clearInterval(countdownTimer);phase='finished';stopClip();show('game',false);show('results',true);const rank=[...teams].sort((a,b)=>b.score-a.score),top=rank[0].score,winners=rank.filter(t=>t.score===top).map(t=>t.name);text('winner-title',winners.length===1?winners[0]+' wins!':'It’s a tie!');text('winner-copy',winners.length===1?top+' points':winners.join(' & ')+' · '+top+' points each');$('leaderboard').replaceChildren();rank.forEach((t,i)=>{const row=el('div','leader-row');row.append(el('span',null,(i+1)+'. '+t.name),el('strong',null,t.score+' pts'));$('leaderboard').append(row)});text('foot-copy','')}$('restart').onclick=()=>{phase='welcome';show('results',false);show('game',false);show('welcome',true);text('foot-copy','')};function soundLabel(){const playing=!muted&&GameAudio.status().playing;$('sound').setAttribute('aria-pressed',String(playing));text('sound',muted?'♫ Sound off':playing?'♫ Sound on':'♫ Play music')}async function toggleSound(){muted=!muted&&GameAudio.status().playing;GameAudio.mute(muted);soundLabel();safeStore.set('hwm-muted',String(muted));show('sound-warning',false);if(!muted){const a=await GameAudio.init();if(muted)return;GameAudio.setMode('setup');soundLabel();show('sound-warning',!!a.error||a.state!=='running');text('sound-warning',a.error||'Music is paused. Click Play music to resume.')}}$('sound').onclick=toggleSound;$('volume').oninput=()=>{GameAudio.setVolume(Number($('volume').value)/100);safeStore.set('hwm-volume',$('volume').value)};muted=safeStore.get('hwm-muted')==='true';GameAudio.mute(muted);soundLabel();const savedVol=safeStore.get('hwm-volume');if(savedVol!==null){$('volume').value=String(Math.min(100,Math.max(0,Number(savedVol)||0)));GameAudio.setVolume(Number($('volume').value)/100)}async function fullscreen(){try{if(document.fullscreenElement)await document.exitFullscreen();else await document.documentElement.requestFullscreen()}catch{}}$('fullscreen').onclick=fullscreen;$('rules-open').onclick=()=>$('rules').showModal();$('credits-open').onclick=()=>$('credits').showModal();$('credits-end').onclick=()=>$('credits').showModal();document.querySelectorAll('[data-close]').forEach(b=>b.onclick=()=>$(b.dataset.close).close());document.addEventListener('keydown',e=>{if(/INPUT|TEXTAREA|SELECT|BUTTON/.test(e.target.tagName)||document.querySelector('dialog[open]'))return;if(e.code==='Space'&&(phase==='setup'||phase==='reveal')){e.preventDefault();$('play-pause').click()}if(e.key.toLowerCase()==='m')toggleSound();if(e.key.toLowerCase()==='f')fullscreen()});let resumeMusicOnPageShow=false;window.addEventListener('pagehide',()=>{resumeMusicOnPageShow=GameAudio.status().mode!=='idle';GameAudio.stop()});window.addEventListener('pageshow',()=>{if(resumeMusicOnPageShow){GameAudio.setMode('setup');GameAudio.init().then(soundLabel);resumeMusicOnPageShow=false}});window.HWM={state:()=>({phase,roundIndex,teams:teams.map(t=>({...t})),guesses:[...guesses],scored,video:{time:video.currentTime,duration:video.duration,paused:video.paused,ready:video.readyState,loading:clipLoading},audio:GameAudio.status()}),roundCount:ROUNDS.length};</script></body></html>123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566(function (global) { 'use strict'; const clips = new Map();
function decode(data) { const raw = atob(data), bytes = new Uint8Array(raw.length); for (let i = 0; i < raw.length; i++) bytes[i] = raw.charCodeAt(i); return URL.createObjectURL(new Blob([bytes], {type: 'video/mp4'})); }
// Classic scripts retain the host's normal authentication inside its sandbox. // Each immutable payload is downloaded completely before a local video is made. global.__hwmClipReady = (key, data) => { const entry = clips.get(key); if (!entry || entry.done) return; try { entry.url = decode(data); entry.finish(); entry.resolve(entry.url); } catch (_) { entry.fail(new Error('This clip could not load.')); } };
function load(segment) { const key = typeof segment === 'string' ? segment : segment.key; if (clips.has(key)) return clips.get(key).promise; if (typeof segment === 'string') { const url = decode(segment); const entry = {url, promise: Promise.resolve(url)}; clips.set(key, entry); return entry.promise; } const entry = {}; entry.promise = new Promise((resolve, reject) => { let script, timer, attempt = 0; entry.resolve = resolve; entry.finish = () => { entry.done = true; clearTimeout(timer); if (script) script.remove(); }; entry.fail = error => { if (entry.done) return; entry.finish(); clips.delete(key); reject(error); }; const request = () => { script = document.createElement('script'); script.async = true; script.src = segment.bundle; script.onload = () => { if (!entry.url) entry.fail(new Error('This clip could not load.')); }; script.onerror = () => { if (entry.done) return; script.remove(); if (attempt++ === 0) request(); else entry.fail(new Error('This clip could not load. Check your connection.')); }; document.head.append(script); }; entry.start = () => { timer = setTimeout(() => entry.fail(new Error('This clip is taking too long to load.')), 90000); request(); }; }); clips.set(key, entry); entry.start(); return entry.promise; } global.ClipStore = Object.freeze({ load, warm(segment) { try { load(segment).catch(() => {}); } catch (_) {} } });})(window);12345678910111213141516171819<!doctype html><html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width" /><title>My static Space</title><link rel="stylesheet" href="style.css" /></head><body><div class="card"><h1>Welcome to your static Space!</h1><p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p><p>Also don't forget to check the<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.</p></div></body></html>123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="color-scheme" content="dark"><title>Live rooms | Oops, All Failures</title><link rel="stylesheet" href="/rooms.css"><script src="/clip-store.js" defer></script><script src="/vendor/itty-sockets.js" defer></script><script src="/peer-rooms.js" defer></script><script src="/rooms.js" defer></script></head><body><header class="site-head"><a class="wordmark" href="/rooms.html">Oops<span>.</span> All failures<span>.</span></a><a href="/classic.html">Play on one screen</a></header><main><p id="connection" class="notice" role="status" hidden></p><p id="error" class="notice error" role="alert" hidden></p><section id="landing" class="entry" hidden aria-labelledby="landing-title"><div><h1 id="landing-title">Oops.<br><em>All failures.</em></h1><p class="intro">Watch the robot. Guess what goes wrong next. Each player votes on their own device.</p><div class="entry-actions"><button type="button" id="create-room" class="primary">Host a room</button><form id="find-form"><label for="room-code">Have a room code?</label><div class="input-row"><input id="room-code" name="room" type="text" maxlength="16" required autocapitalize="characters" autocomplete="off" spellcheck="false" placeholder="Room code"><button id="find-room" type="submit">Join room</button></div></form></div></div><figure id="hero" class="hero" hidden><img id="hero-image" alt="A robot approaching the dishes"><figcaption>“It worked in sim”</figcaption></figure></section><section id="join" class="narrow" hidden aria-labelledby="join-title"><p class="eyebrow">Room <span id="join-code"></span></p><h1 id="join-title">Join the <em>game.</em></h1><form id="join-form"><label for="player-name">Your name on the scoreboard</label><div class="input-row"><input id="player-name" name="name" maxlength="40" required autocomplete="nickname" placeholder="Your name"><button type="submit" id="join-room" class="primary">Join room</button></div></form><a class="under-link" href="/rooms.html">Use a different room</a></section><section id="room" hidden aria-labelledby="round-title"><div class="room-heading"><div><p class="eyebrow" id="round-label"></p><h1 id="round-title"></h1></div><div class="room-meta"><span id="identity"></span><span class="code">Room <b id="room-pin"></b></span></div></div><section id="invite" class="invite" hidden aria-label="Invite players"><div><label for="invite-url">Player invite link</label><div class="input-row"><input id="invite-url" readonly><button id="copy-invite" type="button">Copy link</button></div><p id="copy-status" role="status"></p><p id="host-online" class="description" hidden>Keep this host tab open while players vote. Reopen the host link in this browser to resume.</p></div><a id="player-tab" target="_blank" rel="noopener">Join as a player ↗</a></section><div class="game-grid"><div id="media" hidden><div class="stage"><video id="clip" controls playsinline muted preload="auto" aria-label="Round clip"></video></div><div id="media-notice" role="status" hidden><span id="media-status"></span> <button type="button" id="retry-media" hidden>Retry clip</button></div><p id="task" class="intro"></p><p class="credit"><a id="source" target="_blank" rel="noopener noreferrer"></a> <span id="source-credit"></span></p></div><div class="play-panel"><h2 id="phase-title" aria-live="polite"></h2><p id="phase-copy" class="description"></p><p id="question"></p><div id="choices" role="group" aria-label="Prediction choices"></div><p id="vote-status" role="status" hidden></p><div id="result" hidden><p class="eyebrow">Correct answer</p><p id="correct-answer"></p></div><p id="vote-count" class="tally" hidden></p><button id="advance" class="primary advance" type="button" hidden></button><a id="new-game" class="under-link" href="/rooms.html" hidden>Back to live rooms</a></div></div><section class="scoreboard" aria-labelledby="score-title"><h2 id="score-title">Scoreboard</h2><p id="no-players" class="description">Waiting for the first player.</p><ol id="scores"></ol></section></section></main></body></html>
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445/* Static rooms use a WebSocket relay. Players encrypt game requests for the host key identified by the invite code. The relay sees no credentials or ballots. */(() => { 'use strict'; const alphabet = '23456789ABCDEFGHJKLMNPQRSTUVWXYZ'; const route = /^\/api\/rooms\/([2-9A-HJ-NP-Z]{16})(?:\/(players|advance|vote))?$/; const hosts = new Map(); const guests = new Map(); const encoder = new TextEncoder(); const decoder = new TextDecoder(); const timeout = 15000; const namespace = 'oops-all-failures-live-v1-'; const storageKey = code => namespace + code; const mint = count => crypto.getRandomValues(new Uint8Array(count)); const hex = bytes => Array.from(bytes, byte => byte.toString(16).padStart(2, '0')).join('');
function problem(status, message) { return Object.assign(new Error(message), {status}); } const offline = () => problem(503, 'The host is unreachable. Keep the host tab open and check both devices’ connections.'); const brokerError = () => problem(503, 'The room could not connect to the live game relay. Check your connection and retry.'); const asBase64 = value => { const bytes = new Uint8Array(value); let binary = ''; for (let i = 0; i < bytes.length; i += 8192) binary += String.fromCharCode(...bytes.subarray(i, i + 8192)); return btoa(binary); }; const fromBase64 = value => Uint8Array.from(atob(value), character => character.charCodeAt(0));
let roundLoad; function loadRounds() { if (!roundLoad) { roundLoad = fetch('/rounds.json', {signal: AbortSignal.timeout(timeout)}).then(async response => { if (!response.ok) throw Error('Round list unavailable'); const rounds = await response.json(); if (!Array.isArray(rounds) || !rounds.length) throw Error('Empty round list'); return rounds; }).catch(() => { roundLoad = null; throw problem(503, 'The round list could not load. Check your connection.'); }); } return roundLoad; }
function readRoom(code) { let saved; try { saved = localStorage.getItem(storageKey(code)); } catch { return null; } return saved ? JSON.parse(saved) : null; }
function persist(room) { try { localStorage.setItem(storageKey(room.code), JSON.stringify(room)); } catch { throw problem(507, 'Host browser storage is unavailable or full. Free up space and retry.'); } const host = hosts.get(room.code); if (host?.socket && !host.changedTimer) { // Coalesce bursts of voting. The public notice contains no ballot or state. host.changedTimer = setTimeout(() => { host.changedTimer = null; if (host.online) host.socket.send({type: 'changed'}); }, 350); } }
async function roomCode(rawPublicKey) { const digest = new Uint8Array(await crypto.subtle.digest('SHA-256', rawPublicKey)); let result = '', bits = 0, buffer = 0; for (const byte of digest.subarray(0, 10)) { buffer = (buffer << 8) | byte; bits += 8; while (bits >= 5) { bits -= 5; result += alphabet[(buffer >>> bits) & 31]; } } return result; }
const algorithm = {name: 'ECDH', namedCurve: 'P-256'}; const newPair = () => crypto.subtle.generateKey(algorithm, true, ['deriveKey']);
async function sharedKey(privateKey, rawPublicKey) { const publicKey = await crypto.subtle.importKey('raw', rawPublicKey, algorithm, false, []); return crypto.subtle.deriveKey({name: 'ECDH', public: publicKey}, privateKey, {name: 'AES-GCM', length: 256}, false, ['encrypt', 'decrypt']); }
async function seal(key, context, direction, message) { const iv = mint(12); const encrypted = await crypto.subtle.encrypt({ name: 'AES-GCM', iv, additionalData: encoder.encode(context + direction) }, key, encoder.encode(JSON.stringify(message))); return {type: 'box', iv: asBase64(iv), data: asBase64(encrypted)}; }
async function unseal(key, context, direction, packet, maximum) { if (packet?.type !== 'box' || typeof packet.iv !== 'string' || packet.iv.length !== 16 || typeof packet.data !== 'string' || packet.data.length > maximum) throw Error('Invalid packet'); const plain = await crypto.subtle.decrypt({ name: 'AES-GCM', iv: fromBase64(packet.iv), additionalData: encoder.encode(context + direction) }, key, fromBase64(packet.data)); return JSON.parse(decoder.decode(plain)); }
function fields(body, ...names) { if (!body || typeof body !== 'object' || Array.isArray(body) || Object.keys(body).length !== names.length || names.some(name => !Object.hasOwn(body, name))) { throw problem(400, 'Unexpected or missing request fields.'); } }
function snapshot(room, player = null) { const members = [...room.players].sort((a, b) => b.score - a.score); return { code: room.code, phase: room.phase, roundIndex: room.roundIndex, players: members.map(({name, score}) => ({name, score})), votesCast: members.filter(member => member.vote !== null).length, playerCount: members.length, myVote: player?.vote ?? null, myName: player?.name ?? null }; }
const tokenHash = async token => hex(new Uint8Array(await crypto.subtle.digest('SHA-256', encoder.encode(token))));
async function playerRequest(code, operation, token, body) { if (operation === 'join') { fields(body, 'name', 'joinKey'); const name = typeof body.name === 'string' ? body.name.trim().normalize('NFC') : ''; if (!name || [...name].length > 40 || /[\p{C}\p{Zl}\p{Zp}]/u.test(name)) { throw problem(400, 'Enter a display name of 1 to 40 printable characters.'); } if (typeof body.joinKey !== 'string' || !/^[0-9a-f]{32,128}$/i.test(body.joinKey)) throw problem(400, 'Invalid join key.'); const secret = fromBase64(readRoom(code).joinSecret); const hmac = await crypto.subtle.importKey('raw', secret, {name: 'HMAC', hash: 'SHA-256'}, false, ['sign']); const token = hex(new Uint8Array(await crypto.subtle.sign('HMAC', hmac, encoder.encode(body.joinKey.toLowerCase())))); const hash = await tokenHash(token); // Read the latest state after crypto. Every read-modify-save below is synchronous. const room = readRoom(code); const existing = room.players.find(member => member.hash === hash); if (existing) { if (existing.name !== name) throw problem(409, 'This player has already joined under another name.'); return {playerToken: token}; } if (room.phase === 'finished') throw problem(409, 'This game has finished.'); if (room.players.some(member => member.name.toUpperCase() === name.toUpperCase())) { throw problem(409, 'That display name is taken. Choose another.'); } if (room.players.length >= 256) throw problem(429, 'This room has reached its 256-player capacity.'); room.players.push({name, hash, score: 0, vote: null}); persist(room); return {playerToken: token}; } if (operation !== 'state' && operation !== 'vote') throw problem(403, 'Only the host can advance the round.'); if (typeof token !== 'string' || !/^[0-9a-f]{64}$/.test(token)) throw problem(401, 'Join this room to continue.'); const hash = await tokenHash(token); const rounds = await loadRounds(); const room = readRoom(code); const member = room.players.find(player => player.hash === hash); if (!member) throw problem(401, 'Join this room to continue.'); if (operation === 'vote') { fields(body, 'roundIndex', 'choice'); if (room.phase !== 'voting' || body.roundIndex !== room.roundIndex) throw problem(409, 'Voting has closed or the round has changed.'); if (!Number.isInteger(body.choice) || body.choice < 0 || body.choice >= rounds[room.roundIndex].options.length) { throw problem(400, 'Choose one of the answers for this round.'); } member.vote = body.choice; persist(room); } return snapshot(room, member); }
function advance(room, body, rounds) { fields(body, 'roundIndex', 'phase'); if (room.phase !== body.phase || room.roundIndex !== body.roundIndex) throw problem(409, 'The room has moved on. Refresh to see the current round.'); if (room.phase === 'finished') throw problem(409, 'This game has finished.'); switch (room.phase) { case 'lobby': room.phase = 'setup'; break; case 'setup': room.phase = 'voting'; break; case 'voting': for (const player of room.players) if (player.vote === rounds[room.roundIndex].answerIndex) player.score += 2; room.phase = 'result'; break; case 'result': if (room.roundIndex + 1 === rounds.length) { room.phase = 'finished'; } else { room.roundIndex++; room.phase = 'setup'; for (const player of room.players) player.vote = null; } break; } persist(room); return snapshot(room); }
function connect(code, announce = false) { if (!window.OopsSocket?.connect) throw brokerError(); return window.OopsSocket.connect(namespace + code, announce ? {announce: true} : {}); }
function handleGuest(host, uid, packet) { if (!uid || typeof uid !== 'string' || !packet || typeof packet !== 'object') return; let session = host.guests.get(uid); if (!session) { if (packet.type !== 'hello' || host.guests.size >= 512) return; session = {chain: Promise.resolve(), rateCount: 0, rateWindow: Date.now(), queued: 0, lastSeq: 0}; host.guests.set(uid, session); } function expire() { clearTimeout(session.idle); if (host.guests.get(uid) === session) host.guests.delete(uid); } const now = Date.now(); if (now - session.rateWindow > 10000) { session.rateCount = 0; session.rateWindow = now; } if (++session.rateCount > 70 || ++session.queued > 12) { expire(); return; } clearTimeout(session.idle); session.idle = setTimeout(expire, 75000); session.chain = session.chain.then(async () => { if (host.guests.get(uid) !== session) return; if (packet.type === 'hello') { if (typeof packet.publicKey !== 'string' || packet.publicKey.length !== 88 || typeof packet.challenge !== 'string' || !/^[0-9a-f]{48}$/.test(packet.challenge)) throw Error('Invalid hello'); if (session.challenge !== packet.challenge) { session.key = await sharedKey(await host.privateKey, fromBase64(packet.publicKey)); session.context = hex(mint(24)); session.challenge = packet.challenge; session.lastSeq = 0; const proof = await seal(session.key, session.context, 'handshake', {challenge: packet.challenge}); session.welcome = {type: 'welcome', publicKey: host.publicKey, context: session.context, proof}; } if (host.online) host.socket.send(session.welcome, uid); return; } if (!session.key || packet.type !== 'box') return; const message = await unseal(session.key, session.context, 'player', packet, 6000); if (host.guests.get(uid) !== session || !Number.isSafeInteger(message.seq) || message.seq !== session.lastSeq + 1) throw Error('Invalid sequence'); session.lastSeq = message.seq; let reply; try { const data = await playerRequest(host.code, message.operation, message.token, message.body); reply = {seq: message.seq, data}; } catch (error) { reply = {seq: message.seq, error: error.status ? error.message : 'The host could not complete this request.', status: error.status || 503}; } const envelope = await seal(session.key, session.context, 'host', reply); if (host.online && host.guests.get(uid) === session) host.socket.send(envelope, uid); }).catch(expire).finally(() => session.queued--); }
function hostTabLease(code) { // Only one tab may own the local game and serve its authoritative responses. if (!window.navigator?.locks) return Promise.resolve(() => {}); return new Promise((resolve, reject) => { navigator.locks.request(namespace + code, {ifAvailable: true}, lock => { if (!lock) { reject(problem(503, 'The host room is already open in another tab. Use that tab or close it and retry.')); return; } return new Promise(release => resolve(release)); }).catch(reject); }); }
async function hostOnline(room) { let host = hosts.get(room.code); if (host) return host.opening; host = {code: room.code, publicKey: room.publicKey, guests: new Map(), privateKey: crypto.subtle.importKey('jwk', room.privateKey, algorithm, false, ['deriveKey'])}; hosts.set(room.code, host); host.close = () => { if (host.closed) return; host.closed = true; host.online = false; clearTimeout(host.changedTimer); for (const session of host.guests.values()) clearTimeout(session.idle); host.guests.clear(); if (hosts.get(room.code) === host) hosts.delete(room.code); host.socket?.close(); host.release?.(); }; host.opening = (async () => { host.release = await hostTabLease(room.code); if (host.closed) { host.release(); throw offline(); } host.socket = connect(room.code, true); await new Promise((resolve, reject) => { const timer = setTimeout(() => reject(brokerError()), timeout); host.socket.on('open', () => { clearTimeout(timer); host.online = true; resolve(); }); const disconnected = () => { clearTimeout(timer); host.close(); reject(brokerError()); }; host.socket.on('close', disconnected); host.socket.on('error', disconnected); host.socket.on('message', event => { if (host.online) handleGuest(host, event.uid, event.message); }); }); })().catch(error => { host.close(); throw error; }); return host.opening; }
async function createRoom() { const pair = await newPair(); const raw = await crypto.subtle.exportKey('raw', pair.publicKey); const code = await roomCode(raw); const room = {code, privateKey: await crypto.subtle.exportKey('jwk', pair.privateKey), publicKey: asBase64(raw), hostToken: hex(mint(32)), joinSecret: asBase64(mint(32)), phase: 'lobby', roundIndex: 0, players: []}; if (readRoom(code)) throw problem(503, 'Please retry creating the room.'); persist(room); try { await hostOnline(room); } catch (error) { localStorage.removeItem(storageKey(code)); throw error; } return {code, hostToken: room.hostToken}; }
function guestSession(code) { if (guests.has(code)) return guests.get(code); const socket = connect(code); const pairPromise = newPair(); const challenge = hex(mint(24)); let hostUid, key, context, nextSeq = 0, closed = false, helloTimer; let revision = 0, cache, cacheToken, cacheRevision, cacheUntil = 0; let sendChain = Promise.resolve(); const pending = new Map(); let resolveReady, rejectReady; const ready = new Promise((resolve, reject) => { resolveReady = resolve; rejectReady = reject; }); const handshakeTimer = setTimeout(() => close(offline()), timeout); function close(error = offline()) { if (closed) return; closed = true; clearInterval(helloTimer); clearTimeout(handshakeTimer); if (guests.get(code) === session) guests.delete(code); rejectReady(error); for (const item of pending.values()) { clearTimeout(item.timer); item.reject(error); } pending.clear(); socket.close(); } async function call(operation, token, body) { await ready; if (closed) throw offline(); if (operation === 'state' && cache && cacheToken === token && cacheRevision === revision && Date.now() < cacheUntil) return cache; const version = revision; const data = await new Promise((resolve, reject) => { const seq = ++nextSeq; const timer = setTimeout(() => close(offline()), timeout); pending.set(seq, {resolve, reject, timer}); sendChain = sendChain.then(async () => { if (closed) return; const packet = await seal(key, context, 'player', {seq, operation, token, body}); if (!closed) socket.send(packet, hostUid); }).catch(() => close(offline())); }); if (operation === 'state' || operation === 'vote') { cache = data; cacheToken = token; cacheRevision = version; cacheUntil = Date.now() + 9000 + Math.random() * 5000; } return data; } const session = {call, close}; guests.set(code, session); socket.on('close', () => close()); socket.on('error', () => close(brokerError())); socket.on('leave', event => { if (hostUid && event.uid === hostUid) close(); }); socket.on('open', () => { (async () => { const pair = await pairPromise; const publicKey = asBase64(await crypto.subtle.exportKey('raw', pair.publicKey)); if (closed) return; const hello = () => socket.send({type: 'hello', challenge, publicKey}); hello(); helloTimer = setInterval(hello, 2200); })().catch(() => close(brokerError())); }); let receiving = Promise.resolve(); socket.on('message', ({uid, message: packet}) => { if (closed || !uid || !packet || typeof packet !== 'object') return; if (key && uid === hostUid && packet.type === 'changed') { revision++; return; } if (key ? uid !== hostUid || packet.type !== 'box' : packet.type !== 'welcome') return; receiving = receiving.then(async () => { if (closed) return; if (!key) { try { if (typeof packet.publicKey !== 'string' || packet.publicKey.length !== 88 || typeof packet.context !== 'string' || !/^[0-9a-f]{48}$/.test(packet.context)) return; const hostPublic = fromBase64(packet.publicKey); if (await roomCode(hostPublic) !== code) return; const candidate = await sharedKey((await pairPromise).privateKey, hostPublic); const proof = await unseal(candidate, packet.context, 'handshake', packet.proof, 1024); if (proof.challenge !== challenge || closed) return; hostUid = uid; key = candidate; context = packet.context; clearInterval(helloTimer); clearTimeout(handshakeTimer); resolveReady(); } catch { /* Ignore other visitors posing as a host. The genuine host can still reply. */ } return; } if (uid !== hostUid || packet.type !== 'box') return; const message = await unseal(key, context, 'host', packet, 240000); const item = pending.get(message.seq); if (!item) return; clearTimeout(item.timer); pending.delete(message.seq); if (message.error) item.reject(problem(message.status || 503, message.error)); else item.resolve(message.data); }).catch(() => close(offline())); }); return session; }
async function request(path, {method = 'GET', token, body} = {}) { if (path === '/api/rounds' && method === 'GET') return loadRounds(); if (!window.isSecureContext || !crypto.subtle) throw problem(503, 'Open the game using HTTPS to join securely.'); if (path === '/api/rooms' && method === 'POST') { fields(body); return createRoom(); } const match = route.exec(path); if (!match) throw problem(404, 'Check the room link or room code.'); const [, code, action] = match; if ((action && method !== 'POST') || (!action && method !== 'GET')) throw problem(405, 'Unsupported room operation.'); let saved; // Only local UI requests enter this branch. Incoming relay messages // are dispatched exclusively to playerRequest, which cannot change phases. if (token && action !== 'players') saved = readRoom(code); if (saved && token === saved.hostToken) { await hostOnline(saved); const rounds = await loadRounds(); const latest = readRoom(code); if (!action) return snapshot(latest); if (action === 'advance') return advance(latest, body, rounds); throw problem(403, 'Join as a player to vote.'); } if (action === 'advance') throw problem(403, 'Only the host can advance the round.'); if (!action && new URLSearchParams(location.search).get('host') === '1') { throw problem(401, 'This browser has no matching host session.'); } if (action !== 'players' && !token) throw problem(401, 'Join this room to continue.'); const operation = action === 'players' ? 'join' : action || 'state'; return guestSession(code).call(operation, token, body); }
window.addEventListener('pagehide', () => { for (const host of [...hosts.values()]) host.close(); hosts.clear(); for (const session of [...guests.values()]) session.close(); }); window.OopsPeerRooms = Object.freeze({request});})();123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114:root { color-scheme: dark; --bg: #101411; --surface: #1b211d; --ink: #f4f5e9; --dim: #b6c1b3; --line: #3c493e; --lime: #d3ff63; --pink: #ffaaa3; --purple: #d0b8ff; font-family: Arial, Helvetica, sans-serif; background: var(--bg); color: var(--ink);}
* { box-sizing: border-box; }[hidden] { display: none !important; }body { margin: 0; }main, .site-head { width: min(1180px, calc(100% - 56px)); margin: 0 auto; }main { padding-bottom: 50px; }.site-head { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }.site-head a { color: var(--dim); font-size: .9rem; }.site-head .wordmark { color: var(--ink); font-weight: 800; text-decoration: none; font-size: 1.08rem; }.wordmark span, h1 em { color: var(--lime); font-style: normal; }h1, h2, p, figure { margin: 0; }h1 { font-family: Impact, 'Arial Narrow', Arial, sans-serif; text-transform: uppercase; line-height: .98; letter-spacing: -.025em; font-weight: 900; font-size: clamp(3.75rem, 7.8vw, 6.7rem); }h2 { font-size: clamp(1.35rem, 2.5vw, 2rem); line-height: 1.16; letter-spacing: -.025em; }a { color: var(--lime); text-underline-offset: 3px; }input, button { font: inherit; }input { min-width: 0; padding: .8rem .9rem; color: var(--ink); background: #141915; border: 1px solid #6a766c; border-radius: 7px; }input::placeholder { color: #a5b0a4; }button { border: 1px solid #647367; color: var(--ink); background: var(--surface); min-height: 44px; padding: .7rem 1rem; font-weight: 700; border-radius: 7px; cursor: pointer; }button:hover:enabled { background: #2a342b; }button:disabled { opacity: .55; cursor: default; }button.primary { background: var(--lime); color: #17200d; border-color: var(--lime); }button.primary:hover:enabled { background: #e2ff97; }:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }label { display: block; font-size: .95rem; font-weight: 700; margin-bottom: .55rem; }.input-row { display: flex; gap: .5rem; }.input-row input { flex: 1; }.input-row button { flex-shrink: 0; }.entry { min-height: min(700px, calc(100vh - 70px)); display: grid; grid-template-columns: 1.14fr .96fr; align-items: center; gap: clamp(28px, 6vw, 84px); padding: 50px 0; }.intro { margin: 1rem 0; color: var(--dim); font-size: 1.12rem; line-height: 1.55; max-width: 44ch; }.hero { position: relative; padding: 12px 8px 25px; transform: rotate(2deg); }.hero img { width: 100%; aspect-ratio: 16 / 10; display: block; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); filter: saturate(.85); }.hero figcaption { position: absolute; right: 0; bottom: 0; background: var(--pink); color: #27110e; padding: .55rem 1rem; transform: rotate(-5deg); font: italic clamp(1.23rem, 3vw, 2.3rem) Georgia, serif; }.entry-actions { max-width: 355px; margin-top: 1.4rem; }.entry-actions > button { width: 100%; font-size: 1.1rem; }#find-form { margin-top: 1.6rem; }#room-code, .code b, #join-code { font-family: ui-monospace, monospace; letter-spacing: .12em; }#room-code { text-transform: uppercase; }.narrow { max-width: 570px; margin: clamp(32px, 10vh, 90px) auto; }.narrow h1 { font-size: clamp(3rem, 6vw, 5rem); margin: 12px 0 32px; }.under-link { display: inline-block; margin-top: 20px; }.eyebrow { color: var(--lime); font: 700 .79rem/1.35 ui-monospace, monospace; letter-spacing: .11em; text-transform: uppercase; }.room-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 32px 0 22px; }.room-heading h1 { font-size: clamp(2.1rem, 4.5vw, 4.2rem); margin-top: 7px; }.room-meta { display: flex; align-items: flex-end; flex-direction: column; gap: .45rem; overflow-wrap: anywhere; font-size: .9rem; color: var(--dim); }.code { white-space: nowrap; }.code b { color: var(--ink); }.invite { padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; display: flex; align-items: center; gap: 20px; justify-content: space-between; margin-bottom: 22px; }.invite > div { flex: 1; max-width: 600px; min-width: 0; }#invite-url { font-size: .88rem; }#copy-status:not(:empty) { margin-top: .5rem; color: var(--lime); font-size: .9rem; }.game-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, 1fr); gap: clamp(20px, 3.2vw, 40px); align-items: start; }#media[hidden] + .play-panel { grid-column: 1 / -1; max-width: 680px; }.stage { background: #060806; border: 1px solid var(--line); overflow: hidden; border-radius: 9px; aspect-ratio: 16 / 9; }video { width: 100%; height: 100%; display: block; object-fit: contain; }.credit, .description { color: var(--dim); line-height: 1.5; }.credit { font-size: .85rem; }.credit span:not(:empty)::before { content: ' · '; }.description { margin-top: .55rem; }#question { font-size: 1.15rem; font-weight: 700; line-height: 1.4; margin-top: 1rem; }#question:empty { margin: 0; }#choices { display: grid; gap: .48rem; }#choices:not(:empty) { margin: 12px 0; }.choice { display: flex; align-items: center; gap: .8rem; text-align: left; padding: 11px 12px; min-height: 45px; line-height: 1.35; border: 1px solid var(--line); border-radius: 7px; font-weight: 500; }.choice b { color: var(--lime); font: 800 1.23rem ui-monospace, monospace; }.choice[aria-pressed="true"] { background: #31263f; border: 2px solid var(--purple); padding: 10px 11px; }.choice[aria-pressed="true"] b { color: var(--purple); }#vote-status, .tally, #media-notice { line-height: 1.45; margin-top: .7rem; }#vote-status { color: var(--purple); }.tally, #media-notice { color: var(--dim); font-size: .9rem; }#result { padding: 1rem; border-left: 3px solid var(--lime); background: var(--surface); margin: 1rem 0; }#correct-answer { margin-top: .45rem; font-size: 1.16rem; line-height: 1.4; font-weight: 700; }.advance { margin-top: 1rem; }.scoreboard { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 20px; }.scoreboard h2 { font-size: 1.3rem; }#scores { margin: .7rem 0 0; padding: 0; list-style: none; max-width: 680px; }.score-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding: 10px 2px; }.score-row span { overflow-wrap: anywhere; }.score-row strong { color: var(--lime); font: 700 1rem ui-monospace, monospace; white-space: nowrap; }.notice { margin-top: 14px; border: 1px solid var(--line); padding: 12px; border-radius: 7px; background: var(--surface); line-height: 1.45; }.notice.error { border-left: 3px solid var(--pink); color: var(--pink); }@media (max-width: 760px) { main, .site-head { width: min(100% - 32px, 550px); } .site-head { min-height: 58px; } .entry { display: block; padding: 36px 0; min-height: auto; } .entry-actions { max-width: 100%; } .hero { margin-top: 24px; max-width: 440px; } .game-grid { grid-template-columns: 1fr; gap: 16px; } #room[data-role="player"][data-phase="voting"] .play-panel { order: -1; } .room-heading { flex-wrap: wrap; padding: 20px 0 14px; } .room-meta { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 12px; } .invite { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; } .invite > a { align-self: flex-start; } .scoreboard { margin-top: 20px; } .advance { width: 100%; }}@media (max-width: 350px) { .site-head { flex-wrap: wrap; padding: 8px 0; } .input-row { flex-wrap: wrap; } .input-row input { width: 100%; flex-basis: 100%; }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100<!doctype html><html lang="en"><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="color-scheme" content="dark"> <title>Live rooms | Oops, All Failures</title> <link rel="stylesheet" href="/rooms.css"> <script src="/clip-store.js" defer></script> <script src="/vendor/itty-sockets.js" defer></script> <script src="/peer-rooms.js" defer></script> <script src="/rooms.js" defer></script></head><body> <header class="site-head"> <a class="wordmark" href="/rooms.html">Oops<span>.</span> All failures<span>.</span></a> <a href="/classic.html">Play on one screen</a> </header> <main> <p id="connection" class="notice" role="status" hidden></p> <p id="error" class="notice error" role="alert" hidden></p>
<section id="landing" class="entry" hidden aria-labelledby="landing-title"> <div> <h1 id="landing-title">Oops.<br><em>All failures.</em></h1> <p class="intro">Watch the robot. Guess what goes wrong next. Each player votes on their own device.</p> <div class="entry-actions"> <button type="button" id="create-room" class="primary">Host a room</button> <form id="find-form"> <label for="room-code">Have a room code?</label> <div class="input-row"> <input id="room-code" name="room" type="text" maxlength="16" required autocapitalize="characters" autocomplete="off" spellcheck="false" placeholder="Room code"> <button id="find-room" type="submit">Join room</button> </div> </form> </div> </div> <figure id="hero" class="hero" hidden> <img id="hero-image" alt="A robot approaching the dishes"> <figcaption>“It worked in sim”</figcaption> </figure> </section>
<section id="join" class="narrow" hidden aria-labelledby="join-title"> <p class="eyebrow">Room <span id="join-code"></span></p> <h1 id="join-title">Join the <em>game.</em></h1> <form id="join-form"> <label for="player-name">Your name on the scoreboard</label> <div class="input-row"> <input id="player-name" name="name" maxlength="40" required autocomplete="nickname" placeholder="Your name"> <button type="submit" id="join-room" class="primary">Join room</button> </div> </form> <a class="under-link" href="/rooms.html">Use a different room</a> </section>
<section id="room" hidden aria-labelledby="round-title"> <div class="room-heading"> <div> <p class="eyebrow" id="round-label"></p> <h1 id="round-title"></h1> </div> <div class="room-meta"><span id="identity"></span><span class="code">Room <b id="room-pin"></b></span></div> </div> <section id="invite" class="invite" hidden aria-label="Invite players"> <div><label for="invite-url">Player invite link</label> <div class="input-row"><input id="invite-url" readonly><button id="copy-invite" type="button">Copy link</button></div> <p id="copy-status" role="status"></p> <p id="host-online" class="description" hidden>Keep this host tab open while players vote. Reopen the host link in this browser to resume.</p> </div> <a id="player-tab" target="_blank" rel="noopener">Join as a player ↗</a> </section> <div class="game-grid"> <div id="media" hidden> <div class="stage"><video id="clip" controls playsinline muted preload="auto" aria-label="Round clip"></video></div> <div id="media-notice" role="status" hidden><span id="media-status"></span> <button type="button" id="retry-media" hidden>Retry clip</button></div> <p id="task" class="intro"></p> <p class="credit"><a id="source" target="_blank" rel="noopener noreferrer"></a> <span id="source-credit"></span></p> </div> <div class="play-panel"> <h2 id="phase-title" aria-live="polite"></h2> <p id="phase-copy" class="description"></p> <p id="question"></p> <div id="choices" role="group" aria-label="Prediction choices"></div> <p id="vote-status" role="status" hidden></p> <div id="result" hidden><p class="eyebrow">Correct answer</p><p id="correct-answer"></p></div> <p id="vote-count" class="tally" hidden></p> <button id="advance" class="primary advance" type="button" hidden></button> <a id="new-game" class="under-link" href="/rooms.html" hidden>Back to live rooms</a> </div> </div> <section class="scoreboard" aria-labelledby="score-title"> <h2 id="score-title">Scoreboard</h2> <p id="no-players" class="description">Waiting for the first player.</p> <ol id="scores"></ol> </section> </section> </main></body></html>123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448'use strict';
const byId = id => document.getElementById(id);const letters = ['A', 'B', 'C', 'D'];const route = new URL(location.href);const code = (route.searchParams.get('room') || '').trim().toUpperCase();const validCode = /^[2-9A-HJ-NP-Z]{16}$/;const isHost = route.searchParams.get('host') === '1';const role = isHost ? 'host' : 'player';const roomPath = '/api/rooms/' + encodeURIComponent(code);const sessionKey = (roomCode, kind) => 'oops.rooms.' + roomCode + '.' + kind;const roomUrl = (roomCode, host = false) => { const url = new URL('/rooms.html', location.origin); url.searchParams.set('room', roomCode); if (host) url.searchParams.set('host', '1'); return url.href;};
function stores() { const available = []; for (const name of ['localStorage', 'sessionStorage']) { try { available.push(window[name]); } catch {} } return available;}
function readSaved(key) { for (const storage of stores()) { try { const value = storage.getItem(key); if (value) return value; } catch {} } return null;}
function save(key, value) { for (const storage of stores()) { try { storage.setItem(key, value); return; } catch {} } throw new Error('Allow browser storage to join a room and keep your place when you refresh.');}
function forget(key) { for (const storage of stores()) { try { storage.removeItem(key); } catch {} }}
function checkStorage() { const key = sessionKey('test', 'storage'); save(key, '1'); forget(key);}
function show(id, visible) { byId(id).hidden = !visible; }function write(id, value) { const element = byId(id); if (element.textContent !== value) element.textContent = value;}function notice(id, message = '') { write(id, message); show(id, Boolean(message));}
function view(id) { for (const panel of ['landing', 'join', 'room']) show(panel, panel === id);}
async function request(path, {method = 'GET', token, body} = {}) { if (window.OopsPeerRooms) { return window.OopsPeerRooms.request(path, {method, token, body}); } const headers = {Accept: 'application/json'}; if (token) headers.Authorization = 'Bearer ' + token; if (body) headers['Content-Type'] = 'application/json'; const controller = new AbortController(); const timeout = setTimeout(() => controller.abort(), 12000); try { const res = await fetch(path, { method, headers, body: body ? JSON.stringify(body) : undefined, cache: 'no-store', signal: controller.signal }); let data; try { data = await res.json(); } catch {} if (!res.ok || data === undefined) { const error = new Error(typeof data?.error === 'string' ? data.error : 'The game server could not complete this request.'); error.status = res.status; throw error; } return data; } catch (error) { if (error.name === 'AbortError' || error instanceof TypeError) { throw new Error('The game server could not be reached. Check your connection.'); } throw error; } finally { clearTimeout(timeout); }}
let rounds = null;let token = readSaved(sessionKey(code, role));let room = null;let epoch = 0;let busy = false;let reading = false;let pollTimer;let pollDelay = 1200;
function schedule(delay) { clearTimeout(pollTimer); if (token) pollTimer = setTimeout(refresh, delay);}
async function loadRounds() { const data = await request('/api/rounds'); if (!Array.isArray(data) || !data.length) throw new Error('The round list could not be loaded.'); rounds = data;}
async function refresh() { if (!token || busy || reading) return; const ticket = epoch; reading = true; try { if (!rounds) await loadRounds(); const snapshot = await request(roomPath, {token}); if (ticket !== epoch) return; render(snapshot); notice('connection'); pollDelay = 1200; } catch (error) { if (ticket !== epoch) return; if ([401, 403, 404, 410].includes(error.status)) { token = null; forget(sessionKey(code, role)); if (isHost) { view('join'); byId('join-form').hidden = true; notice('error', 'This host session is unavailable. Open the host link on the device that created the room.'); const link = byId('player-tab'); link.href = roomUrl(code); link.textContent = 'Open the player link'; byId('join').append(link); } else { view('join'); write('join-code', code); notice('error', error.status === 404 || error.status === 410 ? 'This room is unavailable. Check the code with the host.' : 'Your player session has expired. Enter your name to rejoin.'); } notice('connection'); return; } notice('connection', 'Reconnecting to the game… ' + error.message); pollDelay = Math.min(pollDelay * 2, 6000); } finally { reading = false; schedule(pollDelay); }}
async function action(button, run) { if (busy) return; busy = true; epoch++; clearTimeout(pollTimer); notice('error'); button.disabled = true; if (room) updateButtons(); try { await run(); } catch (error) { notice('error', error.message); } finally { busy = false; button.disabled = false; if (room) updateButtons(); schedule(0); }}
byId('create-room').onclick = event => action(event.currentTarget, async () => { checkStorage(); const created = await request('/api/rooms', {method: 'POST', body: {}}); save(sessionKey(created.code, 'host'), created.hostToken); location.assign(roomUrl(created.code, true));});
byId('find-form').onsubmit = event => { event.preventDefault(); const input = byId('room-code'); const entered = input.value.trim().toUpperCase(); if (!validCode.test(entered)) { notice('error', 'Enter the 16-character code from the host.'); input.focus(); return; } location.assign(roomUrl(entered));};
byId('join-form').onsubmit = event => { event.preventDefault(); action(byId('join-room'), async () => { const name = byId('player-name').value.trim(); if (!name) throw new Error('Enter the name you want on the scoreboard.'); const pendingKey = sessionKey(code, 'pending'); let joinKey = readSaved(pendingKey); if (!joinKey) { joinKey = Array.from(crypto.getRandomValues(new Uint8Array(24)), byte => byte.toString(16).padStart(2, '0')).join(''); save(pendingKey, joinKey); } save(sessionKey(code, 'pending-name'), name); const joined = await request(roomPath + '/players', {method: 'POST', body: {name, joinKey}}); save(sessionKey(code, 'player'), joined.playerToken); token = joined.playerToken; forget(pendingKey); forget(sessionKey(code, 'pending-name')); view(null); notice('connection', 'Connecting to the room…'); });};
byId('copy-invite').onclick = async () => { const input = byId('invite-url'); try { await navigator.clipboard.writeText(input.value); write('copy-status', 'Player link copied.'); } catch { input.focus(); input.select(); write('copy-status', 'Select Copy to share the highlighted link.'); }};
function vote(choice) { if (busy || isHost || room.phase !== 'voting') return; const roundIndex = room.roundIndex; action(byId('choices').children[choice], async () => { render(await request(roomPath + '/vote', {method: 'POST', token, body: {roundIndex, choice}})); notice('connection'); });}
byId('advance').onclick = () => { if (!room || !isHost || room.phase === 'finished') return; const {roundIndex, phase} = room; action(byId('advance'), async () => { render(await request(roomPath + '/advance', {method: 'POST', token, body: {roundIndex, phase}})); notice('connection'); });};
let choiceKey;function renderChoices(round) { const voting = room.phase === 'voting'; write('question', voting ? round.question : ''); const key = voting ? String(room.roundIndex) : ''; if (choiceKey !== key) { choiceKey = key; const choices = byId('choices'); choices.replaceChildren(); if (voting) { round.options.forEach((option, index) => { const item = document.createElement(isHost ? 'div' : 'button'); item.className = 'choice'; if (!isHost) { item.type = 'button'; item.onclick = () => vote(index); } const letter = document.createElement('b'); letter.textContent = letters[index]; const label = document.createElement('span'); label.textContent = option; item.append(letter, label); choices.append(item); }); } } if (!isHost && voting) { Array.from(byId('choices').children).forEach((element, index) => { element.setAttribute('aria-pressed', String(room.myVote === index)); }); }}
let scoreKey;function renderScores() { const players = [...room.players].sort((a, b) => b.score - a.score); const key = JSON.stringify(players); if (scoreKey === key) return; scoreKey = key; byId('scores').replaceChildren(...players.map(player => { const row = document.createElement('li'); row.className = 'score-row'; const name = document.createElement('span'); name.textContent = player.name; const score = document.createElement('strong'); score.textContent = player.score + ' pts'; row.append(name, score); return row; })); show('no-players', !players.length);}
const clip = byId('clip');let mediaKey = '';function mediaNotice(message = '', retry = false) { write('media-status', message); show('media-notice', Boolean(message)); show('retry-media', retry);}
async function renderMedia(round, force = false) { const active = !['lobby', 'finished'].includes(room.phase); const part = room.phase === 'result' ? 'reveal' : 'setup'; const key = active ? room.roundIndex + '/' + part : ''; show('media', active); if (mediaKey === key && !force) return; mediaKey = key; clip.oncanplay = null; clip.onerror = null; clip.pause(); clip.removeAttribute('src'); clip.load(); mediaNotice(); if (!active) return; clip.poster = round.poster; write('task', round.task); const source = byId('source'); source.textContent = round.sourceTitle; source.href = round.sourceUrl; write('source-credit', round.shortCredit || ''); mediaNotice('Loading clip…'); try { const url = await window.ClipStore.load(round[part]); if (key !== mediaKey) return; clip.onerror = () => { if (key === mediaKey) mediaNotice('The clip could not play.', true); }; clip.oncanplay = () => { if (key === mediaKey) mediaNotice(); }; clip.src = url; clip.muted = true; clip.playbackRate = round[part + 'Rate'] || 1; clip.load(); try { await clip.play(); } catch (error) { if (key === mediaKey && error.name !== 'AbortError') { mediaNotice(error.name === 'NotAllowedError' ? 'Press play to watch the clip.' : 'The clip could not play.', error.name !== 'NotAllowedError'); } } } catch { if (key === mediaKey) mediaNotice('The clip could not load. Check your connection.', true); }}byId('retry-media').onclick = () => renderMedia(rounds[room.roundIndex], true);
function updateButtons() { byId('advance').disabled = busy; for (const button of byId('choices').querySelectorAll('button')) button.disabled = busy;}
function render(snapshot) { room = snapshot; byId('room').dataset.phase = room.phase; byId('room').dataset.role = role; const round = rounds[room.roundIndex]; const active = !['lobby', 'finished'].includes(room.phase); const lastRound = room.roundIndex === rounds.length - 1; const phase = room.phase; view('room'); write('room-pin', code); write('identity', isHost ? 'Host view' : 'Playing as ' + room.myName); write('round-label', active ? 'Round ' + (room.roundIndex + 1) + ' of ' + rounds.length : 'Live room'); write('round-title', active ? round.title : phase === 'lobby' ? 'The lobby.' : 'Final scores.'); show('invite', isHost && phase !== 'finished'); show('host-online', Boolean(window.OopsPeerRooms) && isHost); const invite = roomUrl(code); if (byId('invite-url').value !== invite) { byId('invite-url').value = invite; byId('player-tab').href = invite; } const titles = { lobby: 'Waiting for the game', setup: 'Watch the setup', voting: isHost ? 'Voting is open' : 'Make your prediction', result: 'The reveal', finished: 'Game complete' }; const descriptions = { lobby: isHost ? 'Share the player link, then start when everyone is here.' : 'You’re in. The first clip starts when the host is ready.', setup: isHost ? 'Open voting when everyone has seen the setup.' : 'Watch closely. The host will open voting.', voting: isHost ? 'Reveal the answer when everyone has had a chance to vote.' : 'Tap an answer before the host reveals the outcome.', result: isHost ? 'Each correct prediction earns two points.' : 'The scoreboard includes this round.', finished: 'The highest score wins. Players who tie share the win.' }; write('phase-title', titles[phase]); write('phase-copy', descriptions[phase]); renderChoices(round); let status = ''; if (!isHost && Number.isInteger(room.myVote) && phase === 'voting') { status = 'Your vote is ' + letters[room.myVote] + '. You can change it until the reveal.'; } else if (!isHost && phase === 'result') { status = Number.isInteger(room.myVote) ? 'You picked ' + letters[room.myVote] + '. ' + (room.myVote === round.answerIndex ? '+2 points.' : '0 points this round.') : 'You didn’t vote this round.'; } notice('vote-status', status); const votingCounts = phase === 'voting' || phase === 'result'; show('vote-count', votingCounts); if (votingCounts) write('vote-count', room.votesCast + ' of ' + room.playerCount + ' voted'); show('result', phase === 'result'); if (phase === 'result') write('correct-answer', letters[round.answerIndex] + '. ' + (round.answer || round.options[round.answerIndex])); const nextLabels = {lobby: 'Start first round', setup: 'Open voting', voting: 'Reveal answer', result: lastRound ? 'See final scores' : 'Next round'}; show('advance', isHost && phase !== 'finished'); if (phase !== 'finished') write('advance', nextLabels[phase]); show('new-game', phase === 'finished'); renderScores(); renderMedia(round); updateButtons();}
function start() { if (!code) { view('landing'); loadRounds().then(() => { byId('hero-image').src = rounds[0].poster; show('hero', true); }).catch(() => {}); return; } if (!validCode.test(code)) { view('landing'); notice('error', 'That room code is invalid. Enter the code from your host.'); return; } write('join-code', code); if (token) { notice('connection', 'Connecting to the room…'); refresh(); } else if (isHost) { location.replace(roomUrl(code)); } else { byId('player-name').value = readSaved(sessionKey(code, 'pending-name')) || ''; view('join'); }}document.addEventListener('visibilitychange', () => { if (!document.hidden) schedule(0); });window.addEventListener('online', () => schedule(0));start();1[{"id": "invisible-dish", "title": "Doing the dishes", "task": "Pick up the plate. Wash it with the sponge.", "question": "What gets washed?", "options": ["The counter.", "Its own gripper.", "An imaginary plate.", "The whole plate rack."], "answerIndex": 2, "answer": "An imaginary plate. The real one stays in the rack.", "punchline": "The plate is still dirty. The air is spotless.", "sourceTitle": "Universal Manipulation Interface", "sourceUrl": "https://umi-gripper.github.io/", "classification": "Autonomous ResNet baseline evaluation failure. Source speed unlabeled.", "shortCredit": "UMI · policy evaluation", "videoUrl": "https://umi-gripper.github.io/videos/comparison_dish_resnet.mp4", "start": 0.4, "pause": 2.6, "end": 11.2, "setup": {"bundle": "media/invisible-dish-setup.5ec37facefbc.clip.js", "key": "5ec37facefbc7a94929a79502417983fb3e0441e0a3582004cef329d7814f69b"}, "reveal": {"bundle": "media/invisible-dish-reveal.efee0915eef7.clip.js", "key": "efee0915eef70575d2dff5eb5dd388c7af171a6a4fafa9420593859406a02c31"}, "poster": "media/invisible-dish-poster.394628b02ff0.jpg"}, {"id": "flying-pot", "title": "Yes, chef", "task": "Move the pot from the sink to the stove.", "question": "What happens next?", "options": ["Drops the pot, then carries on empty-handed.", "Puts the pot upside down on the burner.", "Dunks the pot back into the sink.", "Drags the pot sideways across the counter."], "answerIndex": 0, "answer": "Drops the pot. Continues the delivery anyway.", "punchline": "Soup of the day: floor.", "sourceTitle": "REFLECT / RoboFail", "sourceUrl": "https://robot-reflect.github.io/", "classification": "Teleoperated failure demonstration for RoboFail, not an autonomous policy trial. Source at 4×; camera view cropped to remove outcome annotations.", "shortCredit": "RoboFail · teleoperated failure demo", "videoUrl": "https://robot-reflect.github.io/videos/boilWater4.mov", "cropFilter": "crop=980:540:22:68", "start": 35, "pause": 38.5, "end": 43, "setup": {"bundle": "media/flying-pot-setup.57a53a8d6353.clip.js", "key": "57a53a8d635342a0b0dd7bb874a4965923ef53f2830989e8608085a5383218b4"}, "reveal": {"bundle": "media/flying-pot-reveal.3882d8c03ca6.clip.js", "key": "3882d8c03ca67d12e1734e3a117420a4b15a598dd0e7c01a362d27638f55aae4"}, "poster": "media/flying-pot-poster.c794f25aaa48.jpg"}, {"id": "curb-step", "title": "One small step", "task": "Walk down from the pavement.", "question": "How does it handle the step down?", "options": ["Hops down on all four feet.", "Takes one step, then faceplants.", "Stops at the edge and backs away.", "Turns around and takes the long way."], "answerIndex": 1, "answer": "One foot down. Then the rest of the robot.", "punchline": "Please use the ramp.", "sourceTitle": "Learning Vision-Guided Quadrupedal Locomotion End-to-End with Cross-Modal Transformers", "sourceUrl": "https://vision-locomotion.github.io/", "classification": "Real learned-policy evaluation failure. The research page attributes the fall to a large drop whose extent is not visible to the front camera. Source speed unlabeled.", "shortCredit": "Vision-Guided Locomotion · policy evaluation", "videoUrl": "https://blindsupp.github.io/visual-walking/resources/failure/failure_curb.mp4", "start": 0.1, "pause": 2.7, "end": 4.05, "setup": {"bundle": "media/curb-step-setup.a09f6d24f3db.clip.js", "key": "a09f6d24f3db155a1a7287f4ef0352ccc4e943b4ac03760d26408982eb0822e9"}, "reveal": {"bundle": "media/curb-step-reveal.09cf4c59ce47.clip.js", "key": "09cf4c59ce47280b13378f9b867145c9a66ab3844caeff9c25d0798e8713bffb"}, "poster": "media/curb-step-poster.f9c718583d6d.jpg"}, {"id": "self-toss", "title": "Go fetch", "task": "Throw the tennis ball.", "question": "What else gets thrown?", "options": ["The gripper releases the ball straight down.", "The arm flings the ball into its own body.", "The entire robot somersaults onto its back.", "The robot tips sideways without letting go."], "answerIndex": 2, "answer": "The ball flies. Then the robot tumbles onto its back.", "punchline": "Not you. NOT YOU.", "sourceTitle": "UMI on Legs: failure montage", "sourceUrl": "https://umi-on-legs.github.io/", "classification": "Whole-body manipulation research failure, cropped to the original montage's bottom-right panel. Exact controller state and source speed unlabeled.", "shortCredit": "UMI on Legs · research failure", "videoUrl": "https://umi-on-legs.github.io/static/videos/failures-small.mp4", "cropFilter": "crop=iw/2:ih/2:iw/2:ih/2", "start": 16, "pause": 18, "end": 26.5, "setup": {"bundle": "media/self-toss-setup.611eec700ede.clip.js", "key": "611eec700eded2292c6043632b3b51875a601d2919bc37118e9e8aabe6e5eb6a"}, "reveal": {"bundle": "media/self-toss-reveal.e1000e2fbd17.clip.js", "key": "e1000e2fbd17606e2bcaef4d46acd0a4ca7515f379b793c070290c35c569ab41"}, "poster": "media/self-toss-poster.fe7075364478.jpg"}, {"id": "digit-break", "title": "One last bin", "task": "Move the bin to the conveyor.", "question": "How does this shift end?", "options": ["Carries the bin to the conveyor.", "Drops the bin but stays upright.", "Crumples onto the floor with the bin.", "Turns to wave at the crowd."], "answerIndex": 2, "answer": "Digit crumples onto the floor, taking the bin with it.", "punchline": "Break time.", "sourceTitle": "Agility Robotics: Digit at ProMat 2023", "sourceUrl": "https://www.linkedin.com/posts/agilityrobotics_promat2023-activity-7050148324401692673-Ut8w", "classification": "Manufacturer footage of a live bin-handling demonstration failure at ProMat 2023. The visible collapse does not establish its technical cause.", "shortCredit": "Agility Robotics · ProMat demo", "sourceExcerpt": true, "start": 10.4, "pause": 12.4, "end": 15.5, "setup": {"bundle": "media/digit-break-setup.ef8c61b03fc0.clip.js", "key": "ef8c61b03fc084db8dda3b0bdb5ad846b0ec377b212f902504e3a1c3da5f8abf"}, "reveal": {"bundle": "media/digit-break-reveal.b4137ff4977a.clip.js", "key": "b4137ff4977aff8476d55ed60ca8ad75e734cb51985df648b98b24da8d4d8ece"}, "poster": "media/digit-break-poster.6354b0fee5e6.jpg"}, {"id": "aidol-debut", "title": "A grand entrance", "task": "Walk onstage. Wave to the audience.", "question": "How does the debut go?", "options": ["Keeps walking straight off the stage.", "Sits down on the edge of the stage.", "Freezes upright with one arm raised.", "Faceplants as the staff rush in."], "answerIndex": 3, "answer": "It pitches forward. The staff rush in to catch it.", "punchline": "A standing ovation felt insensitive.", "sourceTitle": "The National / Moscow News Agency: AIDOL debut", "sourceUrl": "https://www.thenationalnews.com/video/JxNPpnEs/russian-robot-stumbles-on-debut-appearance/", "classification": "Live stage demonstration failure. The National carries Moscow News Agency footage; both watermarks are retained. The precise technical cause is unconfirmed.", "shortCredit": "The National / Moscow News Agency · AIDOL debut", "sourceExcerpt": true, "start": 21.2, "pause": 23.7, "end": 26.3, "setup": {"bundle": "media/aidol-debut-setup.0bcd9141f153.clip.js", "key": "0bcd9141f1539155af18844f63ca774cc529d71ac67ba9e4294436e976176994"}, "reveal": {"bundle": "media/aidol-debut-reveal.8d11dc85e96c.clip.js", "key": "8d11dc85e96cdf215cbdd4bd07bedf73c81bba7ca81d3e815e62ea00fe1a5e85"}, "poster": "media/aidol-debut-poster.e822c9fc42ba.jpg"}, {"id": "controller-kick", "title": "A quick demo", "task": "The robot is practising kicks beside its handler.", "question": "What happens next?", "options": ["The robot kicks its own foot into the desk.", "The controller gets kicked out of the handler’s hand.", "The handler trips over the robot’s leg.", "The robot’s foot knocks over the chair."], "answerIndex": 1, "answer": "The hand-held controller gets kicked across the room.", "punchline": "So much for being in control.", "sourceTitle": "IHA News: Robot Kicks Developer During China Demo", "sourceUrl": "https://iha.news/robot-kicks-developer-during-china-demo/", "classification": "Reported accidental contact during a motion demonstration. The visible strike knocks a controller from the handler’s hand; a body strike, robot model, autonomy, and technical cause are not established.", "shortCredit": "IHA News · demo mishap", "videoUrl": "https://iha.news/wp-content/uploads/2026/09/iha-auto-draft-2026-09-17_09-27-41_957713.mp4", "start": 0.5, "pause": 1.3, "end": 5.6, "setup": {"bundle": "media/controller-kick-setup.0074d3238dfe.clip.js", "key": "0074d3238dfed75d47bbf3c292f4a6a5f682d47acbc930d7ba747f0fbd594189"}, "reveal": {"bundle": "media/controller-kick-reveal.8ccd1acef793.clip.js", "key": "8ccd1acef79368239efb5e9fc972a5f0a0e8e0c83afa4548fd1916184f952a54"}, "poster": "media/controller-kick-poster.a7a0aea280ee.jpg"}, {"id": "motion-copy", "title": "Copy me", "task": "The robot mirrors the operator’s movements.", "question": "What happens next?", "options": ["It kicks him, then copies him doubling over.", "It spins too far and falls flat on its face.", "It knocks the camera over with a kick.", "It grabs his arm and drags him sideways."], "answerIndex": 0, "answer": "It kicks the operator, then copies him doubling over.", "punchline": "Apparently that move was contagious.", "sourceTitle": "zeonsunlight / 人工智障开发专业户", "sourceUrl": "https://www.bilibili.com/video/BV1FNBDBiEM3/", "classification": "Reported accidental contact during a motion-copying experiment. The precise control fault is unconfirmed. A short excerpt from the original creator’s video, with the watermark retained.", "shortCredit": "zeonsunlight · motion-copying mishap", "sourceExcerpt": true, "start": 9, "pause": 12.6, "end": 16.6, "setup": {"bundle": "media/motion-copy-setup.5c14a8cea07c.clip.js", "key": "5c14a8cea07ca622544addceb71938a28c0c678747e9d9a59a1e4b5675753535"}, "reveal": {"bundle": "media/motion-copy-reveal.606cc33ea8da.clip.js", "key": "606cc33ea8dab7b71357c4f27d0a81f0f0cd1242237ee04b2ba3ec92381961c9"}, "poster": "media/motion-copy-poster.9fc9b2c50b31.jpg"}, {"id": "atlas-cartwheel", "title": "Stick the landing", "task": "Atlas lines up a cartwheel.", "question": "How does the landing go?", "options": ["It lands sitting up and waves.", "It falls onto its shoulder, legs still pedalling.", "It slides headfirst into the crash mat.", "One hand snaps off mid-cartwheel."], "answerIndex": 1, "answer": "Onto its shoulder. The legs keep going.", "punchline": "Nailed the floor.", "sourceTitle": "Boston Dynamics / RAI Institute: Atlas Airborne", "sourceUrl": "https://bostondynamics.com/video/atlas-airborne-boston-dynamics-rai-institute/", "classification": "Manufacturer-published research robot trial failure in the Atlas Airborne blooper reel. The source sequence is in slow motion; precise control cause unconfirmed.", "shortCredit": "Boston Dynamics / RAI Institute · research blooper", "videoUrl": "https://embed-ssl.wistia.com/deliveries/07f2a78a225005341f5268d65e32cb82e88c7668.bin", "start": 38.7, "pause": 39.65, "end": 44.2, "sourceExcerpt": true, "setup": {"bundle": "media/atlas-cartwheel-setup.24ace3e0a7f0.clip.js", "key": "24ace3e0a7f00e0feeb2395f088f04d0fea66e5a7eae5edc56cb9cdb4bc3d426"}, "reveal": {"bundle": "media/atlas-cartwheel-reveal.8349393c9e91.clip.js", "key": "8349393c9e91ffc23886cab51224aa329397aa2a92e02419f0a6d6ba19b46598"}, "poster": "media/atlas-cartwheel-poster.e4344c6e2a78.jpg"}, {"id": "ted-trolley", "title": "First day on the job", "task": "Put the box on the shelf.", "question": "How does the delivery go?", "options": ["Drops the box, pulls the trolley over, then falls too.", "Shoves every box off the shelf but stays upright.", "Turns around and marches away with the box.", "Throws the box over the shelf."], "answerIndex": 0, "answer": "The box goes down. The trolley goes down. Then the robot.", "punchline": "Probation did not go well.", "sourceTitle": "Boston Dynamics / Marc Raibert at TED2017", "sourceUrl": "https://www.ted.com/talks/marc_raibert_meet_spot_the_robot_dog_that_can_run_hop_and_open_doors", "classification": "Real Boston Dynamics Atlas manipulation-test outtake shown by founder Marc Raibert in his TED2017 talk. The precise control failure is not established.", "shortCredit": "Boston Dynamics / TED · manipulation test", "sourceExcerpt": true, "start": 319.85, "pause": 321.35, "end": 332.6, "setup": {"bundle": "media/ted-trolley-setup.62f11ca01021.clip.js", "key": "62f11ca0102199752c74b0c548fdbb476e3b4acb177dc10521b6b9058e10a712"}, "reveal": {"bundle": "media/ted-trolley-reveal.482f4d548493.clip.js", "key": "482f4d54849359b06a11fa03247c24f049a3f6877f42c23c8b441d6fd8407cb1"}, "poster": "media/ted-trolley-poster.b77de8726149.jpg"}, {"id": "derek-rig", "title": "Just stand there", "task": "The handler tries to steady the robot’s frame.", "question": "What gets knocked over?", "options": ["The white frame holding the robot.", "The handler.", "The black stand beside the robot.", "The table behind the robot."], "answerIndex": 2, "answer": "The black stand goes down. The handler puts his hands on his head.", "punchline": "Nobody touch anything else.", "sourceTitle": "Cix Liv / REK: DeREK testing mishap", "sourceUrl": "https://x.com/cixliv/status/1946648610940367008", "classification": "Original creator footage of a robot testing mishap, published July 19, 2025. The suspended robot flails and knocks over the black stand next to it; it remains supported by the white frame. Precise technical cause is unconfirmed. Crop retains the REK watermark.", "shortCredit": "Cix Liv / REK · testing mishap", "videoUrl": "https://video.twimg.com/amplify_video/1946647066626699266/vid/avc1/1200x1000/qc4wG0RW2q2C0vgI.mp4", "cropFilter": "crop=1000:670:200:330", "start": 6.2, "pause": 8.5, "end": 16.5, "sourceExcerpt": true, "setup": {"bundle": "media/derek-rig-setup.711ab43a8283.clip.js", "key": "711ab43a8283ba1aa02d7f8928069147e19d2541465caf1389269fcdcf3eccb5"}, "reveal": {"bundle": "media/derek-rig-reveal.23952e460999.clip.js", "key": "23952e460999b7c7ec241f948ba639d00f0eab39a858b802f60759e3e0c8afd5"}, "poster": "media/derek-rig-poster.d3d1d81206f8.jpg"}, {"id": "lab-thrash", "title": "Personal space", "task": "Two handlers check a robot hanging from a stand.", "question": "How does the test go?", "options": ["It drops straight to the floor.", "It gives the seated handler a gentle wave.", "It flails, drags the stand, and sends the handlers running.", "It folds its arms and stays still."], "answerIndex": 2, "answer": "It windmills its arms, drags the stand, and sends both handlers scrambling.", "punchline": "Stand back. Further.", "sourceTitle": "Jam Press / New York Post: humanoid test mishap", "sourceUrl": "https://nypost.com/2025/05/05/tech/violent-humanoid-robot-snaps-attacks-factory-workers-video/", "classification": "Reported factory or lab testing mishap, carried by New York Post with Jam Press credit. A suspended humanoid flails beside two handlers. Exact model, operating mode, date of filming, and technical cause are not independently established. No intentional attack is claimed. Source speed unlabeled.", "shortCredit": "Jam Press / New York Post · test mishap", "sourceExcerpt": true, "start": 7.5, "pause": 10.3, "end": 21.7, "setup": {"bundle": "media/lab-thrash-setup.cdd9a3f2b5a1.clip.js", "key": "cdd9a3f2b5a195e75ef02ec06195e4d3e7004b15bbba6498b53b0efe6526a10f"}, "reveal": {"bundle": "media/lab-thrash-reveal.05a25f6d40ec.clip.js", "key": "05a25f6d40ecf79764b5967ef5b5f69438f14d60ddd1af40fb6a483016ea864a"}, "poster": "media/lab-thrash-poster.9f37f7f382a3.jpg"}, {"id": "dinner-show", "title": "Dinner and a show", "task": "A robot dances beside a table at a hotpot restaurant.", "question": "What does it add to dinner?", "options": ["It bows, then sits at the table.", "It smacks the table and keeps dancing as an employee grabs it.", "It pulls out a chair for a customer.", "It trips over a chair and stays down."], "answerIndex": 1, "answer": "It smacks the table, then keeps dancing while an employee tries to restrain it.", "punchline": "The apron says “I’M GOOD.”", "sourceTitle": "ABC News / @Meooow via Storyful: dancing robot in Cupertino", "sourceUrl": "https://abcnews.com/video/131217687/", "classification": "Restaurant dance demonstration mishap, not autonomous aggression. ABC7 reported that employees attributed it to accidentally selecting a high-energy routine. Source footage by @Meooow via Storyful, carried by ABC News; visible credits retained. Source speed unlabeled.", "shortCredit": "@Meooow / Storyful / ABC News · restaurant demo", "sourceExcerpt": true, "start": 65.5, "pause": 69.0, "end": 78.3, "setup": {"bundle": "media/dinner-show-setup.963bfc5968ca.clip.js", "key": "963bfc5968ca29a25e2f150f2a224111328fcf276131d5b824404a4575415d5a"}, "reveal": {"bundle": "media/dinner-show-reveal.3f4fe7e05a26.clip.js", "key": "3f4fe7e05a26f956031103511a4bcaffc0b12c7d8592e7c5fd3926b635e9cfd0"}, "poster": "media/dinner-show-poster.8df578de0a90.jpg"}]12345678910111213141516171819202122232425262728body { padding: 2rem; font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;}
h1 { font-size: 16px; margin-top: 0;}
p { color: rgb(107, 114, 128); font-size: 15px; margin-bottom: 10px; margin-top: 5px;}
.card { max-width: 620px; margin: 0 auto; padding: 16px; border: 1px solid lightgray; border-radius: 16px;}
.card p:last-child { margin-bottom: 0;}123456789101112131415161718192021MIT License
Copyright (c) 2025 Kevin R. Whitley
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.README.md+10-5
classic.htmlAdded+526
clip-store.jsAdded+66
index.html+98-17
media/aidol-debut-poster.e822c9fc42ba.jpgAdded

media/aidol-debut-reveal.8d11dc85e96c.clip.jsAdded
media/aidol-debut-setup.0bcd9141f153.clip.jsAdded
media/atlas-cartwheel-poster.e4344c6e2a78.jpgAdded

media/atlas-cartwheel-reveal.8349393c9e91.clip.jsAdded
media/atlas-cartwheel-setup.24ace3e0a7f0.clip.jsAdded
media/controller-kick-poster.a7a0aea280ee.jpgAdded

media/controller-kick-reveal.8ccd1acef793.clip.jsAdded
media/controller-kick-setup.0074d3238dfe.clip.jsAdded
media/curb-step-poster.f9c718583d6d.jpgAdded

media/curb-step-reveal.09cf4c59ce47.clip.jsAdded
media/curb-step-setup.a09f6d24f3db.clip.jsAdded
media/derek-rig-poster.d3d1d81206f8.jpgAdded

media/derek-rig-reveal.23952e460999.clip.jsAdded
media/derek-rig-setup.711ab43a8283.clip.jsAdded
media/digit-break-poster.6354b0fee5e6.jpgAdded

media/digit-break-reveal.b4137ff4977a.clip.jsAdded
media/digit-break-setup.ef8c61b03fc0.clip.jsAdded
media/dinner-show-poster.8df578de0a90.jpgAdded

media/dinner-show-reveal.3f4fe7e05a26.clip.jsAdded
media/dinner-show-setup.963bfc5968ca.clip.jsAdded
media/flying-pot-poster.c794f25aaa48.jpgAdded

media/flying-pot-reveal.3882d8c03ca6.clip.jsAdded
media/flying-pot-setup.57a53a8d6353.clip.jsAdded
media/invisible-dish-poster.394628b02ff0.jpgAdded

media/invisible-dish-reveal.efee0915eef7.clip.jsAdded
media/invisible-dish-setup.5ec37facefbc.clip.jsAdded
media/lab-thrash-poster.9f37f7f382a3.jpgAdded

media/lab-thrash-reveal.05a25f6d40ec.clip.jsAdded
media/lab-thrash-setup.cdd9a3f2b5a1.clip.jsAdded
media/motion-copy-poster.9fc9b2c50b31.jpgAdded

media/motion-copy-reveal.606cc33ea8da.clip.jsAdded
media/motion-copy-setup.5c14a8cea07c.clip.jsAdded
media/self-toss-poster.fe7075364478.jpgAdded

media/self-toss-reveal.e1000e2fbd17.clip.jsAdded
media/self-toss-setup.611eec700ede.clip.jsAdded
media/ted-trolley-poster.b77de8726149.jpgAdded

media/ted-trolley-reveal.482f4d548493.clip.jsAdded
media/ted-trolley-setup.62f11ca01021.clip.jsAdded
peer-rooms.jsAdded+445
rooms.cssAdded+114
rooms.htmlAdded+100
rooms.jsAdded+448
rounds.jsonAdded+1
style.cssDeleted-28
vendor/itty-sockets.LICENSEAdded+21