{"action":"opened","issue":{"url":"https://api.github.com/repos/hoxton-one/deepstream.io/issues/7","labels_url":"https://api.github.com/repos/hoxton-one/deepstream.io/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/hoxton-one/deepstream.io/issues/7/comments","events_url":"https://api.github.com/repos/hoxton-one/deepstream.io/issues/7/events","html_url":"https://github.com/hoxton-one/deepstream.io/issues/7","id":83377282,"number":7,"title":"WebRTC support","user":{"login":"WolframHempel","id":1503717,"avatar_url":"https://avatars.githubusercontent.com/u/1503717?v=3","gravatar_id":"","url":"https://api.github.com/users/WolframHempel","html_url":"https://github.com/WolframHempel","followers_url":"https://api.github.com/users/WolframHempel/followers","following_url":"https://api.github.com/users/WolframHempel/following{/other_user}","gists_url":"https://api.github.com/users/WolframHempel/gists{/gist_id}","starred_url":"https://api.github.com/users/WolframHempel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WolframHempel/subscriptions","organizations_url":"https://api.github.com/users/WolframHempel/orgs","repos_url":"https://api.github.com/users/WolframHempel/repos","events_url":"https://api.github.com/users/WolframHempel/events{/privacy}","received_events_url":"https://api.github.com/users/WolframHempel/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hoxton-one/deepstream.io/labels/epic","name":"epic","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-01T08:13:50Z","updated_at":"2015-06-01T08:13:50Z","closed_at":null,"body":"[Web Real Time Communication](https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Architecture/Connectivity)\r\n\r\nSetting up WebRTC calls is still a bit of a challenge- it requires a signalling server and a number of explicit steps on the client side. I'd like to abstract all of this away into a simple API that looks like that\r\n\r\n```javascript\r\n/**\r\n* Register this client as a callable entity\r\n*\r\n* @param {String} calleeName\r\n* @param {Function} onCall callback for incoming calls,\r\n*                          will be called with a response object\r\n*/\r\nds.rpc.register( 'userA', function onCall( remoteStream, respone ){\r\n    response.accept( localStream );\r\n    // or\r\n    response.decline( reason );// optional reason\r\n});\r\n\r\n/**\r\n* Make a call to a registered callee\r\n*\r\n* @param {String} calleeName\r\n* @param {MediaStream} localStream\r\n*/\r\nds.rpc.call( 'userB', localStream, function( error, remoteStream ) {\r\n\r\n});\r\n\r\n```"}}