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