user13558124
user13558124

Reputation:

How to Set Up a Stun Server with Node.js

I am currently using a Stun server (A public one). However, I need to have good audio quality and am slightly confused by Stun servers.

  1. Does a Stun server affect sound quality? I researched Stun servers and it seems like they are only for identifying IP addresses (?) (or something like that), so I am slightly confused as another Google search result told me that, to get the best audio quality for streaming, you need to make your own Stun server.
  2. Is using a public Stun server OK? I need a server that can take lots of usage and high quality audio (as I said above, not sure if Stun server affects audio/quality), and will be used for streaming music and other high quality audio.

Thanks so much!!!

Upvotes: 2

Views: 2017

Answers (1)

Dirk V
Dirk V

Reputation: 1469

A STUN server has nothing to do with the audio quality. It's only used to find your IP address. Something that could affect latency/network quality is a TURN server as it is a relay server where data passes through. TURN is used when a direct connection between the peers isn't possible using the STUN method.

To have better quality you need to set the media parameters when you ask them from getUserMedia. Here are the constraints you can use for audio https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints.

Upvotes: 2

Related Questions