Open ghost opened 6 years ago
Your issue is lack of information, It would be nice to have more details of what you did, SDP offer and answer..
But I think I know what is the problem, I've already opened an issue for myself and I think it will fix the problem.
Ho did you used the code, did you change anything?
Firstly I use this build https://github.com/kirushyk/kms-windows Did't change code, only hosts.. I'm trying to get PCMU
v=0
o=- 2857740885 0 IN IP4 192.168.0.16
s=Peleng
c=IN IP4 192.168.0.64
b=RR:0
t=0 0
m=audio 50000 RTP/AVP 0
a=rtpmap:0 PCMU/8000
Can you share the all output?
It seems that " get waiting candidates from FIfo " function runs in parallel to the main "loop", this isn't suppose to happen... weird
listenning at 3000
Connection received with sessionId H-Xcp8BzLUw5DYS5UIjYZJdzq3BHrgjq
received "start" message
received ice candidate
queue
received ice candidate
queue
successfully created kClient
received ice candidate
queue
successfully created pipeline
received ice candidate
queue
received ice candidate
queue
received ice candidate
queue
received ice candidate
queue
received ice candidate
queue
successfully created WebRtcEndpoint
successfully create rtpEndpoint
successfully process sdp from encoder
v=0
o=- 3719892984 3719892984 IN IP4 192.168.0.64
s=Kurento Media Server
c=IN IP4 192.168.0.64
t=0 0
m=audio 20118 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=ssrc:2692837732 cname:user2740768217@host-9b3ff8bd
encoder connection state: CONNECTED
successfullty processed sdp offer from client
fifo 8
added waiting ice
added waiting ice
added waiting ice
added waiting ice
added waiting ice
{}
finish
finish loop null
Trace: Error: Callback was already called.
at C:\Users\mihail\Desktop\rtp\node_modules\async\dist\async.js:955:32
at async.retry (C:\Users\mihail\Desktop\rtp\Kurento\KurentoClient.js:240:21)
at C:\Users\mihail\Desktop\rtp\node_modules\async\dist\async.js:4603:26
at WebRtcEndpoint.webRtcEndpoint.addIceCandidate (C:\Users\mihail\Desktop\rtp\Kurento\KurentoClient.js:224:29)
at callback2 (C:\Users\mihail\Desktop\rtp\node_modules\promisecallback\index.js:27:25)
at process._tickDomainCallback (internal/process/next_tick.js:135:7)
at callback2 (C:\Users\mihail\Desktop\rtp\node_modules\promisecallback\index.js:32:17)
at process._tickDomainCallback (internal/process/next_tick.js:135:7)
(node:5108) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Callback was already called.
This was observed in Firefox. And browser log:
This appears to be Firefox adapter.js:34:5
socket opened client.js:22:5
Page loaded ... client.js:8:2
Creating WebRtcPeer and generating local sdp offer ... client.js:92:5
sending local sdp offer client.js:87:5
local candidate: {"candidate":"candidate:0 1 UDP 2122252543 192.168.0.64 60331 typ host","sdpMid":"sdparta_0","sdpMLineIndex":0} client.js:62:9
local candidate: {"candidate":"candidate:1 1 UDP 2122187007 2001:0:9d38:6ab8:2489:357a:ae21:128d 60332 typ host","sdpMid":"sdparta_0","sdpMLineIndex":0} client.js:62:9
local candidate: {"candidate":"candidate:2 1 TCP 2105524479 192.168.0.64 9 typ host tcptype active","sdpMid":"sdparta_0","sdpMLineIndex":0} client.js:62:9
local candidate: {"candidate":"candidate:3 1 TCP 2105458943 2001:0:9d38:6ab8:2489:357a:ae21:128d 9 typ host tcptype active","sdpMid":"sdparta_0","sdpMLineIndex":0} client.js:62:9
local candidate: {"candidate":"candidate:0 2 UDP 2122252542 192.168.0.64 60333 typ host","sdpMid":"sdparta_0","sdpMLineIndex":0} client.js:62:9
local candidate: {"candidate":"candidate:1 2 UDP 2122187006 2001:0:9d38:6ab8:2489:357a:ae21:128d 60334 typ host","sdpMid":"sdparta_0","sdpMLineIndex":0} client.js:62:9
local candidate: {"candidate":"candidate:2 2 TCP 2105524478 192.168.0.64 9 typ host tcptype active","sdpMid":"sdparta_0","sdpMLineIndex":0} client.js:62:9
local candidate: {"candidate":"candidate:3 2 TCP 2105458942 2001:0:9d38:6ab8:2489:357a:ae21:128d 9 typ host tcptype active","sdpMid":"sdparta_0","sdpMLineIndex":0} client.js:62:9
null candidate client.js:59:9
SDP answer received, processing.. client.js:45:13
URL.createObjectURL(MediaStream) is deprecated and will be removed soon. client.js:101:26
Object { } client.js:30:13
ws.onmessage http://localhost:3000/client.js:30:13
Во время загрузки страницы соединение с ws://localhost:8080/
in Chrome the situation is more interesting, but the sound doesn't come to the browser
Man, you have to look in the example's code, you missed a very important little thing:
You have to change offerToReceiveAudio
to 1 in the last row in client.js
:
webRtcPeer.createOffer((offer) => onLocalOfferCreated(null, offer), (err) => onLocalOfferCreated(err, null), { offerToReceiveAudio: 1, offerToReceiveVideo: 1 });
}
Yes, of course, I changed it long ago, so the problem is something else
Did you reconfigure your encoder to transmit audio to the udp port that Kurento described in the sdp answer after the session started and a FLOWING event recevied?
Yes
What is the red OK message that is shown in chrome's console?
Please try the following steps:
offerToReceiveVideo
to 0
video
html tag, maybe you need to use an audio
html tag insteadFirefox asked me to add the second argument
webRtcPeer.addIceCandidate(parsedMsg.candidate, function(err)...
webRtcPeer.addIceCandidate(parsedMsg.candidate, function(){console.error('OK');}, function(err)...
Yes, offerToReceiveVideo
was setting to 0
. Will try to use audio tag.
Yeah I didn't try this example on firefox, only on chrome..
I understand that using the audio tag did the trick?
Sorry, I can check the audio tag only tomorrow.
No, the audio tag is not working.
The only thing I can think of is playing in the client side code and html. Find out what is the codec kurento is sending the configure the audio tag properly.
I don't know how I can config the audio tag if I'm sending PCMU..
Hi,
Fix for your original issue: 06a8085
Best Regards