Rantanen / mumble-web

Node.js browser client for Mumble
MIT License
56 stars 5 forks source link

Documentation #1

Open TheRadialActive opened 10 years ago

TheRadialActive commented 10 years ago

This seems to be a very cool web client. I would like to set it up and try it, but I couldn't find any documentation. Is there any? Does the client still work? I'm not used to node.js, so some advice would really awesome. Or do you have a demo instance?

Rantanen commented 10 years ago

Google's libjingle is deprecated so Rantanen/node-peerconnection doesn't work currently. This means the voice over browser won't work unfortunatley. I haven't had time to look into the new libwebrtc to see whether that one has a more stable API that doesn't require new builds every second week.

velegip commented 9 years ago

Any changes ? @Rantanen

Rantanen commented 9 years ago

Couple of weeks ago I finally started a project to implement ICE/WebRTC in JavaScript.

Unfortunately WebRTC is a large collection of technologies:

I've got initial implementation of STUN done so the browser is now able to negotiate UDP ports to use. The next thing the browser wants to do is exchange the encryption keys for SRTP, which is encrypted with DTLS. Unfortunately Node.js lacks DTLS support (joyent/node#6704), so I've now been working my way through the DTLS spec and implementing it in JavaScript.

So short answer: No meaningful changes for mumble-web yet, but work in progress that I could continue it without libjingle/libwebrtc.

velegip commented 9 years ago

Thank you!

almereyda commented 9 years ago

@opn Solving this issue would be a requirement for integrating Mumble Clients in the http://Viral.Academy DAO-based learning environment. Should we offer a small bounty?

drunlade commented 8 years ago

I got all excited when I spotted a web client existed, sounds like its a bit dead in the water though, given the lack of any code changes for a number of years.

Rantanen commented 8 years ago

Unfortunately that is true. A web client (without flash/etc) would require server-side support for WebRTC. While WebRTC isn't TOO difficult to implement as far as I figured while reading the specs, it does depend on DTLS which isn't available in Node.

So this is kind of pending on nodejs/node#2398

Edit: Which has been pending since 2013: nodejs/node-v0.x-archive#6704

drunlade commented 8 years ago

Yeah I spotted you mention that, though a while back. It's a damn shame since a web-based mumble client could do some really interesting stuff. For one thing it'd be an excellent conferencing tool... "Join this URL to connect to the morning conference call" type stuff. Integrate it into complicated web-app software for real-time-voice tech support. With a bit of fiddling, I don't see much of a barrier to adding some sort of video support as well.

Rantanen commented 8 years ago

Yeah. That was my goal - and still is. Just waiting for that DTLS implementation more or less. :(

drunlade commented 8 years ago

Interesting reading those threads. Sounds like there is actually a fair bit of demand and interest for the feature, but a surprising lack of progress/action on the issue. Here's hoping it's being progressed somewhere behind the scenes!

amkgo commented 7 years ago

Have you ever checked the Discord web interface. Maybe we can get some idea from it.

Rantanen commented 7 years ago

Discord isn't open source.

The client implementation is trivial thanks to WebRTC. It's the server/murmur side that's challenging. This project is based on top of node.js, which lacks the support.

Someone else could still try to have a go at it on top of another platform - maybe even Qt and integrate it straight into murmur.

amkgo commented 7 years ago

How about this Alternative Mumble server written in Go?

Rantanen commented 7 years ago

That's just murmur implemented in Go. We could already build something similar in Node.js using node-mumble (even if that one is currently a client-implementation).

The problem is, that web browsers can't use that. If we want a way for web browsers to connect and send audio to a mumble server, that mumble server must support WebRTC.

Technically we could work around that limitation by using Flash or maybe writing browser-specific browser extensions, but I'm in no way interested in doing either of those.

If you can find a Node.js based WebRTC implementation that supports audio (there are few WebRTC libraries for Node.js that support the data channel floating around) I could pick this up again. (Alternatively a Rust-based implementation would tickle my interest as well.)

And just to clarify, "WebRTC implementation" here refers to an implementation that can act as a WebRTC peer connection. There are various projects that claim to be "WebRTC servers", while in reality these do nothing but simplify the handshake between two browser peers.

Robbilie commented 7 years ago

hey @Rantanen , quite some time i created an issue because i was so fascinated by the idea to have a mumble web client only to see you stop working on it for obvious reasons…

2 days ago someone brought up this idea again while discussing discord alternatives and i wanted to work on merging a xmpp and mumble server into a browser based ui which shouldnt be too hard having access to your beautiful mumble bindings…

i remembered that webrtc didnt work, tried some stuff with sending the arraybuffers via websockets and outputting them (semi successful, i heard noises :D) but couldnt imagine that there was rly no easy way to do it and stumbled over this:

https://github.com/js-platform/node-webrtc/

only to read that only datachannels are supported when i was nearly done… there seem to be some ppl trying to implement the media stuff though, namely this guy:

https://github.com/alexanderb14/node-webrtc-mediastream/

reading code and comments, @alexanderb14 and @markandrus seem to be working on some stuff…

isnt that what we need to get the streaming of audio working again or am i missing something?

Rantanen commented 7 years ago

Yeah that seems like it would do the job. I'm a bit disappointed in the prerequisites which make it difficult to have a user-installable solution as well as having a solution working on Windows platform.

Based on what they advertise though, it should do the job if you can get it installed.

Robbilie commented 7 years ago

i cant get alex's version to run bc smthng smthng

../src/binding.cc:4:48: fatal error: webrtc/api/peerconnectioninterface.h: No such file or directory
 #include "webrtc/api/peerconnectioninterface.h"
                                                ^

and the normal repo also doesnt work and i have to manually compile bc of this: https://github.com/js-platform/node-webrtc/wiki/Building "For example, if you are trying to solve a symbol XOpenDisplay lookup error you may want to follow manuguerra’s advice and add:"

pretty annoying, started compiling on my laptop but should really get to sleep now, spent the paste 16h on this…

Robbilie commented 7 years ago

just to update on the official wrtc repo, i got it working after like 2h compile time and using the manually compiled module

i feel like i am doing something wrong because i hear the audio from the browser in the browser now (when i create an answer serverside and add the descriptors)

the mediastreams thing still breaks, maybe i can compile it manually aswell

is it possible that echoing is inteded?

Rantanen commented 7 years ago

I wouldn't think the echoing was intended. We're still talking about trying to get the wrtc working on its own? If you've found any webrtc related code in `mumble-web´, then echoing might be intended. I can't remember if there's any webrtc code committed in this repo.

alexanderb14 commented 7 years ago

What OS are you using? For MacOS I have published the pre built Module and a simple nom install wrtc-full does the job on fresh a new MacOS.

Also you need to consider: are you using physical audio devices? As my solution supports pcm input files only (for audio). For video, the physical audio device is used.

Robbilie commented 7 years ago

@Rantanen https://gist.github.com/Robbilie/c9bf2db5ec5477c56288142b1ca7aaa1

excuse the absence of fat arrow functions, quick and dirty…

@alexanderb14 debian stretch also as mentioned in a prior comment i had to recompile wrtc to get rid of the xdisplay error i dont want to stream from the physical device, i want to stream the pcm data i get from node-mumble which should be quite similar to a file stream if that is what i would have to use to make your stuff work :)

Robbilie commented 7 years ago

@alexanderb14 since i cant create an issue in your repo, here is the error log from npm install, trying to recompile myself again now :) https://gist.github.com/Robbilie/0f5f861adb510ee79ee7382dcc2d5d87

Robbilie commented 7 years ago

@alexanderb14 guess i found the issue, on compiling it cant find the copyonwritebuffer.h file which actually is not there bc the build-webrtc thingy is using a ref to a webrtc version without that file, no idea how you compiled it for you though

alexanderb14 commented 7 years ago

For building it for linux, you need to disable the download/build download script completely. Just remove it in the build actions.

Then you will need to built webrtc with this script: https://github.com/vsimon/webrtcbuilds and change the include and library paths in the binding.gyp file. Be sure to use a stable version of webrtc. You can pass it as argument to the build script for webrtc. For example, 58466f6d973fa7e0bbff870fe8c130e66b032860 is a commit that has been used in the chrome release of last week.

Another thing to keep in mind is that you will need to enable file audio device support as build argument. For this, append "rtc_use_dummy_audio_file_devices=true" to the string "common_args" (line 230).

I just built it successfully today with Ubuntu 16.04 ;)

Robbilie commented 7 years ago

ok i think i changed all the stuff, now to wait another 2h for it to build lol

in the meantime, mind explaining how to actually receive and send audio using your changes? :)

alexanderb14 commented 7 years ago

the input is a pcm file in /devel/speech.pcm, the output will be recorded in /devel/out.pcm.

Then you go through the webrtc peerconnection api signaling and once a connection is established, your client will play out/record the pcm.

Robbilie commented 7 years ago

that might be an issue bc i expect several clients to connect to the node app, how would this work if they all use the same fake file? o.O

for one instance though, could i simply pipe the output from the pcm stream node-mumble supplies into that file and wrtc would pick it up again?

EDIT: also its /deve/out.pcm bc you have a typo in peerconnection.cc :P i guess you cant set the "SetFilenamesToUse" per peerconnection…?

Robbilie commented 7 years ago

@alexanderb14 so yeah after several things i had to tweak to get it to build on debian stretch im sitting here with your lib building successfully (only with the release libwebrtc_full.a though)

rschuh@crux:~/projects/node-webrtc-mediastream$ node
> const wrtc = require(".")
undefined
> var p = new wrtc.RTCPeerConnection();
-> TRACE: Call::static Nan::NAN_METHOD_RETURN_TYPE node_webrtc::PeerConnection::New(Nan::NAN_METHOD_ARGS_TYPE)
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted

:sadpanda:

Robbilie commented 7 years ago

@Rantanen i just had the glorious idea to open my sound settings and check where the sound comes from

it is in fact, not the browser (aka not loopback) but "ALSA plug-in [nodejs]"

circuitry2 commented 6 years ago

@Robbilie did you ever figure out what the issue was that was causing you to see this error? `./ctestenums.cc:2:48: fatal error: webrtc/api/peerconnectioninterface.h: No such file or directory

include "webrtc/api/peerconnectioninterface.h"`

Is this just the result of a bad binary? I'm trying to use a WebRTC binary compiled for ARM v7 and I'm running into this issue. I made sure to update the library path to point to my custom binary, but still seeing this issue. Any ideas on how I could resolve this? Thanks!

Robbilie commented 6 years ago

i fear i at least dont have a working version laying around anymore :/

circuitry2 commented 6 years ago

@Robbilie once you got the correct binary in place did it just work for you?

Robbilie commented 6 years ago

i dont know if i got it to work (which a working copy wouldve proven ^^) :/