{"id":22425021,"url":"https://github.com/pushpender-singh-ap/react-native-peer","last_synced_at":"2025-07-22T23:02:31.573Z","repository":{"id":217484603,"uuid":"744046786","full_name":"pushpender-singh-ap/react-native-peer","owner":"pushpender-singh-ap","description":"A React Native wrapper for PeerJS. PeerJS simplifies WebRTC peer-to-peer data, video, and audio calls.","archived":false,"fork":false,"pushed_at":"2024-01-16T15:26:20.000Z","size":4,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-02T03:50:46.183Z","etag":null,"topics":["peer","peerjs","react-native","react-native-peer","react-native-peerjs","react-native-webrtc","webrtc"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-native-peer","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pushpender-singh-ap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-01-16T14:26:30.000Z","updated_at":"2025-05-29T17:47:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"197f210d-da7f-4467-a8a9-6062fd2b3842","html_url":"https://github.com/pushpender-singh-ap/react-native-peer","commit_stats":null,"previous_names":["pushpender-singh-ap/react-native-peer"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pushpender-singh-ap/react-native-peer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushpender-singh-ap%2Freact-native-peer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushpender-singh-ap%2Freact-native-peer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushpender-singh-ap%2Freact-native-peer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushpender-singh-ap%2Freact-native-peer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pushpender-singh-ap","download_url":"https://codeload.github.com/pushpender-singh-ap/react-native-peer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushpender-singh-ap%2Freact-native-peer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266586839,"owners_count":23952199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["peer","peerjs","react-native","react-native-peer","react-native-peerjs","react-native-webrtc","webrtc"],"created_at":"2024-12-05T19:12:03.748Z","updated_at":"2025-07-22T23:02:31.563Z","avatar_url":"https://github.com/pushpender-singh-ap.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-peer\n\nA React Native wrapper for [PeerJS](https://peerjs.com/). PeerJS simplifies WebRTC peer-to-peer data, video, and audio calls.\n\n## Getting started\n\n### To install and start using react-native-peer\n\n```sh\nnpm install react-native-peer\n```\n\n## Usage\n\nTo use react-native-peer, `import` the `react-native-peer` module and use the `Peer`.\n\nHere is an example of basic usage:\n\n```js\nimport Peer from 'react-native-peer';\n\nconst globalPeer = new Peer();\nglobalPeer.on('error', console.log);\n\nglobalPeer.on('open', globalPeerID =\u003e {\n  console.log('Local peer open with ID', globalPeerID);\n\n  const remotePeer = new Peer();\n  remotePeer.on('error', console.log);\n  remotePeer.on('open', remotePeerId =\u003e {\n    console.log('Remote peer open with ID', remotePeerId);\n\n    const conn = remotePeer.connect(globalPeerID);\n    conn.on('error', console.log);\n    conn.on('open', () =\u003e {\n      console.log('Remote peer has opened connection.');\n      console.log('conn', conn);\n      conn.on('data', data =\u003e console.log('Received from local peer', data));\n      console.log('Remote peer sending data.');\n      conn.send('Hello, this is the REMOTE peer!');\n    });\n  });\n});\n\nglobalPeer.on('connection', conn =\u003e {\n  console.log('Local peer has received connection.');\n  conn.on('error', console.log);\n  conn.on('open', () =\u003e {\n    console.log('Local peer has opened connection.');\n    console.log('conn', conn);\n    conn.on('data', data =\u003e console.log('Received from remote peer', data));\n    console.log('Local peer sending data.');\n    conn.send('Hello, this is the LOCAL peer!');\n  });\n});\n\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpushpender-singh-ap%2Freact-native-peer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpushpender-singh-ap%2Freact-native-peer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpushpender-singh-ap%2Freact-native-peer/lists"}