stephenlb / webrtc-sdk

WebRTC Simple Calling API + Mobile SDK - A simplified approach to RTCPeerConnection for mobile and web video calling apps.
https://stephenlb.github.io/webrtc-sdk/
MIT License
854 stars 279 forks source link

Change media in current call #14

Closed martinbomio closed 8 years ago

martinbomio commented 8 years ago

Hi, is there a way to change the media in the phone without instantiating a new PHONE instance? Something like:

var phone = PHONE({number: "1234", media: { audio : true, video : false }});
phone.dial("567");
phone.media({ audio : true, video : true })
stephenlb commented 8 years ago

Hi Martin! currently a way does not exist. You need to make a new phone instance. On Nov 28, 2015 7:54 AM, "Martin" notifications@github.com wrote:

Hi, is there a way to change the media in the phone without instantiating a new PHONE instance? Something like:

var phone = PHONE({number: "1234", media: { audio : true, video : false }}); phone.dial("567"); phone.media({ audio : true, video : true })

— Reply to this email directly or view it on GitHub https://github.com/stephenlb/webrtc-sdk/issues/14.

martinbomio commented 8 years ago

Thanks Stephen! Do you think this is doable? If so, I can try to implement it. Not sure if it's possible to change the stream in the peer connection. I see it is added this way:

            // Add Local Media Streams Audio Video Mic Camera
            talk.pc.addStream(mystream);
stephenlb commented 8 years ago

Hi Martin, I am not totally sure if that will do the trick.

On Sun, Nov 29, 2015 at 12:45 PM, Martin notifications@github.com wrote:

Thanks Stephen! Do you think this is doable? If so, I can try to implement it. Not sure if it's possible to change the stream in the peer connection. I see it is added this way:

        // Add Local Media Streams Audio Video Mic Camera
        talk.pc.addStream(mystream);

— Reply to this email directly or view it on GitHub https://github.com/stephenlb/webrtc-sdk/issues/14#issuecomment-160469823 .

Cheers! Stephen Blum - CTO http://twitter.com/PubNub https://github.com/pubnub/pubnub-api - GitHub https://help.pubnub.com/ - Help Desk www.pubnub.com +1-425-830-6711