From 9eb40ce614374604ebdd1e5cd677a0c698077a43 Mon Sep 17 00:00:00 2001 From: b1rdmania <102524336+b1rdmania@users.noreply.github.com> Date: Thu, 18 Dec 2025 23:21:41 +0000 Subject: [PATCH] Add iOS 'Enable Audio' CTA for Motif playback. --- embed.html | 1 + index.html | 57 +++++++++++++++++++++++++ src/embed.ts | 33 +++++++++----- src/main.ts | 118 +++++++++++++++++++++++++++++++++++++++++++++------ 4 files changed, 186 insertions(+), 23 deletions(-) diff --git a/embed.html b/embed.html index 1251409..685cfa9 100644 --- a/embed.html +++ b/embed.html @@ -221,3 +221,4 @@ + diff --git a/index.html b/index.html index 3e4d008..021a5fb 100644 --- a/index.html +++ b/index.html @@ -429,6 +429,53 @@ font-size: 0.85em; min-width: 55px; } + + /* iOS audio unlock (Motif) */ + .ios-audio-banner { + margin-top: calc(var(--spacing-unit) * 2); + padding: calc(var(--spacing-unit) * 2); + border-radius: var(--radius); + border: 1px solid rgba(255, 170, 68, 0.22); + background: rgba(0, 0, 0, 0.25); + box-shadow: var(--shadow-sm); + display: none; /* toggled by JS */ + } + .ios-audio-banner .row { + display: flex; + gap: calc(var(--spacing-unit) * 1.5); + align-items: center; + flex-wrap: wrap; + } + .ios-audio-banner .copy { + font-size: 12px; + color: var(--color-text-dim); + line-height: 1.35; + flex: 1; + min-width: 220px; + } + .ios-audio-banner .copy strong { + color: var(--color-text); + font-weight: 600; + } + .ios-audio-banner .state { + margin-top: calc(var(--spacing-unit) * 1); + font-size: 12px; + color: rgba(255, 170, 68, 0.85); + display: none; + } + .ios-audio-banner button { + padding: calc(var(--spacing-unit) * 1.25) calc(var(--spacing-unit) * 2); + border-radius: var(--radius); + border: 1px solid rgba(255, 170, 68, 0.35); + background: rgba(255, 170, 68, 0.12); + color: var(--color-text); + box-shadow: var(--shadow-sm); + font-weight: 600; + } + .ios-audio-banner button:hover:not(:disabled) { + border-color: rgba(255, 170, 68, 0.55); + box-shadow: var(--glow-secondary), var(--shadow-md); + } .motif-kicker { font-size: 0.85em; color: #b6b6b6; @@ -687,6 +734,16 @@ +
+
+
+ iOS Safari: tap once to enable audio, then press Generate & Play. +
+ +
+
Audio: …
+
+