No Audio in Step-6 Code

Issue #25 new
Jo Yum created an issue

Hello,

I'm running a slightly modified version of the Step-6 code, which customizes the room name for any two peers that request connection. I added custom signaling to negotiate the room name. That's the "p2p server relay" signal you'll see in the log below.

With the Step-6 code, video streaming works fine, but audio streaming doesn't work at all. And there aren't any error messages in the Chrome consoles of the two peers.

The Step-6 constraints for getUserMedia() did not include audio, like this:

var constraints = {video: true};
getUserMedia(constraints, handleUserMedia, handleUserMediaError);

So I added the audio constraint, like this:

var constraints = {audio: true, video: true};
getUserMedia(constraints, handleUserMedia, handleUserMediaError);

Another member on this site, also experienced zero audio with the Step-6 code, and he posted an issue here, but unfortunately nobody replied.

The same happens with two Firefox clients, or two Opera clients (video yes, audio no.)

I tried removing preferOpus() from the client JS with same result (video yes, audio no.)

My s/w versions are:

node.js 0.10.38
node-static 0.7.6
socket.io 1.3.5

I installed the signaling code (node.js, socket.io, node-static) on a public server, so I can test the Step-6 code over the Internet.

The STUN server is the one given in the Step-6 code, like this:

stun.l.google.com:19302

I used the same client hardware (Windows 7 and OSX 10.6.8) to run https://www.apprtc.net (the WebRTC demo that uses Google App Engine for signaling). Both audio and video work perfectly on that WebRTC demo.

However, I noticed a lot more signaling traffic on https://www.apprtc.net compared to my Step-6 code's relatively sparse signaling traffic.

Below is the signaling traffic of my Step-6 code on a Chrome client (Windows 7). This signaling allowed perfect video streaming, but no audio at all.

At your request, I can provide screen shots of any Objects in the signaling traffic below, to help resolve this issue:

This appears to be Chrome

Getting user media with constraints Object {audio: true, video: true}

Socket connected

Adding local stream.

Client sending message:  got user media

maybeStart() isStarted=false / typeofLocalStream=defined / isChannelReady=true

Created RTCPeerConnnection

>>> Message from server:  Got message:  got user media

Client received message: got user media

mkCall() sending "avid call offer" from/to  test004/test002

>>> Message from server:  socket.on("p2p server relay") relaying msg-type "avid call offer" from/to  test004/test002

socket.on("p2p server relay") received msg-type "avid call accepted" from/to  test002/test004

socket.on("p2p server relay") on "avid call accepted" joining room  test004-test002

Create or join room test004-test002

socket.on("p2p server relay") sending message "send me webrtc offer"

>>> Message from server:  Room test004-test002 has 1 client(s)

>>> Message from server:  Request to create or join room  test004-test002

This peer has joined room test004-test002

>>> Message from server:  Joined room  test004-test002

>>> Message from server:  Room test004-test002 has 2 client(s)

>>> Message from server:  Request to create or join room  test004-test002

>>> Message from server:  socket.on("p2p server relay") relaying msg-type "send me webrtc offer" from/to  test004/test002

Client received message: Object {type: "offer", sdp: "v=0
↵o=- 465806041336689787 2 IN IP4 127.0.0.1
↵s=…8838 label:725e4a8a-9d13-424a-9cd1-d8c6711e355c
↵"}

Sending answer to peer.

setLocalAndSendMessage sending message RTCSessionDescription {}

Client sending message:  RTCSessionDescription {}

Client received message: Object {type: "candidate", label: 0, id: "audio", candidate: "candidate:2795255774 1 udp 2122260223 192.168.1.7 54186 typ host generation 0"}

Client received message: Object {type: "candidate", label: 0, id: "audio", candidate: "candidate:2795255774 2 udp 2122260222 192.168.1.7 51236 typ host generation 0"}

Client received message: Object {type: "candidate", label: 1, id: "video", candidate: "candidate:2795255774 1 udp 2122260223 192.168.1.7 53982 typ host generation 0"}

Client received message: Object {type: "candidate", label: 1, id: "video", candidate: "candidate:2795255774 2 udp 2122260222 192.168.1.7 55195 typ host generation 0"}

Client received message: Object {type: "candidate", label: 0, id: "audio", candidate: "candidate:3894397742 1 tcp 1518280447 192.168.1.7 0 typ host tcptype active generation 0"}

Client received message: Object {type: "candidate", label: 0, id: "audio", candidate: "candidate:3894397742 2 tcp 1518280446 192.168.1.7 0 typ host tcptype active generation 0"}

Client received message: Object {type: "candidate", label: 1, id: "video", candidate: "candidate:3894397742 1 tcp 1518280447 192.168.1.7 0 typ host tcptype active generation 0"}

Client received message: Object {type: "candidate", label: 1, id: "video", candidate: "candidate:3894397742 2 tcp 1518280446 192.168.1.7 0 typ host tcptype active generation 0"}

Remote stream added.

handleIceCandidate event:  RTCIceCandidateEvent {}

Client sending message:  Object {type: "candidate", label: 0, id: "audio", candidate: "candidate:2437072876 1 udp 2122260223 192.168.1.2 57210 typ host generation 0"}

handleIceCandidate event:  RTCIceCandidateEvent {}

Client sending message:  Object {type: "candidate", label: 1, id: "video", candidate: "candidate:2437072876 1 udp 2122260223 192.168.1.2 57210 typ host generation 0"}

>>> Message from server:  Got message:  Object {type: "answer", sdp: "v=0
↵o=- 5000668392638045311 2 IN IP4 127.0.0.1
↵s…3093 label:a2237698-392a-4a14-8382-63e92f163ee5
↵"}

>>> Message from server:  Got message:  Object {type: "candidate", label: 0, id: "audio", candidate: "candidate:2437072876 1 udp 2122260223 192.168.1.2 57210 typ host generation 0"}

>>> Message from server:  Got message:  Object {type: "candidate", label: 1, id: "video", candidate: "candidate:2437072876 1 udp 2122260223 192.168.1.2 57210 typ host generation 0"}

handleIceCandidate event:  RTCIceCandidateEvent {}

Client sending message:  Object {type: "candidate", label: 0, id: "audio", candidate: "candidate:3753982748 1 tcp 1518280447 192.168.1.2 0 typ host tcptype active generation 0"}

handleIceCandidate event:  RTCIceCandidateEvent {}

Client sending message:  Object {type: "candidate", label: 1, id: "video", candidate: "candidate:3753982748 1 tcp 1518280447 192.168.1.2 0 typ host tcptype active generation 0"}
handleIceCandidate event:  RTCIceCandidateEvent {}

End of candidates.

>>> Message from server:  Got message:  Object {type: "candidate", label: 0, id: "audio", candidate: "candidate:3753982748 1 tcp 1518280447 192.168.1.2 0 typ host tcptype active generation 0"}

>>> Message from server:  Got message:  Object {type: "candidate", label: 1, id: "video", candidate: "candidate:3753982748 1 tcp 1518280447 192.168.1.2 0 typ host tcptype active generation 0"}

Comments (1)

  1. Jo Yum reporter

    An update on this issue:

    The chrome://webrtc-internals on both clients show that the audio streams are being sent and received, but the audio of one client is not heard on the other client.

    Also, with the Step-6 code, there's a lot of audio feedback of each client's self audio stream. That much audio feedback doesn't happen on the https://www.apprtc.net demo. On that demo, at normal volume levels, speech is heard normally without significant distortion.

    Below is a screenshot of the audio sections of chrome://webrtc-internals on a Window-7 Chrome client, running the Step-6 code:

    Thank you.

    Chrome-Avid06-WebRTC-Internals-y150529-01.png

  2. Log in to comment