jamalag / mediasoup3

mediasoup - Youtube Video Tutorial Series (Part 4)
MIT License
34 stars 29 forks source link

sample audio/video problem #3

Open ouya99 opened 1 year ago

ouya99 commented 1 year ago

Hello

i tried to test the sample and added pem/cert files and could launch it successfully. I do see the camera image of myself and if i open a 2nd browser it shows another box (which remains black). No audio , and seemingly no video transmission

Did i do anything wrong with setup?

Thank you

turtec commented 1 year ago

HI i had the same issue. Just change the "annouceIp" in webRTCTransport_options to the IP-adress of your machine.

RezaHabibi1001 commented 10 months ago

hello , I have changed the announceIp to my machine ip address , but still it has problem ?

ouya99 commented 10 months ago

@RezaHabibi1001 check if you have set webrtc ports worker: { rtcMinPort: parseInt(process.env.RTC_MIN_PORT), rtcMaxPort: parseInt(process.env.RTC_MAX_PORT),

RezaHabibi1001 commented 10 months ago

worker = await mediasoup.createWorker({ rtcMinPort: 2000, rtcMaxPort: 2050, })

thank you for answer this is my webRTC ports

RezaHabibi1001 commented 10 months ago

but , when my announceIP is 127.0.0.1 it works correctly

ouya99 commented 10 months ago

then stick to 127.0.0.1

RezaHabibi1001 commented 10 months ago

all steps are done successfully , when replace the 127.0.0.1 with my ip the below error happens :

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'getUserMedia')

ouya99 commented 10 months ago

the browser does not have access camera or microphone of the computer

you will find plenty of help for this issue on the internet

RezaHabibi1001 commented 10 months ago

I have searched a lot , the problem is not from camera permission , I created a simple js file and run it with live server in address 127.0.0.1:5000 , getLocalstream works fine but when I change it to 192.168.1.101:3000 , the error appears

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'getUserMedia')

RezaHabibi1001 commented 10 months ago

thank you brother , the problem of my code resolved .

the problem was from camera permission

IdeaGarsha commented 2 months ago

Hi I implemented this code and there is no problem. It works very well. But I want to make a change in the code so that all connections are made on one port. It means to use one transfer layer for all people.