Repository navigation
fix(stream): block Go Live without browser audio and in browsers that cannot record WebM - #833
Draft
anneoneone wants to merge 2 commits into
Draft
anneoneone wants to merge 2 commits into
anneoneone wants to merge 2 commits into
Conversation
Port of the frontend half of #825 (89f5076) to dev/312-interim. The files are the same as on main. - Go Live refuses without a captured input. It stops the socket when the recorder fails to start. - Resume a suspended AudioContext at capture, test, go-live and reconnect. - Show an error when the recorder sent no audio 5 s after start. - The test broadcast cannot be passed while 0 chunks were sent. Refs: #827
Port of #826 (1baf52d) to dev/312-interim. The files are the same as on main. Safari before 18.4 cannot record WebM, and the backend only takes WebM. - streamRecordingMimeType() picks the recording type, or returns null when the browser cannot record WebM. - The setup step shows BROWSER_UNSUPPORTED_MESSAGE and disables the test broadcast. - Go Live refuses before it opens the stream socket. Refs: #827
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
6 tasks
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The host panel no longer goes on air without browser audio, and it tells hosts when their browser cannot stream ("use Chrome or Firefox, or update Safari to 18.4"). This ports the frontend of #825 (
89f5076) and all of #826 (1baf52d) todev/312-interim. The files are the same as onmain(in prod assha-1baf52d).Issue: #827
epic-guardfails on this PR, and this needs Anton's decision..github/epic-lanes.ymlhas no rule forfrontend/**, so each file reports "not owned by Claude in lane frontend". Options: add afrontend/**rule (Codex owns that file), or a one-time exception as for #733. The backend half is a separate PR, so it can pass the guard on its own.Validation:
npm test -- --run: 184 passed.npm run lint,npm run typecheck,npm run build: ok.useAudioCapture.ts, 8 of the 14 tests inuseAudioCapture.test.tsfail.prettier --checkflags only the olduseLiveChatexport block incomposables/index.ts. It fails the same way on interim andmain, so it is left as is.MediaRecorder.isTypeSupportedthe way Safari 18.3 answers (onlyaudio/mp4).Implementation and review
Epic: #312
Executor: Claude
Lane: frontend
Reviewer: Codex
Leaf IDs: F827.1.1
Claim: #827 (comment). Done by hand at Anton's request.
Cause (show 48, 2026-10-30). Safari before 18.4 cannot record WebM, and the backend producer only reads WebM. On Safari 18.3
new MediaRecorder(...)threw. The test only said "Failed to connect to the test stream", and Go Live ignored the failedstartRecording(), so the host was "live" with silence.Change. Two commits, one per
mainPR. Each file is byte-identical tomainat1baf52d. The same files were identical onmainbefore the fixes and on interim, so nothing needed adapting.useAudioCapture.ts:streamRecordingMimeType()(WebM/Opus, else WebM, elsenull) andBROWSER_UNSUPPORTED_MESSAGE.startRecordingrefuses an ended device track or an unsupported browser and returnsfalse.resumeAudioContext(). A 5 s watchdog reportsNO_AUDIO_DATA_MESSAGEwhen no non-empty chunk was sent.FlowOnAir.vue(handleGoLive): checks the browser beforeconnect()andaudioDeviceOkbefore it connects. It shows recorder errors and callsstopStream()whenstartRecording()returnsfalse.LiveSetupTest.vue: shows the message at the top, disables "Start test", resumes the context, and does not pass the test with 0 chunks.composables/index.ts: exports the new helper and messages.Tests (
frontend/tests/useAudioCapture.test.ts): fakeAudioContext(starts suspended) andMediaRecorderwith a configurable list of supported types. They cover resume, ended track, the watchdog (fires on empty chunks, quiet with data, quiet after stop), the type choice, andstartRecordingon Safari 18.3.GitNexus impact (upstream), all LOW:
startRecording(useAudioCapture) 1 direct caller,handleGoLive(FlowOnAir) 1,startTestRecording1,setupAudioProcessing2.Not in this PR.
MediaRecorder; the new producer may get WebM clusters without the header (suspected onmain, not reproduced).useStreamSocket.ts) is onmainonly and is not ported here.