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

Ability to send messages without calling #18

Closed martinbomio closed 8 years ago

martinbomio commented 8 years ago

@stephenlb I am not sure if this is needed but it is useful for my use case so I opened this PR. Feel free to not merge it if you think it is not necessary.

Basically, adds the ability to send a message to another phone using the pubnub channel. (without needing to start the call first).

var phone = PHONE({...})
phone.ready(function() {
    phone.send("Hi!", someOtherPhoneNumber);
})
stephenlb commented 8 years ago

makes sense to me!