Hi everyone, I’m currently working on integrating my Google Nest Camera into a custom JavaScript application using the Google Smart Device Management (SDM) API. While the video stream works perfectly, I’m facing some challenges with the audio functionality. Here’s what I’ve encountered and what I’m hoping the community can help me with.
The Setup:
I’m using a Google Nest Camera (Indoor model) and have set up a local server with Node.js and an HTML frontend. The goal is to enable both one-way and two-way audio streaming from the camera. Everything is running smoothly for video, but the audio isn’t behaving as expected.
The Issues:
-
No Audio Playback: Despite the camera’s microphone being functional (as confirmed by the Nest app), I’m getting no sound from the camera in my custom setup. The audio track unmutes, but the buffer shows all zeros, and there’s no sound through my laptop speakers. This is puzzling since the hardware works fine elsewhere.
-
Two-Way Audio Failure: When attempting to enable two-way audio by renegotiating the WebRTC connection, I encounter an SDP error. The renegotiation process incorrectly adds a second
m=audioline, which breaks the required SDP structure. This prevents the two-way audio from functioning properly.
What I’ve Tried:
- Verified microphone access and permissions in the browser.
- Checked the initial and answer SDP offers to ensure they include the correct audio codecs and directions.
- Adjusted the renegotiation process to avoid adding duplicate
m=audiolines, but this hasn’t resolved the issue.
Looking for Answers:
I’d greatly appreciate any insights or suggestions from those who might have encountered similar issues or have experience with WebRTC and the SDM API. Specifically, I’m curious about:
- Why the audio buffer remains silent despite the camera’s answer SDP indicating two-way capability.
- Whether there’s a specific API call or setting I’m missing that could enable the microphone.
- How to correctly renegotiate the connection for two-way audio without breaking the SDP structure.
If anyone has dealt with this or has tips on troubleshooting WebRTC audio issues, I’d be incredibly grateful for your guidance. This community has been invaluable in the past, and I’m hopeful for some solutions here!
Thanks in advance for your help!