-
Notifications
You must be signed in to change notification settings - Fork 25
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
Stream Audio #23
Comments
Hi @sigmaSd, I like so much this feature! I will work to add the possibility of modifying a current action :) |
Also current api expects a commands with ? I think it should also account for special key press For example I imagine sending audio like whatsaps, you hold a key like ctrl space while recording, then when you release the key it get sent. |
The problem with keys is that in the terminal you have not a "key release" event. So the behavior of running an action during holding a key could be difficult to emulate :S Regarding to dispatch an action at keypress, could be aliasing sending a "?command" when the key pressed in detected |
Sticking with ?command is fine. And since the code base is nicely organized maybe in the future you can add another frontend like gtk which will enable this and some other cool things like streaming video maybe |
I like so much the idea of the video. Maybe, even parse the video into some asciI format could be really cool and something not seen :D |
Ascii video is definitly a crazy idea! |
https://github.com/ecumene/rust-sloth the hardest part which is rendering is possible apperently |
Something like https://github.com/mazy1998/asciiVideo integrated in termchat will defently be next level |
We would need something like https://github.com/mazy1998/asciiVideo but implemented in rust. In the future it could be the competition of zoom! 😄 |
xD |
I was thinking about this. It is reachable with the new API using the
Instead of modifying the acreated action, it's the action which read the state to modify itself |
I add streaming video to termchat https://github.com/lemunozm/termchat/compare/master...sigmaSd:video?expand=1 Any suggestion on how to actually use your api correctly ? I tried your idea of putting the information in state but that still wasn't enough |
It works quite well actually! 2 limitations:
|
Hi @sigmaSd, I tested your branch and looks really good!
Somewhere in particular? Additional points:
|
Hi @lemunozm I applied some of your suggestions here 64ba021 The panic is problematic, I think the disconnect should be handled by RemoveEndpoint message, but there is a time before that message arrive where the stream is still sending frames Since send doesn't return an error anymore I'm not sure how to handle this, with the error you could immediately react to the disconnection, but now you have to wait for a disconnect message while some things may happen before it arrives |
For reference to add audio to the stream, I think cpal crate should make it easy. https://github.com/RustAudio/cpal/blob/master/examples/feedback.rs |
I think that sending the RemoveEndpoint event with priority in the callback located in |
I tried with send_with_priority but its still paniced unfortunately. I opened a pr here #24 we can continue the discussion there. |
@lemunozm regarding asciivideo, https://github.com/sigmaSd/term_cam/blob/master/src/main.rs |
Wow!! It looks really cool :) I can't wait to see it in termchat! 😃 I suppose that using the |
@lemunozm Any idea about how to integrate it in termchat, like where to put the video? What about something like:
|
Or maybe a side panel that appears when a live cam feed appears. |
I opened an issue to keep the conversation there :) |
Hello @lemunozm , I'm trying to add streaming audio with https://github.com/libcala/wavy crate here is a poc https://gist.github.com/sigmaSd/30d0e2b1b6bf9bdf85ea60034e8823d4 The problem this requires and async executor, I'm not sure how well it integrates in termchat. Feel free to comment here ardaku/fon#6 (reply in thread) for ideas. |
Here is another poc this time integrated into termchat https://github.com/lemunozm/termchat/compare/master...sigmaSd:audio_wavy?expand=1 The current problems:
|
I updated the branch to use futures::executor and it works now. The problem is performance, it spins the cpu a a lot. |
This is just a test for the new api,
Here is a hack https://github.com/lemunozm/termchat/compare/master...sigmaSd:audio?expand=1
Commands:
?sa send audio | ?sas stop audio sending | ?ra receive audio | ?ras stop receiving audio
Works only on linux and ?ra needs to be called before ?sa or aplay wont understand the stream
New api shortcomings:
The text was updated successfully, but these errors were encountered: