{"action":"created","comment":{"url":"https://api.github.com/repos/oney/react-native-webrtc/pulls/comments/134962794","pull_request_review_id":58316448,"id":134962794,"diff_hunk":"@@ -29,20 +30,29 @@ - (instancetype)init\n //    [RTCPeerConnectionFactory initializeSSL];\n \n     _peerConnections = [NSMutableDictionary new];\n-    _remoteStreams = [NSMutableDictionary new];\n-    _remoteTracks = [NSMutableDictionary new];\n     _localStreams = [NSMutableDictionary new];\n     _localTracks = [NSMutableDictionary new];\n   }\n   return self;\n }\n \n+- (RTCMediaStream*)streamForTag:(NSString*)reactTag\n+{\n+    RTCMediaStream *stream = _localStreams[reactTag];\n+    if (!stream) {\n+        for (NSNumber *peerConnectionId in _peerConnections) {","path":"ios/RCTWebRTC/WebRTCModule.m","position":24,"original_position":24,"commit_id":"126fe5f1c55cec8f9c2af4acdc899891ed140c47","original_commit_id":"126fe5f1c55cec8f9c2af4acdc899891ed140c47","user":{"login":"paweldomas","id":2965063,"avatar_url":"https://avatars3.githubusercontent.com/u/2965063?v=4","gravatar_id":"","url":"https://api.github.com/users/paweldomas","html_url":"https://github.com/paweldomas","followers_url":"https://api.github.com/users/paweldomas/followers","following_url":"https://api.github.com/users/paweldomas/following{/other_user}","gists_url":"https://api.github.com/users/paweldomas/gists{/gist_id}","starred_url":"https://api.github.com/users/paweldomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paweldomas/subscriptions","organizations_url":"https://api.github.com/users/paweldomas/orgs","repos_url":"https://api.github.com/users/paweldomas/repos","events_url":"https://api.github.com/users/paweldomas/events{/privacy}","received_events_url":"https://api.github.com/users/paweldomas/received_events","type":"User","site_admin":false},"body":"I don't see any easier way as far as my Objective C and stackoverflow knowledge goes...","created_at":"2017-08-24T09:01:54Z","updated_at":"2017-08-24T09:01:54Z","html_url":"https://github.com/oney/react-native-webrtc/pull/334#discussion_r134962794","pull_request_url":"https://api.github.com/repos/oney/react-native-webrtc/pulls/334","_links":{"self":{"href":"https://api.github.com/repos/oney/react-native-webrtc/pulls/comments/134962794"},"html":{"href":"https://github.com/oney/react-native-webrtc/pull/334#discussion_r134962794"},"pull_request":{"href":"https://api.github.com/repos/oney/react-native-webrtc/pulls/334"}}},"pull_request":{"url":"https://api.github.com/repos/oney/react-native-webrtc/pulls/334","id":137166001,"html_url":"https://github.com/oney/react-native-webrtc/pull/334","diff_url":"https://github.com/oney/react-native-webrtc/pull/334.diff","patch_url":"https://github.com/oney/react-native-webrtc/pull/334.patch","issue_url":"https://api.github.com/repos/oney/react-native-webrtc/issues/334","number":334,"state":"open","locked":false,"title":"Fix leaking remote streams on Android","user":{"login":"paweldomas","id":2965063,"avatar_url":"https://avatars3.githubusercontent.com/u/2965063?v=4","gravatar_id":"","url":"https://api.github.com/users/paweldomas","html_url":"https://github.com/paweldomas","followers_url":"https://api.github.com/users/paweldomas/followers","following_url":"https://api.github.com/users/paweldomas/following{/other_user}","gists_url":"https://api.github.com/users/paweldomas/gists{/gist_id}","starred_url":"https://api.github.com/users/paweldomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paweldomas/subscriptions","organizations_url":"https://api.github.com/users/paweldomas/orgs","repos_url":"https://api.github.com/users/paweldomas/repos","events_url":"https://api.github.com/users/paweldomas/events{/privacy}","received_events_url":"https://api.github.com/users/paweldomas/received_events","type":"User","site_admin":false},"body":"Remote streams were leaking on Android, because when a peer connection was closed tracks were not removed from WebRTCModule. This PR stores tracks and streams in PeerConnectionObserver. Also adapts the iOS part to use similar strategy instead of special react tag syntax.","created_at":"2017-08-23T09:08:03Z","updated_at":"2017-08-24T09:01:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9847ac8085078b6776b9327331964e1f25a347a4","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/oney/react-native-webrtc/pulls/334/commits","review_comments_url":"https://api.github.com/repos/oney/react-native-webrtc/pulls/334/comments","review_comment_url":"https://api.github.com/repos/oney/react-native-webrtc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oney/react-native-webrtc/issues/334/comments","statuses_url":"https://api.github.com/repos/oney/react-native-webrtc/statuses/126fe5f1c55cec8f9c2af4acdc899891ed140c47","head":{"label":"jitsi:leaking_remote_streams","ref":"leaking_remote_streams","sha":"126fe5f1c55cec8f9c2af4acdc899891ed140c47","user":{"login":"jitsi","id":3671647,"avatar_url":"https://avatars2.githubusercontent.com/u/3671647?v=4","gravatar_id":"","url":"https://api.github.com/users/jitsi","html_url":"https://github.com/jitsi","followers_url":"https://api.github.com/users/jitsi/followers","following_url":"https://api.github.com/users/jitsi/following{/other_user}","gists_url":"https://api.github.com/users/jitsi/gists{/gist_id}","starred_url":"https://api.github.com/users/jitsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jitsi/subscriptions","organizations_url":"https://api.github.com/users/jitsi/orgs","repos_url":"https://api.github.com/users/jitsi/repos","events_url":"https://api.github.com/users/jitsi/events{/privacy}","received_events_url":"https://api.github.com/users/jitsi/received_events","type":"Organization","site_admin":false},"repo":{"id":58902075,"name":"react-native-webrtc","full_name":"jitsi/react-native-webrtc","owner":{"login":"jitsi","id":3671647,"avatar_url":"https://avatars2.githubusercontent.com/u/3671647?v=4","gravatar_id":"","url":"https://api.github.com/users/jitsi","html_url":"https://github.com/jitsi","followers_url":"https://api.github.com/users/jitsi/followers","following_url":"https://api.github.com/users/jitsi/following{/other_user}","gists_url":"https://api.github.com/users/jitsi/gists{/gist_id}","starred_url":"https://api.github.com/users/jitsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jitsi/subscriptions","organizations_url":"https://api.github.com/users/jitsi/orgs","repos_url":"https://api.github.com/users/jitsi/repos","events_url":"https://api.github.com/users/jitsi/events{/privacy}","received_events_url":"https://api.github.com/users/jitsi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jitsi/react-native-webrtc","description":"A WebRTC module for React Native.","fork":true,"url":"https://api.github.com/repos/jitsi/react-native-webrtc","forks_url":"https://api.github.com/repos/jitsi/react-native-webrtc/forks","keys_url":"https://api.github.com/repos/jitsi/react-native-webrtc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jitsi/react-native-webrtc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jitsi/react-native-webrtc/teams","hooks_url":"https://api.github.com/repos/jitsi/react-native-webrtc/hooks","issue_events_url":"https://api.github.com/repos/jitsi/react-native-webrtc/issues/events{/number}","events_url":"https://api.github.com/repos/jitsi/react-native-webrtc/events","assignees_url":"https://api.github.com/repos/jitsi/react-native-webrtc/assignees{/user}","branches_url":"https://api.github.com/repos/jitsi/react-native-webrtc/branches{/branch}","tags_url":"https://api.github.com/repos/jitsi/react-native-webrtc/tags","blobs_url":"https://api.github.com/repos/jitsi/react-native-webrtc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jitsi/react-native-webrtc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jitsi/react-native-webrtc/git/refs{/sha}","trees_url":"https://api.github.com/repos/jitsi/react-native-webrtc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jitsi/react-native-webrtc/statuses/{sha}","languages_url":"https://api.github.com/repos/jitsi/react-native-webrtc/languages","stargazers_url":"https://api.github.com/repos/jitsi/react-native-webrtc/stargazers","contributors_url":"https://api.github.com/repos/jitsi/react-native-webrtc/contributors","subscribers_url":"https://api.github.com/repos/jitsi/react-native-webrtc/subscribers","subscription_url":"https://api.github.com/repos/jitsi/react-native-webrtc/subscription","commits_url":"https://api.github.com/repos/jitsi/react-native-webrtc/commits{/sha}","git_commits_url":"https://api.github.com/repos/jitsi/react-native-webrtc/git/commits{/sha}","comments_url":"https://api.github.com/repos/jitsi/react-native-webrtc/comments{/number}","issue_comment_url":"https://api.github.com/repos/jitsi/react-native-webrtc/issues/comments{/number}","contents_url":"https://api.github.com/repos/jitsi/react-native-webrtc/contents/{+path}","compare_url":"https://api.github.com/repos/jitsi/react-native-webrtc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jitsi/react-native-webrtc/merges","archive_url":"https://api.github.com/repos/jitsi/react-native-webrtc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jitsi/react-native-webrtc/downloads","issues_url":"https://api.github.com/repos/jitsi/react-native-webrtc/issues{/number}","pulls_url":"https://api.github.com/repos/jitsi/react-native-webrtc/pulls{/number}","milestones_url":"https://api.github.com/repos/jitsi/react-native-webrtc/milestones{/number}","notifications_url":"https://api.github.com/repos/jitsi/react-native-webrtc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jitsi/react-native-webrtc/labels{/name}","releases_url":"https://api.github.com/repos/jitsi/react-native-webrtc/releases{/id}","deployments_url":"https://api.github.com/repos/jitsi/react-native-webrtc/deployments","created_at":"2016-05-16T03:52:23Z","updated_at":"2017-07-17T19:07:33Z","pushed_at":"2017-08-23T10:10:58Z","git_url":"git://github.com/jitsi/react-native-webrtc.git","ssh_url":"git@github.com:jitsi/react-native-webrtc.git","clone_url":"https://github.com/jitsi/react-native-webrtc.git","svn_url":"https://github.com/jitsi/react-native-webrtc","homepage":"","size":149822,"stargazers_count":26,"watchers_count":26,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":0,"forks":13,"open_issues":0,"watchers":26,"default_branch":"master"}},"base":{"label":"oney:master","ref":"master","sha":"896947b5935668fb50f8ec3edee103d5f4f53ea4","user":{"login":"oney","id":4091190,"avatar_url":"https://avatars0.githubusercontent.com/u/4091190?v=4","gravatar_id":"","url":"https://api.github.com/users/oney","html_url":"https://github.com/oney","followers_url":"https://api.github.com/users/oney/followers","following_url":"https://api.github.com/users/oney/following{/other_user}","gists_url":"https://api.github.com/users/oney/gists{/gist_id}","starred_url":"https://api.github.com/users/oney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oney/subscriptions","organizations_url":"https://api.github.com/users/oney/orgs","repos_url":"https://api.github.com/users/oney/repos","events_url":"https://api.github.com/users/oney/events{/privacy}","received_events_url":"https://api.github.com/users/oney/received_events","type":"User","site_admin":false},"repo":{"id":43243303,"name":"react-native-webrtc","full_name":"oney/react-native-webrtc","owner":{"login":"oney","id":4091190,"avatar_url":"https://avatars0.githubusercontent.com/u/4091190?v=4","gravatar_id":"","url":"https://api.github.com/users/oney","html_url":"https://github.com/oney","followers_url":"https://api.github.com/users/oney/followers","following_url":"https://api.github.com/users/oney/following{/other_user}","gists_url":"https://api.github.com/users/oney/gists{/gist_id}","starred_url":"https://api.github.com/users/oney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oney/subscriptions","organizations_url":"https://api.github.com/users/oney/orgs","repos_url":"https://api.github.com/users/oney/repos","events_url":"https://api.github.com/users/oney/events{/privacy}","received_events_url":"https://api.github.com/users/oney/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/oney/react-native-webrtc","description":"A WebRTC module for React Native.","fork":false,"url":"https://api.github.com/repos/oney/react-native-webrtc","forks_url":"https://api.github.com/repos/oney/react-native-webrtc/forks","keys_url":"https://api.github.com/repos/oney/react-native-webrtc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oney/react-native-webrtc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oney/react-native-webrtc/teams","hooks_url":"https://api.github.com/repos/oney/react-native-webrtc/hooks","issue_events_url":"https://api.github.com/repos/oney/react-native-webrtc/issues/events{/number}","events_url":"https://api.github.com/repos/oney/react-native-webrtc/events","assignees_url":"https://api.github.com/repos/oney/react-native-webrtc/assignees{/user}","branches_url":"https://api.github.com/repos/oney/react-native-webrtc/branches{/branch}","tags_url":"https://api.github.com/repos/oney/react-native-webrtc/tags","blobs_url":"https://api.github.com/repos/oney/react-native-webrtc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oney/react-native-webrtc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oney/react-native-webrtc/git/refs{/sha}","trees_url":"https://api.github.com/repos/oney/react-native-webrtc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oney/react-native-webrtc/statuses/{sha}","languages_url":"https://api.github.com/repos/oney/react-native-webrtc/languages","stargazers_url":"https://api.github.com/repos/oney/react-native-webrtc/stargazers","contributors_url":"https://api.github.com/repos/oney/react-native-webrtc/contributors","subscribers_url":"https://api.github.com/repos/oney/react-native-webrtc/subscribers","subscription_url":"https://api.github.com/repos/oney/react-native-webrtc/subscription","commits_url":"https://api.github.com/repos/oney/react-native-webrtc/commits{/sha}","git_commits_url":"https://api.github.com/repos/oney/react-native-webrtc/git/commits{/sha}","comments_url":"https://api.github.com/repos/oney/react-native-webrtc/comments{/number}","issue_comment_url":"https://api.github.com/repos/oney/react-native-webrtc/issues/comments{/number}","contents_url":"https://api.github.com/repos/oney/react-native-webrtc/contents/{+path}","compare_url":"https://api.github.com/repos/oney/react-native-webrtc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oney/react-native-webrtc/merges","archive_url":"https://api.github.com/repos/oney/react-native-webrtc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oney/react-native-webrtc/downloads","issues_url":"https://api.github.com/repos/oney/react-native-webrtc/issues{/number}","pulls_url":"https://api.github.com/repos/oney/react-native-webrtc/pulls{/number}","milestones_url":"https://api.github.com/repos/oney/react-native-webrtc/milestones{/number}","notifications_url":"https://api.github.com/repos/oney/react-native-webrtc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oney/react-native-webrtc/labels{/name}","releases_url":"https://api.github.com/repos/oney/react-native-webrtc/releases{/id}","deployments_url":"https://api.github.com/repos/oney/react-native-webrtc/deployments","created_at":"2015-09-27T10:57:30Z","updated_at":"2017-08-22T15:07:59Z","pushed_at":"2017-08-23T10:12:08Z","git_url":"git://github.com/oney/react-native-webrtc.git","ssh_url":"git@github.com:oney/react-native-webrtc.git","clone_url":"https://github.com/oney/react-native-webrtc.git","svn_url":"https://github.com/oney/react-native-webrtc","homepage":"","size":149841,"stargazers_count":996,"watchers_count":996,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":222,"mirror_url":null,"open_issues_count":53,"forks":222,"open_issues":53,"watchers":996,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/oney/react-native-webrtc/pulls/334"},"html":{"href":"https://github.com/oney/react-native-webrtc/pull/334"},"issue":{"href":"https://api.github.com/repos/oney/react-native-webrtc/issues/334"},"comments":{"href":"https://api.github.com/repos/oney/react-native-webrtc/issues/334/comments"},"review_comments":{"href":"https://api.github.com/repos/oney/react-native-webrtc/pulls/334/comments"},"review_comment":{"href":"https://api.github.com/repos/oney/react-native-webrtc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oney/react-native-webrtc/pulls/334/commits"},"statuses":{"href":"https://api.github.com/repos/oney/react-native-webrtc/statuses/126fe5f1c55cec8f9c2af4acdc899891ed140c47"}}}}
{"actor":{"display_login":"paweldomas"}}