fix(webrtc): resolve native cursor drift with absolute positioning - #595
Conversation
…rsor is visible (#594) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (23)
📒 Files selected for processing (246)
📝 WalkthroughWalkthroughThis PR vendors the full WebRTC.xcframework (public headers, license, module maps, privacy manifest) for both device and simulator architectures, adds a new Xcode project with an OpenNOWWidget Live Activity extension, and introduces new SwiftUI app screens plus native WebRTC-based streaming code (audio device, HEVC codec handling, input encoding, and SDP negotiation). ChangesVendored WebRTC.xcframework
Xcode Project and Widget Scaffolding
App SwiftUI Views and Native Streaming
Estimated code review effort: 4 (Complex) | ~75 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant HomeView
participant OpenNOWStore
participant NativeStreamSDP
participant NativeStreamCodec
participant RTCPeerConnection
User->>HomeView: Selects game and launches stream
HomeView->>OpenNOWStore: request launch options / start session
OpenNOWStore->>NativeStreamCodec: resolve launch codec settings
NativeStreamCodec-->>OpenNOWStore: launch-safe codec (H264/H265/AV1)
OpenNOWStore->>RTCPeerConnection: create offer with preferred codec
RTCPeerConnection-->>OpenNOWStore: local SDP offer
OpenNOWStore->>NativeStreamSDP: buildNvstSDP(offerSDP, profile, settings, codec)
NativeStreamSDP-->>OpenNOWStore: Nvst-formatted SDP
OpenNOWStore->>RTCPeerConnection: setRemoteDescription(answer)
RTCPeerConnection-->>OpenNOWStore: negotiated video codec
OpenNOWStore-->>HomeView: session ready / streaming
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
💡 Codex ReviewFor any HTTPS request whose host ends in When a user signs in, ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…rsor is visible (OpenCloudGaming#594) (OpenCloudGaming#595) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This PR fixes native cursor overlay drift in the WebRTC client by mirroring the official GFN web client's behavior: while the client-rendered cursor_channel cursor is visible, the client sends absolute mouse position packets (input type 5) instead of relative deltas (type 7), so the server cursor is pinned to the clamped overlay position. Relative deltas remain for hidden-cursor/raw-input games.
Changes:
INPUT_MOUSE_ABSconstant andencodeMouseAbsolute()method matching the official 26-byte layout (coords at offsets 4/6, extent at 10/12, timestamp at 18)isCursorVisible()andgetAbsolutePosition()to report the clamped overlay position inside the letterboxed stream viewportTypecheck passes. All 154 tests pass.
Note
Medium Risk
Large vendored real-time media binary increases repo size and ties iOS streaming behavior to a pinned WebRTC build; upgrades need deliberate replacement and regression testing.
Overview
Adds a vendored WebRTC.xcframework under
ios/OpenNOWiOS/Frameworks/so the iOS app can link native WebRTC for device (arm64) and simulator (arm64 / x86_64), including the public Objective-C headers and license metadata.Also introduces
ios/.gitignoreto keep Xcode build output,xcuserdata, SwiftPM (.build/.swiftpm), and Carthage artifacts out of version control.Reviewed by Cursor Bugbot for commit 126f0a4. Configure here.
Summary by CodeRabbit