Fix video/audio ssrc and low power cameras

This commit is contained in:
seydx
2025-10-26 16:39:59 +01:00
parent bd8e4fa298
commit 863174839c
5 changed files with 122 additions and 24 deletions
+7
View File
@@ -117,6 +117,10 @@ func (c *TuyaCloudApiClient) Init() error {
return fmt.Errorf("failed to start MQTT: %w", err)
}
if c.skill.LowPower > 0 {
_ = c.mqtt.WakeUp(c.localKey)
}
return nil
}
@@ -212,6 +216,9 @@ func (c *TuyaCloudApiClient) loadWebrtcConfig() (*WebRTCConfig, error) {
return nil, err
}
// Store LocalKey (not sure if cloud api provides this, but we need it for low power cameras)
c.localKey = webRTCConfigResponse.Result.LocalKey
iceServers, err := json.Marshal(&webRTCConfigResponse.Result.P2PConfig.Ices)
if err != nil {
return nil, err