Repository navigation
Description
Scope and related report
This appears to be the same session-lifecycle gap described in #2131. That issue was closed with the explanation that Scrypted NVR does not support cloud cameras. This report is specifically about the official WebRTC → RTSP conversion/Rebroadcast path consumed by UniFi Protect, a third-party NVR, not cloud-camera support in @scrypted/nvr.
If this conversion path is also intentionally unsupported for long-running cloud streams, clarification would help. Otherwise, should the WebRTC → RTSP consumer drive RTCSessionControl refresh?
Pipeline and observations
Nest → @scrypted/google-device-access 0.0.99 → official WebRTC/Rebroadcast → community @apocaliss92/scrypted-onvif-rebroadcast 0.0.16 → Protect 7.3.74. Docker inside Proxmox LXC; one camera in the pilot.
- Actual stored Protect video was exported and inspected, rather than relying only on connected status.
- The WebRTC source ended around the five-minute boundary repeatedly during investigation.
- In one timed cycle, Protect reported offline then online about 10 seconds apart, recovering automatically without a restart.
- Stored recording partition timestamps spanned about 27.7 seconds across that boundary versus roughly 8 seconds ordinarily. This is consistent with a recording discontinuity, but exact missing-footage duration has not been measured; the partition delta is not an exact loss measurement.
Code observation
Current upstream createRTCPeerConnectionSource in wrtc-to-rtsp.ts obtains the session control via startRTCSignalingSession(session) and resolves sessionControl. It calls endSession() during cleanup but the file does not call getRefreshAt() or extendSession(). Installed source-map inspection showed the same omission.
Meanwhile NestRTCSessionControl provides a roughly four-minute refresh deadline and implements ExtendWebRtcStream.
This matches #2131's diagnosis; that report's measurements are not being presented as measurements of this installation. The community ONVIF plugin wraps/proxies the rebroadcast stream, rather than implementing Google session extension.
Candidate fix / ownership question
Could the owning WebRTC → RTSP consumer schedule extendSession() from getRefreshAt(), reschedule after success, and cancel on teardown or failure? It would need to avoid overlapping calls, retry loops, and extending ended sessions, and respect device/API restrictions. This is not a claim that every Nest camera supports indefinite extension.
A camera-scoped local experiment scheduling those existing methods is in progress. It is not yet a verified fix or submitted patch. A fake session-control regression test could exercise refresh, rescheduling, and cancellation without Google credentials.
Happy to narrow this further if another component is meant to own refresh, or if discussion should continue on #2131 instead.
Activity