{"id":19556720,"url":"https://github.com/webmobi59/react-native-webrtc","last_synced_at":"2026-05-15T06:33:59.986Z","repository":{"id":130333612,"uuid":"73405362","full_name":"WebMobi59/React-Native-WebRTC","owner":"WebMobi59","description":"Framework - simple","archived":false,"fork":false,"pushed_at":"2016-11-10T17:43:58.000Z","size":15829,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-08T21:38:08.596Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WebMobi59.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2016-11-10T17:33:03.000Z","updated_at":"2017-09-20T00:26:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"5da4ab2d-6a2a-4d9d-89c1-46948e31f6c9","html_url":"https://github.com/WebMobi59/React-Native-WebRTC","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebMobi59%2FReact-Native-WebRTC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebMobi59%2FReact-Native-WebRTC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebMobi59%2FReact-Native-WebRTC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebMobi59%2FReact-Native-WebRTC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WebMobi59","download_url":"https://codeload.github.com/WebMobi59/React-Native-WebRTC/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240814839,"owners_count":19861955,"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","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":[],"created_at":"2024-11-11T04:38:58.360Z","updated_at":"2026-05-15T06:33:54.965Z","avatar_url":"https://github.com/WebMobi59.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-webrtc\n\n[![npm version](https://badge.fury.io/js/react-native-webrtc.svg)](https://badge.fury.io/js/react-native-webrtc)\n[![npm downloads](https://img.shields.io/npm/dm/react-native-webrtc.svg?maxAge=2592000)](https://img.shields.io/npm/dm/react-native-webrtc.svg?maxAge=2592000)\n\nA WebRTC module for React Native.\n\n## Support\n- Currently support for iOS and Android.  \n- Support video and audio communication.  \n- Supports data channels.  \n- You can use it to build an iOS/Android app that can communicate with web browser.  \n- The WebRTC Library is based on [webrtc-build-scripts](https://github.com/pristineio/webrtc-build-scripts)\n\n## WebRTC Revision\n\nSince `0.53`, we use same branch version number like in webrtc native.\nplease see [wiki page](https://github.com/oney/react-native-webrtc/wiki) about revision history \n\n### format:\n\n`${branch_name} stable (${branched_from_revision})(+${Cherry-Picks-Num}-${Last-Cherry-Picks-Revision})`\n\n* the webrtc revision in brackets is extracting frrom `Cr-Branched-From` instead `Cr-Commit-Position`  \n* the number follows with `+` is the additional amount of cherry-picks since `Branched-From` revision.\n\n### note:\nthe order of commit revision is nothing to do with the order of cherry-picks, for example, the esarlier committed `cherry-pick-#2` may have higher revision than `cherry-pick-#3` and vice versa.\n\n| react-native-webrtc | WebRTC(ios) | WebRTC(android)  | npm published | note |\n| :-------------: | :-------------:| :-----: | :-----: | :-----: | :-----: |\n| 0.53.2 | 53 stable\u003cbr\u003e(13317)\u003cbr\u003e(+6-13855)\u003cbr\u003e32/64 | 53 stable\u003cbr\u003e(13317)\u003cbr\u003e(+6-13855)\u003cbr\u003e32 | :heavy_check_mark: | |\n| 0.54.0 | 54 stable\u003cbr\u003e(13869)\u003cbr\u003e(+6-14091)\u003cbr\u003e32/64 | 54 stable\u003cbr\u003e(13869)\u003cbr\u003e(+6-14091)\u003cbr\u003e32 | :heavy_check_mark: | |\n| master | 54 stable\u003cbr\u003e(13869)\u003cbr\u003e(+6-14091)\u003cbr\u003e32/64 | 54 stable\u003cbr\u003e(13869)\u003cbr\u003e(+6-14091)\u003cbr\u003e32 | :warning:          | |\n\n## Installation\n\n### react-native-webrtc:\n\n- [iOS](https://github.com/oney/react-native-webrtc/blob/master/Documentation/iOSInstallation.md)\n- [Android](https://github.com/oney/react-native-webrtc/blob/master/Documentation/AndroidInstallation.md)\n\nnote: 0.10.0~0.12.0 required `git-lfs`, see: [git-lfs-installation](https://github.com/oney/react-native-webrtc/blob/master/Documentation/git-lfs-installation.md) \n\n## Usage\nNow, you can use WebRTC like in browser.\nIn your `index.ios.js`/`index.android.js`, you can require WebRTC to import RTCPeerConnection, RTCSessionDescription, etc.\n```javascript\nvar WebRTC = require('react-native-webrtc');\nvar {\n  RTCPeerConnection,\n  RTCMediaStream,\n  RTCIceCandidate,\n  RTCSessionDescription,\n  RTCView,\n  MediaStreamTrack,\n  getUserMedia,\n} = WebRTC;\n```\nAnything about using RTCPeerConnection, RTCSessionDescription and RTCIceCandidate is like browser.  \nSupport most WebRTC APIs, please see the [Document](https://developer.mozilla.org/zh-TW/docs/Web/API/RTCPeerConnection).\n```javascript\nvar configuration = {\"iceServers\": [{\"url\": \"stun:stun.l.google.com:19302\"}]};\nvar pc = new RTCPeerConnection(configuration);\nMediaStreamTrack.getSources(sourceInfos =\u003e {\n  var videoSourceId;\n  for (var i = 0; i \u003c sourceInfos.length; i++) {\n    var sourceInfo = sourceInfos[i];\n    if(sourceInfo.kind == \"video\" \u0026\u0026 sourceInfo.facing == \"front\") {\n      videoSourceId = sourceInfo.id;\n    }\n  }\n  getUserMedia({\n    \"audio\": true,\n    \"video\": {\n      optional: [{sourceId: videoSourceId}]\n    }\n  }, function (stream) {\n    pc.addStream(stream);\n  }, logError);\n});\n\npc.createOffer(function(desc) {\n  pc.setLocalDescription(desc, function () {\n    // Send pc.localDescription to peer\n  }, function(e) {});\n}, function(e) {});\npc.onicecandidate = function (event) {\n  // send event.candidate to peer\n};\n// also support setRemoteDescription, createAnswer, addIceCandidate, onnegotiationneeded, oniceconnectionstatechange, onsignalingstatechange, onaddstream\n\n```\nHowever, render video stream should be used by React way.\n\nRendering RTCView.\n```javascript\nvar container;\nvar RCTWebRTCDemo = React.createClass({\n  getInitialState: function() {\n    return {videoURL: null};\n  },\n  componentDidMount: function() {\n    container = this;\n  },\n  render: function() {\n    return (\n      \u003cView\u003e\n        \u003cRTCView streamURL={this.state.videoURL}/\u003e\n      \u003c/View\u003e\n    );\n  }\n});\n```\nAnd set stream to RTCView\n```javascript\ncontainer.setState({videoURL: stream.toURL()});\n```\n## Demo\nYou can open this website in browser, and then set it as signaling server in the app, and run the app. After you enter the same room ID, the video stream will be connected.\n\n## Native control\nUse [react-native-incall-manager](https://github.com/zxcpoiu/react-native-incall-manager) to keep screen on, mute microphone, etc.\n\n## Sponsorship\nThis repository doesn't have a plan to get sponsorship.(This can be discussed afterwards by collaborators). If you would like to pay bounty to fix some bugs or get some features, be free to open a issue that adds `[BOUNTY]` category in title. Add other bounty website link like [this](https://www.bountysource.com) will be better.\n\n# React-Native-WebRTC\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebmobi59%2Freact-native-webrtc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebmobi59%2Freact-native-webrtc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebmobi59%2Freact-native-webrtc/lists"}