Feature: stream recording support#142
Merged
zortos293 merged 17 commits intoOpenCloudGaming:devfrom Mar 9, 2026
Merged
Conversation
…s, and update pointer lock handling
…rmat subscription info
…nd management in StreamView
…djust related functionality
- Introduced `requestKeyframe` method in GfnSignalingClient to send keyframe requests with reason, backlog frames, and attempt count. - Added IPC handler for keyframe requests in the main process. - Updated preload API to include `requestKeyframe` method. - Enhanced StreamView component to manage sidebar tabs for preferences and shortcuts. - Implemented decoder pressure detection and recovery mechanisms in GfnWebRtcClient, including bitrate reduction and keyframe requests. - Updated diagnostics to track decoder pressure state and recovery attempts. - Styled sidebar tabs for better user experience.
…hot shortcut error handling
- Introduced new settings for recording shortcuts in settings.ts and App.tsx. - Implemented recording API methods in preload/index.ts for starting, stopping, and managing recordings. - Enhanced StreamView component to handle recording state, display recording controls, and show recordings in a sidebar. - Added CSS styles for recording indicators and recording cards in styles.css. - Updated IPC channels in ipc.ts to support recording operations. - Defined new types for recording requests and entries in gfn.ts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds stream recording support to OpenNOW, allowing users to record their GeForce NOW sessions directly from the client. Recordings are captured via the browser's
MediaRecorderAPI, streamed in chunks to the main process, and saved to disk as MP4 or WebM files.Changes
Main Process (
src/main/index.ts)MediaRecorderEnableMp4MuxerChromium feature flag to support MP4 output viaMediaRecorder(Chromium 127+).RECORDING_BEGIN— allocates a temp write stream and returns arecordingIdRECORDING_CHUNK— streams binary chunks from the renderer to the temp fileRECORDING_FINISH— finalises the recording, encodes an optional thumbnail, renames the temp file to its final timestamped name (with duration encoded), and enforces a 20-recording limit (oldest auto-deleted)RECORDING_ABORT— cancels an in-progress recording and removes the temp fileRECORDING_LIST— reads the recordings directory and returns metadata for all saved recordings (including base64-encoded thumbnails)RECORDING_DELETE— deletes a recording and its thumbnailRECORDING_SHOW_IN_FOLDER— reveals a recording in the system file manager viashell.showItemInFolder~/Pictures/OpenNOW/Recordings/with filenames encoding the game title, timestamp, and duration.assertSafeRecordingId).Preload (
src/preload/index.ts)window.openNow:beginRecording,sendRecordingChunk,finishRecording,abortRecording,listRecordings,deleteRecording,showRecordingInFolder.Renderer — StreamView (
src/renderer/src/components/StreamView.tsx)isRecording,recordingDurationMs,recordings,recordingError.startRecording/stopRecordingusingMediaRecorderon the stream's video track, with chunk streaming to the main process.recordingApiAvailableguard ensures controls are only shown when the preload API is present.App (
src/renderer/src/App.tsx)onRecordingShortcutChangeprop to persist the recording shortcut via settings.Settings (
src/main/settings.ts)recordingshortcut key to the persisted settings schema.Shared Types (
src/shared/gfn.ts,src/shared/ipc.ts)RecordingEntry,RecordingBeginRequest,RecordingBeginResult,RecordingChunkRequest,RecordingFinishRequest,RecordingAbortRequest,RecordingDeleteRequestinterfaces.shortcutToggleRecordingto theOpenNowAPIinterface.RECORDING_*IPC channel constants.Styles (
src/renderer/src/styles.css)Notes
<stem>-thumb.jpg).