Skip to content

Fix streams list failing when a stream has WHIP/WebRTC push producers#345

Open
eric-benjamin wants to merge 1 commit into
home-assistant-libs:mainfrom
eric-benjamin:fix-optional-producer-url
Open

Fix streams list failing when a stream has WHIP/WebRTC push producers#345
eric-benjamin wants to merge 1 commit into
home-assistant-libs:mainfrom
eric-benjamin:fix-optional-producer-url

Conversation

@eric-benjamin

Copy link
Copy Markdown

Fixes #344.

Producers created by pushing into go2rtc (WHIP ingest / WebRTC push) have no "url" key in the /api/streams payload — there is no source URL, the media was pushed. The strict decoder required Producer.url, so a single pushed stream anywhere made the entire streams list undecodable, which in Home Assistant breaks every camera still (async_get_image) and WebRTC offer in the instance while a publisher is connected.

  • Make Producer.url optional, matching what go2rtc actually reports
  • Add a fixture with a real WHIP producer payload (captured from go2rtc v1.9.14) and a test_streams_get case for it

Same category as #21, which handled producers itself being null.

🤖 Generated with Claude Code

Producers created by pushing into go2rtc (WHIP ingest, WebRTC push) have no
"url" key in the /api/streams payload — there is no source URL, the media
was pushed. The strict decoder required Producer.url, so a single pushed
stream anywhere made the entire streams list undecodable.

Make Producer.url optional, matching what go2rtc actually reports.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Streams list decode fails when any stream has a WHIP/WebRTC push producer (Producer.url missing)

2 participants