Add /api/webrtc/camera_stream_source
#472
Open
+29
−1
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.
This functionality has been available in https://github.com/felipecrs/hass-expose-camera-stream-source for a while now, and it has received plenty of good feedback. It seems that several people rely on it to import their cameras from Home Assistant to go2rtc.
I believe it's time to upstream the work now, so maybe it will be easier for people to find it and use it.
I'm adding the same functionality but exposed through a different API endpoint (
/api/webrtc/camera_stream_source
). If you believe there is a better name for it, I'd be happy to change it.Naturally, the next step would be to refactor the
hass
module in go2rtc to use this new endpoint instead of the current approach of reading the Home Assistant.storage
files, which should enable more users to import their cameras from Home Assistant to go2rtc.Not only that, the current module only allows add-on users to import their cameras. The new approach would allow people running go2rtc from anywhere to import their cameras (provided we need to handle credentials).
What do you think?