muaz-khan / RTCMultiConnection

RTCMultiConnection is a WebRTC JavaScript library for peer-to-peer applications (screen sharing, audio/video conferencing, file sharing, media streaming etc.)
https://muazkhan.com:9001/
MIT License
2.57k stars 1.37k forks source link

rooms-list is not listing all rooms #48

Open mokerhamer opened 9 years ago

mokerhamer commented 9 years ago

After testing multiple demo systems like. https://www.webrtc-experiment.com/RTCMultiConnection/videoconferencing.html https://www.webrtc-experiment.com/RTCMultiConnection/audioconferencing.html

I noticed that it just lists 1 room at a time. I'm currently using/developing the Audio Conference system on my website. Is there any way we can come in contact like skype orso?

Besides that i have more wishes like displaying the "Character Name" and at this point i dont know how, since it's new to me.

muaz-khan commented 9 years ago

Replace Line 176-L181 with:

document.getElementById('setup-new-conference').onclick = function() {
    this.disabled = true;

    var roomid = document.getElementById('conference-name').value || 'Anonymous';
    connection.extra = {
        'session-name': roomid,
        'fullName': 'something special'
    };
    connection.sessionid = roomid;
    connection.open();
};

Regarding passing extra data - Line 124-L129:

connection.onstream = function(e) {
    e.mediaElement.title = e.extra.fullName; // check this line

    e.mediaElement.width = 600;
    videosContainer.insertBefore(e.mediaElement, videosContainer.firstChild);
    rotateVideo(e.mediaElement);
    scaleVideos();
};

BTW, both demos are fixed. You can reload the pages multiple times and try again. Make sure that you enters unique session-name before creating the rooms.

Demos are using something simpler now, instead:

document.getElementById('setup-new-conference').onclick = function() {
    this.disabled = true;
    connection.open(document.getElementById('conference-name').value || 'Anonymous');
};

// and
connection.onNewSession = function(session) {
     alert( session.sessionid ); // unique session id listed on users' pages.
};
mokerhamer commented 9 years ago

Is there anyway to come in contact with you? I'm working on a Opensource game and i would love to integrate the system into the website, but i'm having some diffculties matching the voice stream to the logged in player to display his name and such.

http://fortissimum.net http://test.fortissimum.net

Thanks for Replying