|
| 1 | +<!doctype html> |
| 2 | +<html lang="en"> |
| 3 | + <head> |
| 4 | + <meta charset="UTF-8" /> |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 6 | + <title>Airbnb Deck — Presenter Mode Test</title> |
| 7 | + <script src="../../../packages/player/dist/hyperframes-player.global.js"></script> |
| 8 | + <script src="../../../packages/player/dist/slideshow/hyperframes-slideshow.global.js"></script> |
| 9 | + <style> |
| 10 | + *, |
| 11 | + *::before, |
| 12 | + *::after { |
| 13 | + box-sizing: border-box; |
| 14 | + margin: 0; |
| 15 | + padding: 0; |
| 16 | + } |
| 17 | + html, |
| 18 | + body { |
| 19 | + width: 100%; |
| 20 | + height: 100%; |
| 21 | + overflow: hidden; |
| 22 | + background: #111; |
| 23 | + } |
| 24 | + </style> |
| 25 | + </head> |
| 26 | + <body> |
| 27 | + <!-- |
| 28 | + NOTE: The <script type="application/hyperframes-slideshow+json"> island below is a |
| 29 | + COPY of the island inside index.html. This duplication is intentional: <hyperframes-slideshow> |
| 30 | + reads the island from its OWN innerHTML (not from the composition loaded by |
| 31 | + <hyperframes-player>). Keep this copy in sync with the island in index.html whenever |
| 32 | + slides, fragments, hotspots, or sequences change. |
| 33 | + --> |
| 34 | + <hyperframes-slideshow tabindex="0" sound style="display: block; position: relative; width: 100vw; height: 100vh"> |
| 35 | + <hyperframes-player |
| 36 | + style="position: absolute; inset: 0" |
| 37 | + src="index.html" |
| 38 | + ></hyperframes-player> |
| 39 | + |
| 40 | + <script type="application/hyperframes-slideshow+json"> |
| 41 | + { |
| 42 | + "slides": [ |
| 43 | + { |
| 44 | + "sceneId": "cover", |
| 45 | + "notes": "Open with the tagline. Let the Bélo breathe. This is the belonging company." |
| 46 | + }, |
| 47 | + { |
| 48 | + "sceneId": "problem", |
| 49 | + "notes": "Two problems, one at a time. Price first — hotels are expensive. Then connection.", |
| 50 | + "fragments": [9.3, 9.6] |
| 51 | + }, |
| 52 | + { |
| 53 | + "sceneId": "solution", |
| 54 | + "notes": "Platform connects hosts and travelers. Belong anywhere. Three value props." |
| 55 | + }, |
| 56 | + { |
| 57 | + "sceneId": "validation", |
| 58 | + "notes": "Couchsurfing proves demand: 660k members want this. Craigslist shows supply side." |
| 59 | + }, |
| 60 | + { |
| 61 | + "sceneId": "market", |
| 62 | + "notes": "Bottom-up: trips × take-rate = $2.1B. Use the hotspot for the drill-down math.", |
| 63 | + "hotspots": [ |
| 64 | + { |
| 65 | + "id": "mkt-hotspot", |
| 66 | + "label": "Show me the math", |
| 67 | + "target": "market-math-detail", |
| 68 | + "region": { "x": 70, "y": 80, "w": 25, "h": 12 } |
| 69 | + } |
| 70 | + ] |
| 71 | + }, |
| 72 | + { |
| 73 | + "sceneId": "product", |
| 74 | + "notes": "Three clicks: Search, Book, Travel. Show the booking flow simplicity." |
| 75 | + }, |
| 76 | + { |
| 77 | + "sceneId": "business", |
| 78 | + "notes": "10% commission. At 80k transactions × $26 avg nightly take = $2.1M revenue." |
| 79 | + }, |
| 80 | + { |
| 81 | + "sceneId": "adoption", |
| 82 | + "notes": "Events, conferences, Craigslist cross-posting, partnerships. Grass-roots growth." |
| 83 | + }, |
| 84 | + { |
| 85 | + "sceneId": "competition", |
| 86 | + "notes": "Matrix: cheapest + online + transaction. Airbnb is the only one that hits all three." |
| 87 | + }, |
| 88 | + { |
| 89 | + "sceneId": "team", |
| 90 | + "notes": "Brian (CEO/design), Joe (design), Nate (engineering). Domain depth: housing + tech." |
| 91 | + }, |
| 92 | + { |
| 93 | + "sceneId": "ask", |
| 94 | + "notes": "Raising $500K. 12 months runway. Target: 80K transactions ≈ $2M revenue." |
| 95 | + } |
| 96 | + ], |
| 97 | + "slideSequences": [ |
| 98 | + { |
| 99 | + "id": "market-math-detail", |
| 100 | + "label": "Market sizing methodology", |
| 101 | + "slides": [ |
| 102 | + { |
| 103 | + "sceneId": "market-sizing", |
| 104 | + "notes": "Bottom-up drill: global trips × budget share × online booking rate × take-rate = $2.1B." |
| 105 | + } |
| 106 | + ] |
| 107 | + } |
| 108 | + ] |
| 109 | + } |
| 110 | + </script> |
| 111 | + </hyperframes-slideshow> |
| 112 | + |
| 113 | + <!-- |
| 114 | + Sound effects play HERE, in the parent document. The composition (loaded in the |
| 115 | + player's iframe) detects slide/fragment/branch transitions and posts |
| 116 | + { type: 'hf-sfx', name } to the parent. Audio must live in the frame that |
| 117 | + receives the user's gesture (the parent) — an iframe without its own user |
| 118 | + activation is autoplay-blocked. The mp3s are in sfx/ next to this file. |
| 119 | +
|
| 120 | + Mute state is owned by <hyperframes-slideshow sound>. Listen for 'hf-sound' |
| 121 | + events (or read slideshow.muted / data-hf-muted) to skip playback when muted. |
| 122 | + --> |
| 123 | + <script> |
| 124 | + (function () { |
| 125 | + var clips = { |
| 126 | + advance: new Audio("sfx/advance.mp3"), |
| 127 | + fragment: new Audio("sfx/fragment.mp3"), |
| 128 | + "branch-enter": new Audio("sfx/branch-enter.mp3"), |
| 129 | + back: new Audio("sfx/back.mp3"), |
| 130 | + }; |
| 131 | + clips.advance.volume = 0.45; |
| 132 | + clips.fragment.volume = 0.4; |
| 133 | + clips["branch-enter"].volume = 0.4; |
| 134 | + clips.back.volume = 0.4; |
| 135 | + for (var k in clips) clips[k].preload = "auto"; |
| 136 | + |
| 137 | + // Track mute state: updated via 'hf-sound' events from the slideshow chrome. |
| 138 | + var muted = false; |
| 139 | + var slideshow = document.querySelector("hyperframes-slideshow"); |
| 140 | + if (slideshow) { |
| 141 | + slideshow.addEventListener("hf-sound", function (e) { |
| 142 | + muted = e.detail && e.detail.muted === true; |
| 143 | + }); |
| 144 | + } |
| 145 | + |
| 146 | + var unlocked = false; |
| 147 | + function unlock() { |
| 148 | + if (unlocked) return; |
| 149 | + unlocked = true; |
| 150 | + // Prime each clip (play muted then reset) so later plays are instant + allowed. |
| 151 | + Object.keys(clips).forEach(function (name) { |
| 152 | + var el = clips[name]; |
| 153 | + var v = el.volume; |
| 154 | + el.volume = 0; |
| 155 | + el.play() |
| 156 | + .then(function () { |
| 157 | + el.pause(); |
| 158 | + el.currentTime = 0; |
| 159 | + el.volume = v; |
| 160 | + }) |
| 161 | + .catch(function () { |
| 162 | + el.volume = v; |
| 163 | + }); |
| 164 | + }); |
| 165 | + } |
| 166 | + window.addEventListener("keydown", unlock, true); |
| 167 | + window.addEventListener("pointerdown", unlock, true); |
| 168 | + window.addEventListener("click", unlock, true); |
| 169 | + |
| 170 | + window.addEventListener("message", function (e) { |
| 171 | + var d = e.data; |
| 172 | + if (!d || d.type !== "hf-sfx") return; |
| 173 | + // Skip playback when muted — the component owns mute state. |
| 174 | + if (muted) return; |
| 175 | + var el = clips[d.name]; |
| 176 | + if (!el || !unlocked) return; |
| 177 | + try { |
| 178 | + el.currentTime = 0; |
| 179 | + el.play().catch(function () {}); |
| 180 | + } catch (err) { |
| 181 | + /* ignore */ |
| 182 | + } |
| 183 | + }); |
| 184 | + })(); |
| 185 | + </script> |
| 186 | + |
| 187 | + <!-- ── Presenter test harness: a Present button + 'P' shortcut ── --> |
| 188 | + <button id="present-btn" type="button">▶ Present</button> |
| 189 | + <style> |
| 190 | + #present-btn { |
| 191 | + position: fixed; top: 18px; right: 18px; z-index: 99999; |
| 192 | + font: 600 14px/1 system-ui, sans-serif; color: #0d1321; |
| 193 | + background: #f4b740; border: none; border-radius: 999px; |
| 194 | + padding: 11px 18px; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.45); |
| 195 | + } |
| 196 | + #present-btn:hover { background: #ffcb5c; } |
| 197 | + </style> |
| 198 | + <script> |
| 199 | + (function () { |
| 200 | + var isAudience = new URLSearchParams(location.search).get("mode") === "audience"; |
| 201 | + var btn = document.getElementById("present-btn"); |
| 202 | + if (isAudience) { if (btn) btn.remove(); return; } |
| 203 | + function present() { |
| 204 | + var ss = document.querySelector("hyperframes-slideshow"); |
| 205 | + if (ss && typeof ss.present === "function") { |
| 206 | + ss.present(); |
| 207 | + if (btn) btn.style.display = "none"; // hide once presenting |
| 208 | + } else { |
| 209 | + alert("slideshow not ready yet — wait a second and retry"); |
| 210 | + } |
| 211 | + } |
| 212 | + if (btn) btn.addEventListener("click", present); |
| 213 | + window.addEventListener("keydown", function (e) { |
| 214 | + if ((e.key === "p" || e.key === "P") && !e.metaKey && !e.ctrlKey) present(); |
| 215 | + }); |
| 216 | + })(); |
| 217 | + </script> |
| 218 | + </body> |
| 219 | +</html> |
0 commit comments