powered by Jive Software

Multiple User Voice Chat with Candy, Openfire & WebRTC

Hello Vidhuran,

It works if the request is made to ws requests are made through port 7070.

Can you share with team what changes you made to get the app working in details? Specifically what changes you made in libs/strophe-connection-websockets.js

Thanks Aelix

As Dele had mentioned just change line number 191 in libs/strophe-connection-websockets.js to comething like this

this.url = this.protocol + “//” + this.host + “***:7070***/ws/server?username=” + this.username + “&password=” + this.pass + “&resource=” + this.resource;

But now i seem to have the problem that only one persons audio is heard to the others and their audio is not heard at all.

Hi,

The reason why the only my audio is heard to other peers and their audio is not heard by me is that the setAudioTrack function throws an error.

In plugins/webrtc/webrtc.js line 447

RTCPeerConnection {ondatachannel: null, onicechange: null, ongatheringchange: null, onremovestream: function, onaddstream: function…}

  1. iceConnectionState: “starting”
  2. iceGatheringState: “new”
  3. localDescription: RTCSessionDescription
  4. localStreams: MediaStreamList
  5. 0: LocalMediaStream
  6. ended: false
  7. id: “sWHnEwyoxPovgiAamNZwbcsJN8Cfmj6BdorL”
  8. label: “sWHnEwyoxPovgiAamNZwbcsJN8Cfmj6BdorL”
  9. onaddtrack: null
  10. onended: null
  11. onremovetrack: null
  12. proto: LocalMediaStream
  13. length: 1
  14. proto: MediaStreamList
  15. onaddstream: function () { [native code] }
  16. ondatachannel: null
  17. ongatheringchange: null
  18. onicecandidate: function () { [native code] }
  19. onicechange: null
  20. onnegotiationneeded: null
  21. onopen: function () { [native code] }
  22. onremovestream: function () { [native code] }
  23. onstatechange: function () { [native code] }
  24. readyState: “stable”
  25. remoteDescription: RTCSessionDescription
  26. remoteStreams: MediaStreamList
  27. 0: MediaStream
  28. length: 1
  29. proto: MediaStreamList
  30. signalingState: “stable”
  31. proto: RTCPeerConnection

webrtc.js:448

  1. Uncaught TypeError: Cannot read property ‘0’ of undefined webrtc.js:450

You can observe from the logs above that localStreams doesn’t have any element named audioStreams thus giving the error.

WebRtc.localStream also shows up the same thing , it does not seem to contain audioStreams

WebRtc.localStream

LocalMediaStream {onremovetrack: null, onaddtrack: null, onended: null, ended: false, id: “sWHnEwyoxPovgiAamNZwbcsJN8Cfmj6BdorL”…}

  1. ended: false
  2. id: “sWHnEwyoxPovgiAamNZwbcsJN8Cfmj6BdorL”
  3. label: “sWHnEwyoxPovgiAamNZwbcsJN8Cfmj6BdorL”
  4. onaddtrack: null
  5. onended: null
  6. onremovetrack: null
  7. proto: LocalMediaStream

Is it some browser specific issue ? I’m using the Dev channel chrome Version 26.0.1397.2 dev.

Could be browser specific as I tested again on redfire.4ng.net with Version 24.0.1312.57 and I am not getting these errors

Yes , these are browser specific , i tested them with a normal channel release of chrome and it works , the problem is seen only in Dev channel releases … and it could be fixed by

replacing lines like this

this.pc.localStreams[0].audioTracks[0].enabled = true;

with this

this.pc.localStreams[0].audioTracks == undefined ? this.pc.localStreams[0].getAudioTracks()[0].enabled = true : this.pc.localStreams[0].audioTracks[0].enabled = true;

Note that this has to be changed in quite a number of places in plugins/webrtc/webrtc.js **
**

I am pretty sure, there would be a live community commiting patches and fixes for all this openfire stuff and this stuff would involve much master if you would choose a state of the art opensource community plattform an source code managment, that would allow easy partitioning and contributing.

Neither contributing is is possible for everyone on code level nor an quality issue tracker is avaiblabe, where code changes can be linked with issues.

Please move this whole stuff to github.com. Building up a repository in less than some clicks and done in some minutes. Then everyone can fork and upstream his pacthes and master can merge them after review.

Patching by comments “change this line by this line from download link from comments number x” won’t envovle this code fast anywhere.

I’m just sad about this great project and stuff around has to suffer from such bad environment.

Great suggestion, but Ignite Realtime needs more developers like you to get involved more than it needs to migrate to github.com

Last time I checked, all ignite realtime projects are on SVN and linked to Jira for issue tracking. Get hold of the project owner and submit a patch if you have one.

Github.com may be the in-place at the moment, but it is a commercial organisation. Why should we leave our own hosted servers which is sponsored by Jive with all the tools we need for now and use a commercial hosted service with possible new restrictions and limits.

There is a time to use SVN and there times when Git is better. Depends on the needs of the project. Latest and greatest is not aways the best choice.