I tried deploying my application on AWS EC2 linux ubuntu machine.
I use nginx to setup SSL and the secured connection and then in the announed ip I use the public IP of the linux machine as seen here:
const createWebRtcTransport = async (callback, router: types.Router, ipAddress: “default” | [string]) => {
try {
// mediasoup :: API
const webRtcTransport_options = {
listenIps: [
{
ip: ‘0.0.0.0’, // replace with relevant IP address
announcedIp: ‘xyz.abc.ddd.eee’, // public ip of ec2
}
],
enableUdp: true,
enableTcp: true,
preferUdp: true,
}
Then the docker container running the node app has ports 3000:3050 mapped and in the app.ts too we have rtc ports specified based on the docker ports:
worker = await createWorker({
rtcMinPort: 3000,
rtcMaxPort: 3050,
});
After all this the app run smoothly on https, I can stream videos but other devices cant hear or see the media.
Same code works perfectly on localhost or my local machine.