GithubHelp home page GithubHelp logo

jacktrip-webrtc / jacktrip-webrtc Goto Github PK

View Code? Open in Web Editor NEW
389.0 16.0 28.0 2.54 MB

JackTrip meets WebRTC

License: GNU General Public License v3.0

Shell 0.28% Dockerfile 0.35% JavaScript 80.35% CSS 3.14% HTML 15.88%

jacktrip-webrtc's Introduction

jacktrip-webrtc

JackTrip WebRTC is an HTML5 implementation of Jacktrip for the web browser.

Multi-machine network music performance over the Internet is achieved using high quality, uncompressed, and ultra-low delay audio signal streaming. WebRTC MediaStream is routed through the RTCDataChannel in order to bypass processing (i.e., encoding) and buffering delay of the RTCPeerConnection media channel.

Setup

NodeJS

After cloning the repository use the following commands to install all dependencies:

npm install
cd client
npm install
cd ..

To start the server use the following command:

npm start

or

node app.js

This will start a server on http://localhost:8000 and on https://localhost:44300. To modify these values, and other parameters, you can simply create a .env file containing all required settings. More details can be found in Configuration.md

Docker

Alternatively you can start this app using dokcer.

After cloning the repository use the following command to create the docker image:

docker build -t jacktrip-webrtc/jacktrip-webrtc .

The image you obtained is configured to run the app in a production environment, so it starts only the https version of the app and it requires a ssl certificate in order to run this server. You can generate a self signed certificate through the following commands:

mkdir ssl
openssl req -new -x509 -days 365 -nodes -out ssl/ssl.cert -keyout ssl/ssl.key
chmod 600 ssl.*

It creates the ssl folder containing both the certificate and the key.

Then you can create and run the container using the following command:

docker run --name jacktrip-webrtc -p 44300:44300 -v "$(pwd)"/ssl:/usr/src/app/ssl -v "$(pwd)"/logs:/usr/src/app/logs -d jacktrip-webrtc/jacktrip-webrtc

This command will create a container using the image we created previously, will mount to it the ssl folder containing the certificate files we created before, will mount to it the logs folder, where application logs will be stored and will map the container port to the port 44300 of the machine executing the container.

Take a look at the documentation of docker run to know how to define and customize environment variable. More details on the available environment variables can be found in Configuration.md

Usage

Now you can connect to http://localhost:8000 or https://localhost:44300 (if you used the docker version you can connect only the https server).

NOTE: if you are connecting to the app from a different device with respect to the one where you started the server, you need to connect to the https version, so to https://<host-ip-address>:44300. The http version won't work, since you need a secure context in order to use AudioWorklets, which are the foundation of this app.

Once connected you just need to create a room, by clicking on the 'Create Room' button, then allow access to camera and microphone. Once the application has access to camera and microphone, you can select which camera, microphone and speakers to use (the last one is available only on browsers based on Chromium), and customize the size of the playout buffer, if needed. Then you can perform a loopback test if needed and then insert a name.

After you inserted a name you can join the room by clicking on the 'Join' button.

Next you need to share the current page web address link with the other party. You can either copy it from the web browser address bar or by clicking on the button inside the notification that will appear on the top left of the screen once you join the room.

The other party needs to navigate to the received URL, perform the same steps in order to select microphone, camera, speakers and a name. Then he can join the room by clicking on the 'Join' button.

Now you are both connected and ready to communicate.

jacktrip-webrtc's People

Contributors

dependabot[bot] avatar jacktrip-webrtc avatar matteosacchetto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jacktrip-webrtc's Issues

.env file sample

Create a sample .env file or maybe even just include a code box here with a sample of what the .env file will look like.

Also, if HTTP defaults to true, and HTTPS defaults to true, which one is it using by default?

O

Audio Only

Hello , very nice project.
But i have 2 queries . One is when i created a room on my browser and some other connected to that room it will not be displayed here , but if another persons connect to that room the last 2 will see and talk to each other not the one who created room.

2nd is there a way i can use this only for AUDIO and no option for Video

Loopback: no audio heard

I tested out the new Loopback feature, but was unable to hear myself at any point. I tried it during initial configuration (screenshots attached), but no luck. Then I connected two clients via localhost, and the video and audio worked as well as before, but when I enabled Loopback I stopped hearing anything. I took another screenshot showing the console during initial setup process, below. Using Google Chrome on macOS, both latest versions.

Screen Shot 2020-07-23 at 8 48 38 AM

Screen Shot 2020-07-23 at 8 48 47 AM

Screen Shot 2020-07-23 at 8 55 49 AM

what about... jack?

Just had this idea:
What if jacktripWebRTC actually made use of Jack?
It would increase the complexity of the setup, sure.
It would most likely look like a jacktrip GUI, with the added benefits of not having to open ports...
A simple search retrieved these two:
https://github.com/unclechu/node-jack-connector
https://github.com/mildsunrise/simplejack

Maybe it doesn't make sense (or maybe it will create other problems and not really solve any of what we are trying to solve right now), but I'm just leaving it here as a note to think again sometime later.

O

more time to read, please!

Add more time to read the little pop-up window that appears on the top right hand side of the screen.
(even: better a way to display it again!)

O

Sorry, opened this by mistake

Apologies. I opened this issue with an account I use for academic work. I'll repost the issue through my personal account as I normally keep track of that :/

Not functioning on iPad or iPhone

Hi

What a GREAT project - this could really open JackTrip up to more and more users!

Most of my choir members use either iPads or iPhones and I can't make the session work on either?

Is this is a known problem?

Thanks

David

Audio link breaks down after some time

I ran a few tests with this implementation the other day and it seems to work fine when I boot it up. However, shortly (say, 1 min) after establishing the connection between 2 users (I was working on a local network using 2 different laptops) it seems as if the audio link breaks down, i.e. the mic of one laptop is not transmitted anymore to the other.

The same effect doesn't seem to happen to the video, that keeps being streamed between the 2 devices.

Any idea of why I'm experiencing this?

OpenSSL location on macOS

Hello,
I think macOS stores OpenSSL in a different location than Linux. I installed mine through Homebrew and it put it into: /usr/local/opt/openssl
Perhaps add a check for that folder as well? The secure server does not currently load for me. See attached screenshot. Thank you!

OpenSSL not found

"TypeError: audioContext.audioWorklet is undefined" error when joining a room over port 8000

I'm on develop-datachannel latest commit (as of two months ago: 1bc8795)

Seems to work fine on firefox & chrome on my linux machines (Arch Linux & Debian 10), but I'm having the following problem running the client on Windows 10 x86-64 (both my windows 10 machine and someone else's) upon creating a room:

Firefox 80.0.1:
jacktrip-webrtc_firefox80-0-1

Chrome 85.0.4183.121:
jacktrip-webrtc error

That first warning in Chrome "The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page" leads me to https://developers.google.com/web/updates/2017/09/autoplay-policy-changes#webaudio which seems to indicate the error might be due to AudioWorklet not being allowed to be created prior to user input due to some policy against autoplay abuse.

[idea] Use wasm in web workers

Taking into consideration that the Processors in the web workers add enough latency to make network performances impractical (according to the measurements on @matteosacchetto dissertation), maybe it is valid to experiment running these processes in wasm.

check https://www.webaudiomodules.org/wamsynths/dx7
https://github.com/webaudiomodules/webdx7

I also noticed that their code also implements a ringbuffer (among many other things): https://github.com/webaudiomodules/webdx7/blob/master/src/c/msfa/ringbuffer.h

WebTransport and Jacktrip-webrtc

Hi folks,
is there any plans to implement http/3 webtransport?
it will allow to create low level socket and put on top any kind of protocol, tcp or udp.
thanks

Audio routing to multi-channel output a-la Jack

Hey guys.
I stumbled upon this project and found it really interesting. I use JackTrip quite a lot and have been thinking for a while that a WebRTC implementation could simplify setting things (especially from the simplicity of setting up things, given that handling port forwarding and firewall rules is not that trivial for the average user).

Anyway, a few months ago I toyed around with other bare-bone WebRTC audio chat implementations and was thinking about how viable it would be to include the possibility of actually performing audio routing and proper separate channel handling in an audio chat implemented in WebRTC.

My understanding is that handling inputs/outputs devices with multiple channels is either not possible at the moment, or just not trivial :D
For instance, say that the server receives the streams from 2 clients; at the server side, these 2 streams will be mixed and a single downmixed signal will be available as the server audio output. Hence, the 2 streams won't be usable separately (unlike it would happen using Jack + JackTrip, e.g. on the connection panel of qjackctl).

Additionally, from some tests I did where I tried to playback a given signal on different available output channels, I realized that if we increase the number of output channels the routing to channels from 3rd onwards doesn't seem to be working.

I have no web development expertise, so I might be just missing some tricks to make this work, so I'd like your opinion on this matter.

I even asked a question along the same line on StackOverflow but had no luck.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.