grootgordon / mediasoup-demo

mediasoup official demo application
https://demo.mediasoup.org
MIT License
0 stars 0 forks source link

vagrant(linux) host(windows): connect failed #5

Open grootgordon opened 1 year ago

grootgordon commented 1 year ago

Vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.box = "generic/centos8"
  config.vm.network "forwarded_port", guest: 22, host: 2200
  config.vm.network "forwarded_port", guest: 3000, host: 13000
  config.vm.network "forwarded_port", guest: 3001, host: 13001
  config.vm.network "forwarded_port", guest: 4443, host: 4443
  config.vm.network "forwarded_port", guest: 49990, host: 49990, protocol: "udp"
  config.vm.network "forwarded_port", guest: 49991, host: 49991, protocol: "udp"
  config.vm.network "forwarded_port", guest: 49992, host: 49992, protocol: "udp"
  config.vm.network "forwarded_port", guest: 49993, host: 49993, protocol: "udp"
  config.vm.network "forwarded_port", guest: 49994, host: 49994, protocol: "udp"
  config.vm.network "forwarded_port", guest: 49995, host: 49995, protocol: "udp"
  config.vm.network "forwarded_port", guest: 49996, host: 49996, protocol: "udp"
  config.vm.network "forwarded_port", guest: 49997, host: 49997, protocol: "udp"
  config.vm.network "forwarded_port", guest: 49998, host: 49998, protocol: "udp"
  config.vm.network "forwarded_port", guest: 49999, host: 49999, protocol: "udp"
   config.vm.provider "virtualbox" do |vb|
     vb.memory = "2048"
     vb.cpus = 8
  end
end

error: cannnot access by

[Browsersync] Access URLs:
 ----------------------------------------------
       Local: https://localhost:3000/?info=true
    External: https://10.0.2.15:3000/?info=true
 ----------------------------------------------
          UI: http://localhost:3001
 UI External: http://localhost:3001
grootgordon commented 1 year ago

resolve step:

systemctl stop firewalld      

use host ip to access

  1. first client
    https://your-host-ip:13000/?info=true&roomId=dapemeen
  2. second client, use externalVide=true for simulate another video source
    https://your-host-ip:13000/?info=true&roomId=dapemeen&externalVideo=true

the error still exist, cannot see each other.

next, check the ice ipaddress correctly?

grootgordon commented 1 year ago

remote info as follow: resolution: 0x0, that means: there is no video info

audio
id: 8a863c4f-08e6-46ac-bacd-2573317dddc6

codec: opus

score:10, producerScore:0, producerScores:[0]

video
id: c01ed7b5-414f-42ad-8ad6-205250e51c75

codec: VP8

resolution: 0x0

current spatial-temporal layers: undefined undefined

preferred spatial-temporal layers: 2 2  

priority: 1 [ down ] 

score:10, producerScore:0, producerScores:[0,0,0]
grootgordon commented 1 year ago

update config.js

[root@centos8 server]# diff config.example.js  config.js 
55c55
<                       rtcMinPort : process.env.MEDIASOUP_MIN_PORT || 40000,
---
>                       rtcMinPort : process.env.MEDIASOUP_MIN_PORT || 49990,
127,128c127,128
<                                       announcedIp : process.env.MEDIASOUP_ANNOUNCED_IP,
<                                       port        : 44444
---
>                                       announcedIp : process.env.MEDIASOUP_ANNOUNCED_IP || 'your-local-ip',
>                                       port        : 49994
134c134
<                                       port        : 44444
---
>                                       port        : 49994