-
Notifications
You must be signed in to change notification settings - Fork 27
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
[question] snapstream in a separate thread .. #40
Comments
Without deep knowledge about this I would guess your best bet is to follow WebAudio/web-audio-api#2423 |
It seems that going this way is takling the limits of what Chromium can do ... I've looked at the source code in snapstream.js and I wonder if putting all the websocket thing in a web worker, all the rest (sending audio) in the main thread would solve the problem, but it's too complicated to do for me and I'm not sure if it will work as expected. I'll simply live with the separate snapclient for now I think .. |
You might find some inspiration at https://github.com/geekuillaume/soundsync/tree/master/src/audio but note the project itself is webrtc based rather than tcp sockets so it's a little different. |
Finally, I've done it the other way. |
Hello,
I've integrated a javascript snapstream in a web application of my own, basically a remote controlled audio player ( a python flask webserver embding a gstreamer playbin sending audio data to snapserver and a mongoDB database with a webapp as "controller", works like mopidy for the comparison ... )
I can clearly play the audio on the "controller" webapp, no problem with that.
But when I have a big content response from one of my API endpoint, the audio is stuttering 1-2 seconds due to the temporary heavy processing of the request response.
Is there a way to put a javascript snapstream object in a Web Worker ? I believe not, because there's no audiocontext in a Web Worker ... So is there an other way ? I'm not familiar with Web Audio API ...
I wonder if somebody knows what I can do ...
The text was updated successfully, but these errors were encountered: