lotus(#3): harden audio-inject per review
CI / Build embedded bundle (push) Successful in 3m22s
CI / Publish to Gitea npm registry (push) Has been skipped

- resume() the AudioContext (host postMessage isn't a gesture) so the clip
  isn't silent; warn if it stays suspended (HIGH).
- Close the AudioContext on decode failure (no context leak) (MED).
- Abort in-flight clips on teardown (unmount/vm-change/leave) so audio
  doesn't keep blasting to peers (MED).
- Stop the cloned MediaStreamTrack when a room publish fails (MED).
- Validate url is https/blob and fetch with credentials:omit, mode:cors
  (MED security).
- Guard against NaN clip duration; fix stale enum doc comment.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Lotus CI
2026-06-29 23:26:45 -04:00
co-authored by Claude Opus 4.8
parent 6d739db8b8
commit 10e6ba46e2
2 changed files with 62 additions and 15 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ export enum LotusWidgetActions {
CallState = "io.lotus.call_state",
/** toWidget: pin/spotlight (or clear, with userId=null) a participant. */
FocusParticipant = "io.lotus.focus_participant",
/** toWidget: mix an audio clip into the local published mic track. */
/** toWidget: play an audio clip into the call as a separate published track. */
InjectAudio = "io.lotus.inject_audio",
/** toWidget: set audio/screenshare encoding quality (bitrate/framerate). */
SetQuality = "io.lotus.set_quality",