startVideoStream function to live stream a client screen#43
Open
SuperCraft3M wants to merge 1 commit into
Open
startVideoStream function to live stream a client screen#43SuperCraft3M wants to merge 1 commit into
SuperCraft3M wants to merge 1 commit into
Conversation
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.
This pull request introduces a new "live relay" streaming mode for video capture, allowing real-time streaming of WebM segments directly to a callback without writing to disk. This enables low-latency, gap-free playback via MediaSource Extensions (MSE) on the client side. The implementation adds a new
startVideoStreamexport, updates capture options to support chunk size tuning for latency, and introduces new logic for segmenting and relaying live WebM streams. Documentation and type definitions are updated accordingly.Live relay streaming support:
startVideoStreamserver-side export, which starts a continuous video capture and relays live MSE-appendable WebM segments (init + media) to a providedonSegmentcallback, supporting real-time streaming use cases. [1] [2] [3] [4] [5] [6] [7] [8]StreamSegment,StreamSegmentFn) and extendedStreamUploadDataandCaptureOptionsto support relay mode, segment callbacks, and chunk size configuration. [1] [2] [3] [4]WebM segment framing and relay logic:
webm-stream.tsimplementing logic to split the continuous WebM byte stream into MSE-appendable segments (initandmedia) and invoke theonSegmentcallback in real time.Capture options and configuration:
streamChunkSizeoption to capture requests (client and server), allowing tuning of WebM output chunk size to trade off latency versus overhead. Defaults to 800 KiB if not specified. [1] [2] [3] [4]Documentation:
README.mdwith detailed documentation and usage examples for the newstartVideoStreamexport, including explanation of segment structure, options, and integration with MediaSource Extensions. Also updatedstopVideoCapturedocs to reference the new streaming mode. [1] [2]Every comment on the files an this description is made by AI btw. All the code is done by myself.