{"action":"created","issue":{"url":"https://api.github.com/repos/orcajs/reflector/issues/3","labels_url":"https://api.github.com/repos/orcajs/reflector/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/orcajs/reflector/issues/3/comments","events_url":"https://api.github.com/repos/orcajs/reflector/issues/3/events","html_url":"https://github.com/orcajs/reflector/issues/3","id":81078675,"number":3,"title":"listen to peerConnection oniceconnectionstatechange to better detect disconnected?","user":{"login":"boynet","id":1615629,"avatar_url":"https://avatars.githubusercontent.com/u/1615629?v=3","gravatar_id":"","url":"https://api.github.com/users/boynet","html_url":"https://github.com/boynet","followers_url":"https://api.github.com/users/boynet/followers","following_url":"https://api.github.com/users/boynet/following{/other_user}","gists_url":"https://api.github.com/users/boynet/gists{/gist_id}","starred_url":"https://api.github.com/users/boynet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boynet/subscriptions","organizations_url":"https://api.github.com/users/boynet/orgs","repos_url":"https://api.github.com/users/boynet/repos","events_url":"https://api.github.com/users/boynet/events{/privacy}","received_events_url":"https://api.github.com/users/boynet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-26T18:24:21Z","updated_at":"2015-05-28T13:46:48Z","closed_at":null,"body":"righ now this scenerio is not detected:\r\nuserA and userB connect using video and audio.\r\n\r\nwhile talking userA lose internet connection(very common on mobile)\r\nuserB will never know that userA dissconnected and the server will also never know\r\nto detect this and maybe a lot of others types.\r\n\r\nif we listen to  oniceconnectionstatechange than when one of the users lose internet connection the other one will know by the disconnected event\r\n\r\nin orcaReflector.js in createWebRTCCall function add:\r\n````\r\nthis.oniceconnectionstatechange = function() {\r\n                status = this.iceConnectionState;\r\n                switch (status){\r\n                    case 'disconnected':\r\n                        //This may be a transient state, e. g. on a flaky network, that can recover by itself.\r\n                    case 'closed':\r\n                        this.disconnect();\r\n                }\r\n            }\r\n\r\n````"},"comment":{"url":"https://api.github.com/repos/orcajs/reflector/issues/comments/106317169","html_url":"https://github.com/orcajs/reflector/issues/3#issuecomment-106317169","issue_url":"https://api.github.com/repos/orcajs/reflector/issues/3","id":106317169,"user":{"login":"boynet","id":1615629,"avatar_url":"https://avatars.githubusercontent.com/u/1615629?v=3","gravatar_id":"","url":"https://api.github.com/users/boynet","html_url":"https://github.com/boynet","followers_url":"https://api.github.com/users/boynet/followers","following_url":"https://api.github.com/users/boynet/following{/other_user}","gists_url":"https://api.github.com/users/boynet/gists{/gist_id}","starred_url":"https://api.github.com/users/boynet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boynet/subscriptions","organizations_url":"https://api.github.com/users/boynet/orgs","repos_url":"https://api.github.com/users/boynet/repos","events_url":"https://api.github.com/users/boynet/events{/privacy}","received_events_url":"https://api.github.com/users/boynet/received_events","type":"User","site_admin":false},"created_at":"2015-05-28T13:46:48Z","updated_at":"2015-05-28T13:46:48Z","body":"ok thanks so for noobes you recommend to find other libary?\r\nwhat the reason behind not wanting to implement complete tested reflector? right now you have the best libary out there but I think that most of the people will have hard time of building thiere on reflector"}}