type: voice, Requirement.value, playable resource cards
A voice requirement records in the browser and ships PCM to the relay
as one binary frame (voice.js, same mount/stop contract as gesture);
its value becomes {key, digest, duration_ms}. Requirement.value
presets a field and, on a dynamic page, takes the URL segment - so
value: "{key}" tells the voice field where to record. A url resource
source takes the segment too. Resource items with an https `audio`
field render an <audio> player. The gesture widget reports picks to
the relay for ranking.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
39fdb8e0e9
commit
07776be2bb
@@ -448,6 +448,57 @@ main.not-found {
|
||||
margin-bottom: 0.15em;
|
||||
}
|
||||
|
||||
/* voice field (voice.js): a record button, a status line, a preview */
|
||||
.voice-wrap {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.6rem 1rem;
|
||||
}
|
||||
|
||||
.voice-button {
|
||||
font: inherit;
|
||||
padding: 0.55rem 1.1rem;
|
||||
border: 0.06rem solid var(--accent);
|
||||
border-radius: 2rem;
|
||||
background: transparent;
|
||||
color: var(--ink);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.voice-button:hover:not(:disabled) {
|
||||
background: var(--accent);
|
||||
color: var(--paper);
|
||||
}
|
||||
|
||||
.voice-button.recording {
|
||||
background: var(--accent);
|
||||
color: var(--paper);
|
||||
animation: voice-pulse 1.2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.voice-button:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
@keyframes voice-pulse {
|
||||
50% { opacity: 0.6; }
|
||||
}
|
||||
|
||||
.voice-status {
|
||||
font-size: 0.85rem;
|
||||
color: var(--ink-dim);
|
||||
}
|
||||
|
||||
.voice-preview,
|
||||
.item-card-audio {
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-width: 28rem;
|
||||
margin-top: 0.4rem;
|
||||
}
|
||||
|
||||
/* links inside markdown descriptions */
|
||||
.alt-description a,
|
||||
.feature p a {
|
||||
|
||||
Reference in New Issue
Block a user