GeezerVison is showing github.com — feat: add simulator audio to WebRTC streams by DjDeveloperr · Pull Request #74 · NativeScript/SimDeck
Conversation
Summary
- Add simulator and Android emulator audio to the WebRTC live stream alongside H.264 video.
- Capture per-simulator host audio with Core Audio process taps scoped to the selected iOS simulator or Android emulator process tree.
- Encode captured tap samples as browser-native Opus at 48 kHz stereo instead of telephone-grade PCMU/G.711.
- Keep the WebRTC audio packet clock independent from Core Audio tap refreshes, so slow process discovery or tap rebuilds cannot starve browser playback into tiny snippets.
- Drop stale encoded audio packets when the sender falls behind under host CPU pressure, so the live stream resumes at the newest audio instead of replaying a delayed crackly backlog.
- Suppress direct simulator/emulator hardware output while the tap is active, so audible playback comes through the browser WebRTC audio element only when Sound is unmuted.
- Keep the web Sound toggle muted by default, harden simulator/runtime/accessibility metadata rendering against non-string payloads, and recover a blank browser boot with a one-shot root watchdog reload.
Notes
- macOS 14.2+ is required for Core Audio process taps.
- Android emulators launched by SimDeck keep host audio enabled so there is audio for the process tap to capture; the active tap mutes direct hardware output and routes encoded Opus packets into WebRTC.
- The legacy H.264 WebSocket fallback remains video-only.
Testing
npm run lint
npm test
npm run build:cli
npm run build:client
cargo test --manifest-path packages/server/Cargo.toml transport::webrtc::tests:: -- --nocapture
- Headless WebRTC audio check against
http://127.0.0.1:4313/?device=817F1550-0970-42A3-8643-30B896495DBD&stream=webrtc for 10s with SIMDECK_E2E_ENABLE_AUDIO=1 SIMDECK_E2E_MIN_AUDIO_PACKETS=300: passed with directAudioPacketsDelta=658, audioPacketsLost=0, audioConcealedSamples=0, and audioSilentConcealedSamples=0.
- Reloaded the in-app browser on
4313 after rebuilding/restarting the service; fixed bundle index-B3KzZIJW.js rendered video and accessibility overlay nodes with no fresh console errors, and metrics reported WebRTC connected.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
May 31, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Important
Review skipped
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 4461030b-e76f-4834-8338-7bbb732b99d3
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
add-simulator-audio-streaming
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment @coderabbitai help to get the list of available commands and usage tips.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
DjDeveloperr
changed the title
feat: switch live stream client to WebRTC transport
feat: add simulator audio to WebRTC streams
Jun 1, 2026
Deploying simdeck with Cloudflare Pages
View logs
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This branch has not been deployed
No deployments
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.