{"id":4685,"url":"https://github.com/Cherrypick-Consulting/react-native-android-video","last_synced_at":"2025-08-04T01:33:01.704Z","repository":{"id":35094243,"uuid":"205869893","full_name":"Cherrypick-Consulting/react-native-android-video","owner":"Cherrypick-Consulting","description":"React Native Android Video Component \u003cAndroidVideo /\u003e ","archived":false,"fork":false,"pushed_at":"2023-01-04T08:56:12.000Z","size":1099,"stargazers_count":20,"open_issues_count":19,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-28T05:54:12.106Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-native-android-video","language":"Java","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/Cherrypick-Consulting.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":"2019-09-02T14:04:15.000Z","updated_at":"2023-12-27T04:59:17.000Z","dependencies_parsed_at":"2023-01-15T13:42:34.750Z","dependency_job_id":null,"html_url":"https://github.com/Cherrypick-Consulting/react-native-android-video","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Cherrypick-Consulting/react-native-android-video","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cherrypick-Consulting%2Freact-native-android-video","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cherrypick-Consulting%2Freact-native-android-video/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cherrypick-Consulting%2Freact-native-android-video/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cherrypick-Consulting%2Freact-native-android-video/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cherrypick-Consulting","download_url":"https://codeload.github.com/Cherrypick-Consulting/react-native-android-video/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cherrypick-Consulting%2Freact-native-android-video/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268636586,"owners_count":24282127,"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-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":[],"created_at":"2024-01-05T20:17:20.243Z","updated_at":"2025-08-04T01:33:01.282Z","avatar_url":"https://github.com/Cherrypick-Consulting.png","language":"Java","funding_links":[],"categories":["Components"],"sub_categories":["Media"],"readme":"# React Native Android Video\n[![Version](https://img.shields.io/npm/v/react-native-android-video.svg)](https://www.npmjs.com/package/react-native-android-video)\n\n**react-native-android-video**\n\nAndroid ExoPlayer `\u003cAndroidVideo /\u003e` component for react-native.\n\n## Why did we create this package?\n\nWe found [tons of issues](https://github.com/react-native-community/react-native-video/issues?utf8=%E2%9C%93\u0026q=is%3Aissue+is%3Aopen+android) with the popupler [react-native-video](https://github.com/react-native-community/react-native-video) package when running on Android. We have received reports from our users that on some Android devices the video just won't play and on others it does play, however on \"seek()\" operations for example, it would break down and stop working. \n\nWe took a deep dive into [react-native-video](https://github.com/react-native-community/react-native-video) native Android code and found lots of legacy code and use of many deprecated ExoPlayer methods. \n\nTherefore we decided to create this new package for a light-weight, easy to use solution that enables react-native developers to integrate video ExoPlayer in their app for Android platform with 10x better performance than [react-native-video](https://github.com/react-native-community/react-native-video).\n\n\n## Installation\n\nUsing **npm**:\n\n```$ npm install --save react-native-android-video```\n\nOr using ***yarn***:\n\n```$ yarn add react-native-android-video```\n\n### Android\n\n1. Append the following lines to `android/settings.gradle`:\n\n```gradle\ninclude ':react-native-android-video'\nproject(':react-native-android-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-android-video/src/android')\n```\n2. Insert the following lines inside the dependencies block in `android/app/build.gradle`:\n```gradle\ncompile project(':react-native-android-video')\n```\n3. Open `MainApplication.java`:\n- Import the package on top of the file:\n```java\nimport com.cherrypick.androidvideo.RNAndroidVideoPackage;\n```\n\n- Add the `RNAndroidVideoPackage` class to your list of exported packages:\n```java\n@Override\nprotected List\u003cReactPackage\u003e getPackages() {\n  return Arrays.\u003cReactPackage\u003easList(\n    new MainReactPackage(),\n    new RNAndroidVideoPackage(),\n    ...\n  );\n}\n```\n\n## Usage\n\n```javascript\n// Import the module\nimport AndroidVideo from 'react-native-android-video'\n\n...\n\n// In your render function\n\u003cAndroidVideo\n  ref={(ref) =\u003e {\n    this.player = ref\n  }}\n  style={styles.video}\n  source={this.props.videoUrl}\n  paused={!this.props.isPlaying}\n  rate={this.props.playerRate}\n  onPlayerReady={this._onVideoReady}\n  onPlayerLoading={this._onVideoPlayerLoading}\n  onProgress={this._onVideoPlayerProgress}\n  onPlayerError={this._onVideoError}\n/\u003e\n```\n---\n###  Configurable props\n\nProperty | Type | Description\n--- | --- | ---\nsource | string | Sets the media source\npaused | boolean | Controls whether the media is paused\nrate | number | Speed at which the media should play\n---\n### Event props\n\n#### onPlayerReady\n\u003eCallback function that is called when the media is loaded and the player is ready to play.\n\nPayload:\n\nProperty | Type | Description\n--- | --- | ---\nduration | number | The duration of the media in milliseconds\n\n#### onPlayerLoading\n\u003eCallback function that is called when the player is start or stop buffering.\n\nPayload: `true / false`.\n\n\n#### onProgress\n\u003eCallback function that is called every 250 mili seconds with info about which position the media is currently playing.\n\nPayload:\n\nProperty | Type | Description\n--- | --- | ---\ncurrentTime | number | Current player position in seconds\n\n\n#### onPlayerError\n\u003eCallback function that is called when error is occurs.\n\nPayload:\n\nProperty | Type | Description\n--- | --- | ---\nerror | string | Error message\n---\n### Methods\n\n#### seek\n\n\u003eSeek to the specified position represented by seconds.\n\nExample:\n```javascript\nthis.player.seek(450)\n```\n\n## Authors\n\n* [Alon Shprung](https://github.com/alonshp) - Initial code \n\nSee also the list of [contributors](https://github.com/Cherrypick-Consulting/react-native-android-video/graphs/contributors) who participated in this project.\n\n## Contributing\n\nPull requests are welcome. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCherrypick-Consulting%2Freact-native-android-video","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCherrypick-Consulting%2Freact-native-android-video","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCherrypick-Consulting%2Freact-native-android-video/lists"}