{"id":20732414,"url":"https://github.com/jpush/jmrtc-react-native","last_synced_at":"2025-04-23T22:09:03.295Z","repository":{"id":33869432,"uuid":"142108096","full_name":"jpush/jmrtc-react-native","owner":"jpush","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-06T18:11:08.000Z","size":51259,"stargazers_count":10,"open_issues_count":20,"forks_count":3,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-04-23T22:08:18.989Z","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/jpush.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}},"created_at":"2018-07-24T05:19:25.000Z","updated_at":"2022-04-12T10:37:19.000Z","dependencies_parsed_at":"2023-01-15T03:15:57.682Z","dependency_job_id":null,"html_url":"https://github.com/jpush/jmrtc-react-native","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpush%2Fjmrtc-react-native","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpush%2Fjmrtc-react-native/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpush%2Fjmrtc-react-native/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpush%2Fjmrtc-react-native/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpush","download_url":"https://codeload.github.com/jpush/jmrtc-react-native/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250522299,"owners_count":21444511,"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-17T05:19:21.592Z","updated_at":"2025-04-23T22:09:03.224Z","avatar_url":"https://github.com/jpush.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JMRTC React Native Plugin\n\n![](./document/rctvideo.png)\n\n## 安装\n\n```shell\nnpm install jmrtc-react-native --save\nreact-native link jmrtc-react-native\n```\n\n## 配置\n\n### iOS 手动配置部分\n\n\u003e **注意**：需要先确保自己工程中 `Info.plist` 包含 camera , Microphone  权限。\n\n- 设置后台模式，之后需要点开后台音频功能：在 TARGETS -\u003e Capabilities -\u003e Background Modes 里选择 Audio, AirPlay, and Picture in Picture。\n\n\n- 选择主工程 target -\u003e Build Settings -\u003e Enable Bitcode 设置为 No。\n\n### Android\n* [检查添加的配置项](document/check_android.md)\n\n* 添加 JMRTCReactPackage\n\n  在 MainApplication 中加上 JMRTCReactPackage ，JMRTCReactPackage 有两个参数：是否弹出 toast，是否打印插件log\n\n  ```\n  import io.jmrtc.android.JMRTCReactPackage;;   // \u003c--   导入 JMRTCReactPackage\n\n  public class MainApplication extends Application implements ReactApplication {\n\n     // 设置为 true 将不会弹出 toast\n     private boolean SHUTDOWN_TOAST = false;\n     // 设置为 true 将不会打印 log\n     private boolean SHUTDOWN_LOG = false;\n\n      private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {\n\n          ...\n\n          @Override\n          protected List\u003cReactPackage\u003e getPackages() {\n              return Arrays.\u003cReactPackage\u003easList(\n                      new MainReactPackage(),\n                     new JMRTCReactPackage(SHUTDOWN_TOAST, SHUTDOWN_LOG)   //  \u003c-- 添加 JMRTCReactPackage\n              );\n          }\n      };\n\n  ...\n  }\n  ```\n\n## Usage\n\n```javascript\nimport {  JMRTCViewController,JMRTCView} from 'jmrtc-react-native'\n\n... your component code \n\nJMRTCViewController.initEngine((success) =\u003e {\n  \n}, (error) =\u003e {\n  \n})\n\nrender() {\n  return \u003cJMRTCView username='your user name or target user name' /\u003e\n}\n```\n\n\n\n## APIs\n\n[API](document/api.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpush%2Fjmrtc-react-native","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpush%2Fjmrtc-react-native","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpush%2Fjmrtc-react-native/lists"}