Coder Social home page Coder Social logo

mediasoup-sample-app's People

Contributors

mkhahani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mediasoup-sample-app's Issues

Click start webcam, not work

Hi @mkhahani,
click webCam, the camera was open, but the local video noting show, the web console has no error; debug i found

 transport.on('connectionstatechange', state => {
})

when state ===connected console stream is undefined

FYI: You don't need to use SSL on localhost! :-)

To make it simpler to develop on my local computer I removed all SSL stuff. It is not necessary for this little sample app, and just makes it overcomplicated. I tried it without SSL on localhost with both Chrome and Safari.

Do not use latest as versions for mediasoup and mediasoup-client in package.json

As of today this what we see on https://www.npmjs.com/package/mediasoup-client for mediasoup-client module.

Screenshot 2020-01-20 at 12 22 38 AM

mediasoup still maintains both version 2 & 3, and in this case 2 days ago they made an update to version 2 of mediasoup-client, causing it to become the latest. Because of that in my local I got error on the browser saying that mediasoup.Device is not constructor as that is undefined.

The fix is, change package.json from

"mediasoup": "latest",
"mediasoup-client": "latest",

to

"mediasoup": "3.4.8",
"mediasoup-client": "3.3.12",

trying to install and test

I've followed the simple instructions and npm start returns
`> [email protected] start

browserify client.js -o app-bundle.js; node server.js

sh: 1: browserify: not found
SSL files are not found. check your config.js file
`
I'm trying to set this up on Ubuntu 20.10.
I've checked that I have the snake oil key and pem files and that my config is pointing to them. I'm a little lost now.

Error: port bind failed due to address not available

This is the error I am getting when I click publish

(node:31538) UnhandledPromiseRejectionWarning: Error: port bind failed due to address not available [udp:192.168.1.100, attempt:1] at Channel._processMessage (/Users/bhaskargurram/RA/mediasoup-sample-app/node_modules/mediasoup/lib/Channel.js:284:19) at Socket.Channel._socket.on (/Users/bhaskargurram/RA/mediasoup-sample-app/node_modules/mediasoup/lib/Channel.js:101:13) at Socket.emit (events.js:189:13) at addChunk (_stream_readable.js:284:12) at readableAddChunk (_stream_readable.js:265:11) at Socket.Readable.push (_stream_readable.js:220:10) at Pipe.onStreamRead [as onread] (internal/stream_base_commons.js:94:17) (node:31538) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

can't start the app

I have just cloned the repo, installed the dependencies, and tried to start the app but it doesn't work.
I'm using Ubutnu 19.04.
image

a question about the code not a issue.

i had read the code of the project. but i don't understand why socket client could send the promise resolve to the socket server. is the socket server will return the resolved data to the sender or return the resolved data to all socket client? could you tell me the theory of that? and why not use the socket.emit to return the data to the sender.
thank you very much.

Error When spawning mediasoup worker

I tried running the demo on an EC2 instance running ubuntu 18.04.
I get the following error.

{ Error: spawn /home/ubuntu/mediasoup-sample-app/node_modules/mediasoup/worker/out/Release/mediasoup-worker ENOENT
at _errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:695:11)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3
code: 'ENOENT',
errno: 'ENOENT',
syscall: 'spawn /home/ubuntu/mediasoup-sample-app/node_modules/mediasoup/worker/out/Release/mediasoup-worker',
path: '/home/ubuntu/mediasoup-sample-app/node_modules/mediasoup/worker/out/Release/mediasoup-worker',
spawnargs:
[ '--logLevel=warn',
'--logTag=info',
'--logTag=ice',
'--logTag=dtls',
'--logTag=rtp',
'--logTag=srtp',
'--logTag=rtcp',
'--rtcMinPort=10000',
'--rtcMaxPort=10100' ] }

I'm not sure if mediasoup installed/built properly.

Also using node v8.10

Any help is appreciated

Firefox: ICE failed, add a STUN server and see about:webrtc for more details

Chrome works.

mediasoup-client:Transport consume() | Consumer for RTP probation created +585ms app-bundle.js:6219:10
mediasoup-client:Transport connection state changed to connecting +131ms app-bundle.js:6219:10
WebRTC: ICE failed, add a STUN server and see about:webrtc for more details
mediasoup-client:Transport connection state changed to failed +5s app-bundle.js:6219:10
mediasoup-client:Transport close() +6ms app-bundle.js:6219:10
mediasoup-client:Firefox60 close() +5s app-bundle.js:6219:10
mediasoup-client:Consumer transportClosed() +5s app-bundle.js:6219:10

Neither sending nor receiving video

I am using Docker on Windows to run the app. After pressing Start Webcam only webcam starts but noting happens. Same for Subscribe.
Screenshot (84)
Screenshot (87)

Nothing is printed to server console.

Chrome console says "mediasoup-client: Transport connection state changed to disconnected"

Help please :)

Deploying on Heroku

Hi!

Is it possible to deploy this project on Heroku? After deployment and setting server address in the client I have this state in my chrome debug console (no errors on the heroku console):
image

I've got only 'connecting' and 'disconneted' (after 15 seconds) statements, without 'connected statement'

How can I solve this issue?

Connect works, start webcam also works, but after that subscribe does not work.

Connect works, start webcam also works, but after that subscribe does not work.
I am getting error : Cannot access 'stream' before initialization.

console log of chrome 74 and Mediasoup are copied beneath

mediasoup-client:Device constructor() [Handler:Chrome74] +0ms
app-bundle.js:6058 mediasoup-client:Device load() [routerRtpCapabilities:{codecs: Array(3), headerExtensions: Array(13), fecMechanisms: Array(0)}] +2ms
app-bundle.js:6058 mediasoup-client:Chrome74 getNativeRtpCapabilities() +0ms
app-bundle.js:6058 mediasoup-client:Device load() | got native RTP capabilities:{codecs: Array(30), headerExtensions: Array(18)} +17ms
app-bundle.js:6058 mediasoup-client:Device load() | got extended RTP capabilities:{codecs: Array(2), headerExtensions: Array(12)} +3ms
app-bundle.js:6058 mediasoup-client:Device load() | got receiving RTP capabilities:{codecs: Array(3), headerExtensions: Array(7)} +2ms
app-bundle.js:6058 mediasoup-client:Chrome74 getNativeSctpCapabilities() +22ms
app-bundle.js:6058 mediasoup-client:Device load() | got native SCTP capabilities:{numStreams: {…}} +1ms
app-bundle.js:6058 mediasoup-client:Device load() succeeded +1ms
app-bundle.js:6058 mediasoup-client:Device createSendTransport() +2m
app-bundle.js:6058 mediasoup-client:Device createTransport() +1ms
app-bundle.js:6058 mediasoup-client:Transport constructor() [id:a47985eb-d8b1-433d-be1a-8ded58f00078, direction:send] +0ms
app-bundle.js:6058 mediasoup-client:Chrome74 constructor() [direction:send] +2m
app-bundle.js:6058 mediasoup-client:Transport produce() [track:MediaStreamTrack {kind: "video", id: "977e91b0-5645-4ce4-938f-405dc3f43582", label: "Integrated Camera (5986:2113)", enabled: true, muted: false, …}] +5s
app-bundle.js:6058 mediasoup-client:Chrome74 send() [kind:video, track.id:977e91b0-5645-4ce4-938f-405dc3f43582] +5s
app-bundle.js:6058 mediasoup-client:RemoteSdp updateDtlsRole() [role:client] +0ms
app-bundle.js:6058 mediasoup-client:Chrome74 send() | calling pc.setLocalDescription() [offer:RTCSessionDescription {type: "offer", sdp: "v=0
↵o=- 5267583238548937444 2 IN IP4 127.0.0.1
↵s…5430 label:977e91b0-5645-4ce4-938f-405dc3f43582
↵"}] +13ms
app-bundle.js:6058 mediasoup-client:Chrome74 send() | calling pc.setRemoteDescription() [answer:{type: "answer", sdp: "v=0
↵o=mediasoup-client 10000 1 IN IP4 0.0.0.0
↵s=…-options:renomination
↵a=rtcp-mux
↵a=rtcp-rsize
↵"}] +12ms
app-bundle.js:6058 mediasoup-client:Transport connection state changed to connecting +29ms
app-bundle.js:6058 mediasoup-client:Transport connection state changed to connected +2ms
app-bundle.js:6058 mediasoup-client:Producer constructor() +0ms
app-bundle.js:6058 mediasoup-client:Device createRecvTransport() +16s
app-bundle.js:6058 mediasoup-client:Device createTransport() +0ms
app-bundle.js:6058 mediasoup-client:Transport constructor() [id:fc231c10-9fdf-4493-a04b-fc5ea1178420, direction:recv] +11s
app-bundle.js:6058 mediasoup-client:Chrome74 constructor() [direction:recv] +11s
app-bundle.js:6058 mediasoup-client:Transport consume() +11ms
app-bundle.js:6058 mediasoup-client:Chrome74 receive() [id:b82c1125-fd6b-41d3-bf56-15091ef13c6b, kind:video] +12ms
app-bundle.js:6058 mediasoup-client:Chrome74 receive() | calling pc.setRemoteDescription() [offer:{type: "offer", sdp: "v=0
↵o=mediasoup-client 10000 1 IN IP4 0.0.0.0
↵s=…D 153916077 280275995
↵a=rtcp-mux
↵a=rtcp-rsize
↵"}] +2ms
app-bundle.js:6058 mediasoup-client:RemoteSdp updateDtlsRole() [role:server] +12s
app-bundle.js:6058 mediasoup-client:Chrome74 receive() | calling pc.setLocalDescription() [answer:{type: "answer", sdp: "v=0
↵o=- 2375058991548033842 2 IN IP4 127.0.0.1
↵s…a=ice-options:trickle
↵a=rtcp-mux
↵a=rtcp-rsize
↵"}] +8ms
app-bundle.js:6058 mediasoup-client:Consumer constructor() +0ms
app-bundle.js:6058 mediasoup-client:Chrome74 receive() [id:probator, kind:video] +5ms
app-bundle.js:6058 mediasoup-client:Chrome74 receive() | calling pc.setRemoteDescription() [offer:{type: "offer", sdp: "v=0
↵o=mediasoup-client 10000 2 IN IP4 0.0.0.0
↵s=…c:1234 cname:probator
↵a=rtcp-mux
↵a=rtcp-rsize
↵"}] +2ms
app-bundle.js:6058 mediasoup-client:Transport connection state changed to connecting +22ms
app-bundle.js:6058 mediasoup-client:Transport connection state changed to connected +5ms
app-bundle.js:6058 mediasoup-client:ERROR:EnhancedEventEmitter safeEmit() | event listener threw an error [event:connectionstatechange]:ReferenceError: Cannot access 'stream' before initialization
at Transport. (app-bundle.js:213)
at emitOne (app-bundle.js:1029)
at Transport.emit (app-bundle.js:1107)
at Transport.safeEmit (app-bundle.js:8725)
at RecvHandler. (app-bundle.js:9477)
at emitOne (app-bundle.js:1029)
at RecvHandler.emit (app-bundle.js:1107)
at RTCPeerConnection. (app-bundle.js:11216) +0ms
debug @ app-bundle.js:6058
safeEmit @ app-bundle.js:8728
(anonymous) @ app-bundle.js:9477
emitOne @ app-bundle.js:1029
emit @ app-bundle.js:1107
(anonymous) @ app-bundle.js:11216
app-bundle.js:6058 mediasoup-client:Chrome74 receive() | calling pc.setLocalDescription() [answer:{type: "answer", sdp: "v=0
↵o=- 2375058991548033842 3 IN IP4 127.0.0.1
↵s…a=ice-options:trickle
↵a=rtcp-mux
↵a=rtcp-rsize
↵"}] +13ms
app-bundle.js:6058 mediasoup-client:Transport consume() | Consumer for RTP probation created +7ms


mediasoup logs


[meroot:mediasoup-sample-app# export DEBUG="mediasoup*"
root:mediasoup-sample-app# npm start

[email protected] start /data/del/mediasoup-sample-app
browserify client.js -o app-bundle.js; node server.js

server is running
open https//127.0.0.1:3000 in your web browser
mediasoup createWorker() +0ms
mediasoup:Worker constructor() +0ms
mediasoup:Worker spawning worker process: /data/del/mediasoup-sample-app/node_modules/mediasoup/worker/out/Release/mediasoup-worker --logLevel=warn --logTag=info --logTag=ice --logTag=dtls --logTag=rtp --logTag=srtp --logTag=rtcp --rtcMinPort=10000 --rtcMaxPort=10100 +0ms
mediasoup:Channel[pid:15358] constructor() +0ms
mediasoup:Worker worker process running [pid:15358] +26ms
mediasoup:Worker createRouter() +1ms
mediasoup:Channel[pid:15358] request() [method:worker.createRouter, id:1] +24ms
mediasoup:Channel[pid:15358] request succeeded [method:worker.createRouter, id:1] +4ms
mediasoup:Router constructor() +0ms
client connected
client connected
client disconnected
client disconnected
client connected
mediasoup:Router createWebRtcTransport() +2m
mediasoup:Channel[pid:15358] request() [method:router.createWebRtcTransport, id:2] +2m
mediasoup:Channel[pid:15358] request succeeded [method:router.createWebRtcTransport, id:2] +4ms
mediasoup:Transport constructor() +0ms
mediasoup:WebRtcTransport constructor() +0ms
mediasoup:Transport setMaxIncomingBitrate() [bitrate:1500000] +2ms
mediasoup:Channel[pid:15358] request() [method:transport.setMaxIncomingBitrate, id:3] +4ms
mediasoup:Channel[pid:15358] request succeeded [method:transport.setMaxIncomingBitrate, id:3] +2ms
mediasoup:WebRtcTransport connect() +5s
mediasoup:Channel[pid:15358] request() [method:transport.connect, id:4] +5s
mediasoup:Channel[pid:15358] request succeeded [method:transport.connect, id:4] +1ms
mediasoup:Transport produce() +5s
mediasoup:Channel[pid:15358] request() [method:transport.produce, id:5] +25ms
mediasoup:Channel[pid:15358] request succeeded [method:transport.produce, id:5] +1ms
mediasoup:Producer constructor() +0ms
mediasoup:Router createWebRtcTransport() +16s
mediasoup:Channel[pid:15358] request() [method:router.createWebRtcTransport, id:6] +11s
mediasoup:Channel[pid:15358] request succeeded [method:router.createWebRtcTransport, id:6] +5ms
mediasoup:Transport constructor() +11s
mediasoup:WebRtcTransport constructor() +11s
mediasoup:Transport setMaxIncomingBitrate() [bitrate:1500000] +0ms
mediasoup:Channel[pid:15358] request() [method:transport.setMaxIncomingBitrate, id:7] +1ms
mediasoup:Channel[pid:15358] request succeeded [method:transport.setMaxIncomingBitrate, id:7] +1ms
mediasoup:Transport consume() +9ms
mediasoup:Channel[pid:15358] request() [method:transport.consume, id:8] +9ms
mediasoup:Channel[pid:15358] request succeeded [method:transport.consume, id:8] +3ms
mediasoup:Consumer constructor() +0ms
mediasoup:WebRtcTransport connect() +25ms
mediasoup:Channel[pid:15358] request() [method:transport.connect, id:9] +12ms
mediasoup:Channel[pid:15358] request succeeded [method:transport.connect, id:9] +1ms
mediasoup:Consumer resume() +37ms
mediasoup:Channel[pid:15358] request() [method:consumer.resume, id:10] +25ms
mediasoup:Channel[pid:15358] request succeeded [method:consumer.resume, id:10] +2ms
thod:transport.consume, id:8] +9ms
mediasoup:Channel[pid:15358] request succeeded [method:transport.consume, id:8] +3ms
mediasoup:Consumer constructor() +0ms
mediasoup:WebRtcTransport connect() +25ms
mediasoup:Channel[pid:15358] request() [method:transport.connect, id:9] +12ms
mediasoup:Channel[pid:15358] request succeeded [method:transport.connect, id:9] +1ms
mediasoup:Consumer resume() +37ms
mediasoup:Channel[pid:15358] request() [method:consumer.resume, id:10] +25ms
mediasoup:Channel[pid:15358] request succeeded [method:consumer.resume, id:10] +2ms

Unable to create worker

Getting an error when creating a worker.
I turned on mediasoup errors as well to further debug, but I am completely lost.
I set the createWorker parameters to all the defaults as well and that did nothing.
I could attach my config.js as well if that helps.
I am able to navigate to the local website fine.

  mediasoup:Worker constructor() +0ms
  mediasoup:Worker spawning worker process: /home/justin/Documents/Programming/mediasoup-sample-app/node_modules/mediasoup/worker/out/Release/mediasoup-worker --logLevel=error --logTag=info --logTag=ice --logTag=dtls --logTag=rtp --logTag=srtp --logTag=rtcp --rtcMinPort=10000 --rtcMaxPort=59999 +0ms
  mediasoup:Channel[pid:undefined] constructor() +0ms
  mediasoup:Worker close() +8ms
  mediasoup:Channel[pid:undefined] close() +3ms
  mediasoup:ERROR:Worker worker process failed [pid:undefined]: spawn /home/justin/Documents/Programming/mediasoup-sample-app/node_modules/mediasoup/worker/out/Release/mediasoup-worker ENOENT +0ms
{ Error: spawn /home/justin/Documents/Programming/mediasoup-sample-app/node_modules/mediasoup/worker/out/Release/mediasoup-worker ENOENT
    at _errnoException (util.js:1022:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
    at onErrorNT (internal/child_process.js:372:16)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
    at Function.Module.runMain (module.js:695:11)
    at startup (bootstrap_node.js:188:16)
    at bootstrap_node.js:609:3
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'spawn /home/justin/Documents/Programming/mediasoup-sample-app/node_modules/mediasoup/worker/out/Release/mediasoup-worker',
  path: '/home/justin/Documents/Programming/mediasoup-sample-app/node_modules/mediasoup/worker/out/Release/mediasoup-worker',
  spawnargs: 
   [ '--logLevel=error',
     '--logTag=info',
     '--logTag=ice',
     '--logTag=dtls',
     '--logTag=rtp',
     '--logTag=srtp',
     '--logTag=rtcp',
     '--rtcMinPort=10000',
     '--rtcMaxPort=59999' ] }

Click start webcam, publishing gets failed

Hi @mkhahani,

Application is accessed from chrome browser and clicking on start webcam button with simulcast enabled shows publishing initially, few seconds later publishing gets failed.

Please help..

Thanks,
Amit M

Not an issue, a question

Hi,

I'm trying to add webrtc data channel support to your app. Unfortunately it is not that easy to get information about this for a beginner and most sample code is completely use case focused bloated. I'm unable to figure out to open a datachannel from the producer and conusme it on the consumer.

Would you mind to provide a small hint?

TIA

Unable to receive remote video

Hello, I was able to successfully run this sample app locally but when I am trying to run it in IBM LinuxOne instance, I am not receiving the remote video.

Sender
sender

Receiver - Remote video is only loading
receiver

I set the ip and announcedIp as 148.100.79.193 which is the public IP of the instance and there is no other private IP. I even made the required ports publicly accessible and even tried by stopping firewalld.
ip

I even verified that udp ports are accessible using nc
udp verify

All I can see in the server logs (with DEBUG="mediasop*") is RTC::WebRtcTransport::OnRtpDataReceived() | DecryptSrtp() failed and this happens as soon as I connect the sender.
problem

Can you help me figure out the problem, please?

Chrome Subscription fails - "Cannot access 'stream' before initialization"

Hey there,
I tried running this Mediasoup-example but somehow in Chrome it fails, when i click on "Subscribe". In Firefox it seems to work flawlessly without producing any kind of error. I tried opening the Firewall of the Server entirely and reinstalling and recompiling the App (Including the dependencies) But nothing changed. Seems like Chrome never get's the Stream from the Server, so it can't build the stream.
mediasoup-client:ERROR:EnhancedEventEmitter safeEmit() | event listener threw an error [event:connectionstatechange]:ReferenceError: Cannot access 'stream' before initialization
at Transport.<anonymous> (app-bundle.js:216)
at emitOne (app-bundle.js:1032)
at Transport.emit (app-bundle.js:1110)
at Transport.safeEmit (app-bundle.js:8722)
at RecvHandler.<anonymous> (app-bundle.js:9474)
at emitOne (app-bundle.js:1032)
at RecvHandler.emit (app-bundle.js:1110)
at RTCPeerConnection.<anonymous> (app-bundle.js:11213) +0ms

Error seems to occur when reaching line 212 of the client.js script, when connectionstate changes to "connected":
212: document.querySelector('#remote_video').srcObject = stream;

Thanks in advance.

  • Moritz

how can I use H264?

my config:
router: {
mediaCodecs:
[
{
kind: 'audio',
mimeType: 'audio/opus',
clockRate: 48000,
channels: 2
},
{
kind: 'video',
mimeType: 'video/VP8',
clockRate: 90000,
parameters:
{
'x-google-start-bitrate': 1000
}
},
{
kind: 'video',
mimeType: 'video/VP9',
clockRate: 90000,
parameters:
{
'profile-id': 2,
'x-google-start-bitrate': 1000
}
},
{
kind : 'video',
mimeType : 'video/h264',
clockRate : 90000,
parameters :
{
'packetization-mode' : 1,
'profile-level-id' : '4d0032',
'level-asymmetry-allowed' : 1,
'x-google-start-bitrate' : 4096
}
},
{
kind : 'video',
mimeType : 'video/h264',
clockRate : 90000,
parameters :
{
'packetization-mode' : 1,
'profile-level-id' : '42e01f',
'level-asymmetry-allowed' : 1,
'x-google-start-bitrate' : 4096
}
}

////////////////////////////////////////////////////////////////////////////////
//my serve code:

let videoTransport = await this.mediasoupRouter.createPlainTransport(this.config.mediasoup.plainRtpTransport);

    // Read the transport local RTP port.
    const videoRtpPort = videoTransport.tuple.localPort;
    console.log(videoRtpPort);
    // => 3501

    // Read the transport local RTCP port.
    const videoRtcpPort = videoTransport.rtcpTuple.localPort;
    console.log(videoRtcpPort);
    // => 2989


    let videoProducer = await videoTransport.produce(
        {
            kind: 'video',
            rtpParameters:
            {
                codecs:
                    [
                        {
                            mimeType     : 'video/h264',
                            clockRate    : 90000,
                            payloadType  : 102,
                            parameters :
                            {
                                'packetization-mode'      : 1,
                                'profile-level-id'        : '4d0032',
                                'level-asymmetry-allowed' : 1,
                                'x-google-start-bitrate'  : 4096
                            }
                        }
                    ],
                encodings: [{ ssrc: 22222222 }]
            }
        });
        await videoProducer.enableTraceEvent([ "rtp", "pli" ]);

        videoProducer.on("trace", (trace) =>
        {
          console.log(trace)
        });

///////////////////////////////////////////////////
my ffmpeg:
ffmpeg -i "rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif" -an -c copy -ssrc 22222222 -payload_type 102 -f rtp "rtp://192.168.125.128:10098?rtcpport=10096"

//////////////////////////////////////////////////

I can play this h264 in chrome, but, this is very stuck, VP8 is ok,how can I do?

.....

Audio not working

hi mr mkhahani thanks for sharing this mediasoup-sample i'm at begginer level of mediasoup i tested you sample it works great for video but i can not send and receive audio. Does it support voice ? if yes how we enable it . Thanks

No audio is transmitted

Please there's no audio while running the demo, your project is super cool for learning about mediasoup but i dont know how to wrap my hands around the audio as its not working on the demo

SSL file not found but variables remain undefined on line

I'm getting the following error in the runWebServer function.
ThesslJKeyt and asslCrt remain undefined affter the const definition.
I added the 3 following line to ease the debug, the first 2 return undefined, the 3rd one return the complete config object as espected.

const { sslKey, sslCrt } = config;
console.log(typeof sslKey)
console.log(typeof sshCrt)
console.log(config)

root@ubuntu-s-1vcpu-1gb-tor1-01:/opt/m/mediasoup-sample-app# npm start

[email protected] start /opt/m/mediasoup-sample-app
browserify client.js -o app-bundle.js; node server.js

undefined
undefined
{
listenIp: '0.0.0.0',
listenPort: 3000,
sslCrt: '/etc/letsencrypt/live/v2.gardiensdulys.com/fullchain.pem',
sskKey: '/etc/letsencrypt/live/v2.gardiensdulys.com/privkey.pem',
mediasoup: {
worker: {
rtcMinPort: 10000,
rtcMaxPort: 10100,
logLevel: 'warn',
logTags: [Array]
},
router: { mediaCodecs: [Array] },
webRtcTransport: {
listenIps: [Array],
maxIncomingBitrate: 1500000,
initialAvailableOutgoingBitrate: 1000000
}
}
}
SSL files are not found. check your config.js file

Audio transmission problems

Hi, Developer.
Your collarhub is very helpful. I am inquiring about the issue during the test. I want to play screen and computer sound.

I have modified the getUserMedia function, but I still have no sound.

//============================================
async function getUserMedia(transport, isWebcam) {
if (!device.canProduce('video')) {
console.error('cannot produce video');
return;
}

let stream;
try {
stream = isWebcam ?
Await Navigator.mediaDevices.getUserMedia({ "audio": true, "video": true }) :
await Navigator.mediaDevices.getDisplayMedia({ "audio": true, "video": true });
} catch (err) {
console.error('getUserMedia() filed:', err.message);
through err;
}
return stream;
}

//============================================

Question about sample

Hi,

I had a quick question, confirmation really. This sample assumes all clients that connect would be grouped together yes? So I could use this sample as the basis for a multi group voice where each group has their own voice chat correct? Based on the code I'm assuming this is what it does. Any answer is appreciated.

Thanks Again!

NPM error on installing Mediasoup package

Iam getting an npm error when installing mediasoup "npm i mediasoup":

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node npm-scripts.js postinstall`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Os: Windows 10 - VScode terminal

"mediasoup.createWorker is not a function" on startup

Hi,

I'm getting the following error message when launching the server.
I'm running node v12.11.1 on Ubuntu 18.04.
browserify is installed as global

(replaced 2 digit in the up by XX)
the listenIp is still 0.0.0.0 but I had no better result by inserting the real ip
The listing IP at the end of the config was the real one.

The server remain up but crash when a client connect.
Here is my log from the console.

Sidenote: the open https// is missing the ":", which isn't important I guess.

> root@ubuntu-s-1vcpu-1gb-tor1-01:/opt/m/mediasoup-sample-app# npm start
> 
> > [email protected] start /opt/m/mediasoup-sample-app
> > browserify client.js -o app-bundle.js; node server.js
> 
> server is running
> open https//159.203.XX.XX:3000 in your web browser
> TypeError: mediasoup.createWorker is not a function
>     at runMediasoupWorker (/opt/m/mediasoup-sample-app/server.js:156:28)
>     at /opt/m/mediasoup-sample-app/server.js:24:11
>     at processTicksAndRejections (internal/process/task_queues.js:93:5)
> client connected
> /opt/m/mediasoup-sample-app/server.js:100
>       callback(mediasoupRouter.rtpCapabilities);
>                                ^
> 
> TypeError: Cannot read property 'rtpCapabilities' of undefined
>     at Socket.<anonymous> (/opt/m/mediasoup-sample-app/server.js:100:32)
>     at Socket.emit (events.js:210:5)
>     at /opt/m/mediasoup-sample-app/node_modules/socket.io/lib/socket.js:528:12
>     at processTicksAndRejections (internal/process/task_queues.js:75:11)
> npm ERR! code ELIFECYCLE
> npm ERR! errno 1
> npm ERR! [email protected] start: `browserify client.js -o app-bundle.js; node server.js`
> npm ERR! Exit status 1
> npm ERR!
> npm ERR! Failed at the [email protected] start script.
> npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
> 
> npm ERR! A complete log of this run can be found in:
> npm ERR!     /root/.npm/_logs/2019-10-14T14_36_13_169Z-debug.log
> ```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.