Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTCMultiConnection-v1.3 test — Demo not working #46

Open
manoharan250 opened this issue Jun 10, 2013 · 4 comments
Open

RTCMultiConnection-v1.3 test — Demo not working #46

manoharan250 opened this issue Jun 10, 2013 · 4 comments

Comments

@manoharan250
Copy link

1 -> started a new session
2 -> gave the same URL in the another system.

only can view the self video , but not the peer video. Text chat is also not working.

@muaz-khan
Copy link
Owner

See this demo hosted on jsfiddle; and it works. Demo source code

<script src="https://webrtc-experiment.appspot.com/RTCMultiConnection-v1.3.js"></script>
<button id="init">Init</button>
var connection = new RTCMultiConnection();
connection.session = {
    audio: true,
    video: true
};

// get access to local or remote streams
connection.onstream = function (e) {
    document.body.appendChild(e.mediaElement);
}

// searching/connecting pre-created session
connection.connect('session-id');

// to create/open a new session
// it should be called "only-once" by the session-initiator
document.getElementById('init').onclick = function() {
    connection.open('session-id');
    this.disabled = true;
};

Another testing demo is also available here.

@manoharan250
Copy link
Author

https://webrtc-experiment.appspot.com/RTCMultiConnection-v1.3/
Am not able to run the above demo.
I could see the SDP's are shared between the browsers through console.

In this http://jsfiddle.net/3tNQ2/3/embedded/result/
how to renegotiate video/audio?

@muaz-khan
Copy link
Owner

Test it now. Source code

document.getElementById('renegotiate').onclick = function() {
    connection.addStream({
        audio: true,
        video: true
    });
}

Process

  1. First of all; data connection is opened between two peers.
  2. Then audio and video streams are renegotiated.

If you're sharing audio; then you can't renegotiate audio stream because duplicate m-lines are not allowed in the session descriptions. Same is true with video and data streams.

@manoharan250
Copy link
Author

It works.!!, but the video is added twice or thrice to the initiator.
and
Is it compatible with Socket.IO?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants