Comments (6)
Also I was able to run the mediasoup-demo without problem. But this one is not working and this is my config.js file:
module.exports = {
listenIp: '0.0.0.0',
listenPort: 3000,
sslCrt: '/service/certs/fullchain.pem',
sslKey: '/service/certs/privkey.pem',
mediasoup: {
// Worker settings
worker: {
rtcMinPort: 10000,
rtcMaxPort: 10100,
logLevel: 'warn',
logTags: [
'info',
'ice',
'dtls',
'rtp',
'srtp',
'rtcp',
// 'rtx',
// 'bwe',
// 'score',
// 'simulcast',
// 'svc'
],
},
// Router settings
router: {
mediaCodecs:
[
{
kind: 'audio',
mimeType: 'audio/opus',
clockRate: 48000,
channels: 2
},
{
kind: 'video',
mimeType: 'video/VP8',
clockRate: 90000,
parameters:
{
'x-google-start-bitrate': 1000
}
},
]
},
// WebRtcTransport settings
webRtcTransport: {
listenIps: [
{
ip: '127.0.0.1',
announcedIp: '192.168.43.225',
}
],
maxIncomingBitrate: 1500000,
initialAvailableOutgoingBitrate: 1000000,
}
}
};
from mediasoup-sample-app.
Except the server is behind NAT or proxy you don't need to set the announcedIp
and setting the ip
with the server IP would be enough.
from mediasoup-sample-app.
I changed the config.js with this:
listenIps: [
{
ip: '192.168.43.225',
announcedIp: null,
}
],
192.168.43.225
is my local IP and definitely it is not behind a NAT or proxy but now I am getting this error in server console:
Error: port bind failed due to address not available [transport:udp, ip:'192.168.43.225', port:10001, attempt:1/101]
at Channel._processMessage (/service/node_modules/mediasoup/lib/Channel.js:199:37)
at Socket.Channel._consumerSocket.on (/service/node_modules/mediasoup/lib/Channel.js:61:34)
at Socket.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)
at readableAddChunk (_stream_readable.js:269:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at Pipe.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
from mediasoup-sample-app.
Sorry! My mistake. I forgot to forward the rtc min and max port for docker.
from mediasoup-sample-app.
Also it works only when I set listenIps to something like:
listenIps: [
{
ip: '0.0.0.0',
announcedIp: '192.168.43.225',
}
],
Can you please give some insight about Ip and announcedIp?
I thought announcedIp is where others will receice stream.
Use ip: '0.0.0.0' and announcedIp: HOST_PUBLIC_IP when creating a transport.
I found this in FAQ of mediasoup
from mediasoup-sample-app.
ip
is the network address that server starts listening on it and announcedIp
is the IP address that client connects to. When the server has a public IP and the client is direct to it, then setting the announcedIp
is unnecessary, although setting both ip
and announcedIp
with the same public IP works too.
When the server has several IPs then 0.0.0.0
matches all addresses in the IPv4 address space.
from mediasoup-sample-app.
Related Issues (20)
- Chrome Subscription fails - "Cannot access 'stream' before initialization" HOT 17
- Connect works, start webcam also works, but after that subscribe does not work. HOT 3
- Question about sample HOT 1
- Audio transmission problems HOT 1
- How to choose the subscription ? HOT 1
- how can I use H264? HOT 2
- ICE failed, add a STUN server and see about:webrtc for more details HOT 2
- Firefox: ICE failed, add a STUN server and see about:webrtc for more details HOT 3
- Deploying on Heroku HOT 1
- a question about the code not a issue. HOT 4
- NPM error on installing Mediasoup package HOT 2
- No audio is transmitted HOT 1
- Unable to receive remote video HOT 6
- trying to install and test HOT 10
- Cannot publish video HOT 1
- Audio not working HOT 1
- how to full screen and record video? HOT 1
- FYI: You don't need to use SSL on localhost! :-) HOT 1
- Not an issue, a question HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mediasoup-sample-app.