-
Notifications
You must be signed in to change notification settings - Fork 14
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(streamer):add streaming for cast file #1165
base: master
Are you sure you want to change the base?
Conversation
Let maintainers know that an action is required on their side
|
1d48ec6
to
3b58eca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: The ultimate goal of streaming and shadowing is shared, but the code itself is completely decoupled. What about splitting into two crates?
I suggest these:
ascii-streamer
video-streamer
orwebm-streamer
I think it’s completely fine to remove the Signal
trait and to use Arc<Notify>
directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: Is it the result of building the NPM package? This should be an artifact that we don’t checkout in the git repository, but instead build when necessary (dev machine or CI).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, let me fix that in a separate PR, and I will rebase to that one.
pub trait AsciiStreamSocket { | ||
fn send(&mut self, value: String) -> impl Future<Output = anyhow::Result<()>> + Send; | ||
fn close(self); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Do you really need a new trait, or you could work with AsyncWrite? There is an adapter to get map a websocket into a AsyncRead + AsyncWrite object:
pub fn websocket_compat(ws: WebSocket) -> impl AsyncRead + AsyncWrite + Unpin + Send + 'static { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The client need text specifically, if we send bytes it won't work.
No description provided.