Skip to content

Conversation

@seydx
Copy link
Contributor

@seydx seydx commented Mar 16, 2025

During my tests with camera.ui, I encountered the following issue:

After I paired a HomeKit camera using go2rtc, and later deleted it through the API (without unpairing it), I was no longer able to unpair the camera. In HomeKit Discovery, the camera was shown as paired, without the possibility to unpair it.

Refactoring and code simplification (due to circular dependencies)

  • Removed the findHomeKitURLs and findHomeKitURL functions from internal/homekit/api.go and internal/homekit/homekit.go, respectively, and replaced their usage with the new streams.FindPrefixURLs and streams.FindPrefixURL functions.
  • Added FindPrefixURL and FindPrefixURLs functions to internal/streams/helpers.go to handle URL finding logic based on a prefix.

Dependency updates:

  • Added the hap package to internal/streams/api.go for handling HomeKit unpairing.

Enhancements to stream deletion:

  • Updated the apiStreams function in internal/streams/api.go to unpair HomeKit streams before deletion.

@AlexxIT AlexxIT self-assigned this Mar 16, 2025

"github.com/AlexxIT/go2rtc/internal/api"
"github.com/AlexxIT/go2rtc/internal/app"
"github.com/AlexxIT/go2rtc/pkg/hap"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this dependency in this module. The streams module does not need to know about the existence of any particular source.

@AlexxIT AlexxIT added the doubt label Sep 30, 2025
@AlexxIT AlexxIT removed their assignment Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants