{"action":"created","issue":{"url":"https://api.github.com/repos/muaz-khan/WebRTC-Experiment/issues/2","labels_url":"https://api.github.com/repos/muaz-khan/WebRTC-Experiment/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/muaz-khan/WebRTC-Experiment/issues/2/comments","events_url":"https://api.github.com/repos/muaz-khan/WebRTC-Experiment/issues/2/events","html_url":"https://github.com/muaz-khan/WebRTC-Experiment/issues/2","id":11232643,"number":2,"title":"unable to get remote stream in case when a “remote stream” is attached by calling “peer.addStream(remoteStream)","user":{"login":"muaz-khan","id":477092,"avatar_url":"https://avatars.githubusercontent.com/u/477092?v=3","gravatar_id":"","url":"https://api.github.com/users/muaz-khan","html_url":"https://github.com/muaz-khan","followers_url":"https://api.github.com/users/muaz-khan/followers","following_url":"https://api.github.com/users/muaz-khan/following{/other_user}","gists_url":"https://api.github.com/users/muaz-khan/gists{/gist_id}","starred_url":"https://api.github.com/users/muaz-khan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muaz-khan/subscriptions","organizations_url":"https://api.github.com/users/muaz-khan/orgs","repos_url":"https://api.github.com/users/muaz-khan/repos","events_url":"https://api.github.com/users/muaz-khan/events{/privacy}","received_events_url":"https://api.github.com/users/muaz-khan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":31,"created_at":"2013-02-21T08:59:53Z","updated_at":"2015-12-17T18:17:35Z","closed_at":null,"body":"**Issue:** unable to get remote stream in case when a **“remote stream”** is attached by calling **“peer.addStream ( remoteStream )”**\r\n\r\n====\r\n## Is it beneficial to attach remote stream?\r\n\r\nYeah, it allows us overcome burden from a single peer. Burden will be shared.\r\n\r\nAlso, we can support a wide range of peer’s connectivity.\r\n\r\n====\r\n## How to attach remote stream?\r\n\r\n```javascript\r\nvar MediaStream = window.webkitMediaStream || window.MediaStream;\r\n\r\nfirstPeer.onaddstream = function(remoteSteam) {\r\n      remoteStream = new MediaStream(remoteSteam.audioTracks, remoteSteam.videoTracks);\r\n      otherPeer.addStream(remoteStream);  /* attaching remote stream */\r\n};\r\n```\r\n\r\n====\r\n## What I want to do?\r\n\r\n![WebRTC -Experiment](https://sites.google.com/site/webrtcexperiments/WebRTC-attach-remote-stream.png)\r\n\r\n1.\tFirst peer will handle first three peers\r\n2.\t2nd peer will handle next three peers (5, 6, 7)\r\n3.\t5th peer will handle next three peers (8,9,10)\r\n4.\t8th peer will handle next three peers (11, 12, 13)\r\n5.\tAnd so on.\r\n\r\nWe will get following benefits (in case of success):\r\n\r\n1.\tVideo will never freeze for 11th and upper peers \r\n2.\t1st peer don’t need to handle all participants\r\n3.\tYou don’t need to install/buy a middle server (like Asterisk) for small projects (to support a few hundred peers’ connectivity)\r\n\r\nA known bug in chromium: **peer.onicecandidate not fires for 11th peer.** *You don’t need to worry about that bug!!*\r\n\r\nPitfall: If peer number 1, 2, 5, 8 … tries to leave the room without informing other peers to play a host role.\r\n\r\n![WebRTC -Experiment](https://sites.google.com/site/webrtcexperiments/WebRTC-attach-remote-stream-possibility-of-failure.png)\r\n\r\nIf peer number 2 leaves the room, without informing master peer or peer number 5 to handling upcoming peers.\r\n\r\n====\r\n## A demo experiment to test it:\r\n\r\nhttps://googledrive.com/host/0B6GWd_dUUTT8V1Fodm9WQldkb28/\r\n\r\nOpen 4 tabs....1st table should create room……..join room from other tabs.....see the behavior of the 4th tab.\r\n"},"comment":{"url":"https://api.github.com/repos/muaz-khan/WebRTC-Experiment/issues/comments/165536540","html_url":"https://github.com/muaz-khan/WebRTC-Experiment/issues/2#issuecomment-165536540","issue_url":"https://api.github.com/repos/muaz-khan/WebRTC-Experiment/issues/2","id":165536540,"user":{"login":"josephfrazier","id":6473925,"avatar_url":"https://avatars.githubusercontent.com/u/6473925?v=3","gravatar_id":"","url":"https://api.github.com/users/josephfrazier","html_url":"https://github.com/josephfrazier","followers_url":"https://api.github.com/users/josephfrazier/followers","following_url":"https://api.github.com/users/josephfrazier/following{/other_user}","gists_url":"https://api.github.com/users/josephfrazier/gists{/gist_id}","starred_url":"https://api.github.com/users/josephfrazier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josephfrazier/subscriptions","organizations_url":"https://api.github.com/users/josephfrazier/orgs","repos_url":"https://api.github.com/users/josephfrazier/repos","events_url":"https://api.github.com/users/josephfrazier/events{/privacy}","received_events_url":"https://api.github.com/users/josephfrazier/received_events","type":"User","site_admin":false},"created_at":"2015-12-17T18:17:35Z","updated_at":"2015-12-17T18:17:35Z","body":"@shtefcs, it's been quite a while since you asked, but yes, Chrome 49 (Canary, at the time of writing) should:\r\n\r\n* [Implement adding remote audio track/stream to a PeerConnection](https://code.google.com/p/chromium/issues/detail?id=344303#c13)\r\n* [Hook up Web Audio API with WebRTC for audio processing](https://code.google.com/p/chromium/issues/detail?id=121673#c105)"}}