-
-
Notifications
You must be signed in to change notification settings - Fork 128
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
Websocket support for harbor #90
Conversation
On the road towards bug #60.
Now we have to really start implementing the websocket protocol...
Now waiting for Romain to polish this code... ;)
@@ -42,8 +46,9 @@ object (self) | |||
~log ~kind ~overfull:(`Drop_old max_ticks) `Undefined) | |||
~empty_on_abort:false ~bufferize as generated | |||
|
|||
(** POSIX sucks.. *) |
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.
POSIX doesn't suck anymore? :-)
Excellent, thanks! It looks cool, I'll take it from there and cleanup/split harbor code and finish the protocol. |
Does this work with the server and lame.html in the test directory? I added a harbor input on port 9000, switched the port number in lame.html,t started the httpserver and hit the record button. Looked like the browser was writing to the websocket a little bit, then stops. Looking at the liquidsoap logs, liquidsoap didn't get a new habor connection. 😕 |
Hi @mcfiredrill! I think you did the right tests. However, this is still pretty much work in progress for now (hence the WIP in the PR title above). Sam did a great job at laying down the initial work but we still need to cleanup and generalize it. I plan on getting back to this ASAP. |
Cool! Looking forward to it. Wish I could help out in some way but there's not much I can do with my nonexistant ocaml skills heh... |
@mcfiredrill the test is now properly working! Only raw data can be sent for now though. |
Actually, lame mp3 encoding is working too now! |
module Generator = Generator.From_audio_video | ||
module Buffered = Decoder.Buffered(Generator) | ||
|
||
(* TODO: we don't want a file decoder, do we? *) |
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.
Please no! :-)
Looking good! I'll have a final pass on it this week end, write the docs for the protocol and BAM!, merge! |
Awesome! 👍 👍 👍 👍 👍 👍 |
Eh sorry, didn't read the README. I'll read that and be back.... |
I got it to work, mostly. It wouldn't work with any mount name other than 'mount'. The sound was pretty choppy for some reason. But anyway, amazing work! I'll keep trying it out... |
Thanks for testing! Concerning the mount point you have to change it both in the server The reason why it is choppy I guess is that mp3 encoding is done in javascript, which is quite cpu intensive... Let's hope that some native support will be added in future HTML5 audio API. You could also try |
As Sam says, this all depends on technologies that are still being asm.js is mozilla's restricted javascript subset, which can be Let's hope that firefox implements audio APIs soon, that would make it Romain |
…reading (with timeout) when websocket got a text frame.
No description provided.