Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(wt_video): implement cursor position #386

Conversation

TheButlah
Copy link
Collaborator

@TheButlah TheButlah commented Feb 24, 2025

Extends the functionality of the demo to include streamed control inputs, such as the location of the mouse. This is accomplished by introducing a new unidirectional stream from the browser to the server. This byte-oriented reliable stream is framed using tokio-util's framing mechanism, specifically the length delimited framing. This converts the AsyncRead into an async Stream<Item=Bytes>. Then, we use tokio-serde to convert that stream to a Stream<Item=MyEnum>, where the bytes are deserialized as json using serde. Finally we introduce a select statement in the server to dispatch the different events to their respective event handlers.

@TheButlah TheButlah force-pushed the ryanbutler-orbs-364-implement-cursor-position-detection-in-wt_video-demo branch 4 times, most recently from 29fbc02 to 4fb68ca Compare February 24, 2025 22:49
@TheButlah TheButlah marked this pull request as ready for review February 24, 2025 22:50
@TheButlah TheButlah force-pushed the ryanbutler-orbs-364-implement-cursor-position-detection-in-wt_video-demo branch from 4fb68ca to 8597621 Compare February 24, 2025 22:54
@TheButlah TheButlah force-pushed the ryanbutler-orbs-364-implement-cursor-position-detection-in-wt_video-demo branch from 8597621 to 08e24ff Compare February 25, 2025 14:22
@TheButlah TheButlah enabled auto-merge (squash) February 25, 2025 14:23
@TheButlah TheButlah merged commit bcbdae9 into main Feb 25, 2025
16 checks passed
@TheButlah TheButlah deleted the ryanbutler-orbs-364-implement-cursor-position-detection-in-wt_video-demo branch February 25, 2025 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants