{"id":4754,"url":"https://github.com/sejoker/react-native-android-vitamio","last_synced_at":"2025-04-12T07:41:55.401Z","repository":{"id":57335280,"uuid":"43916409","full_name":"sejoker/react-native-android-vitamio","owner":"sejoker","description":"React-native component for android Vitamio video player","archived":false,"fork":false,"pushed_at":"2016-05-16T19:02:49.000Z","size":18216,"stargazers_count":76,"open_issues_count":3,"forks_count":16,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-12-06T19:12:16.295Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/sejoker.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":"2015-10-08T21:08:37.000Z","updated_at":"2024-04-15T20:32:47.000Z","dependencies_parsed_at":"2022-08-29T19:41:30.533Z","dependency_job_id":null,"html_url":"https://github.com/sejoker/react-native-android-vitamio","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/sejoker%2Freact-native-android-vitamio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sejoker%2Freact-native-android-vitamio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sejoker%2Freact-native-android-vitamio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sejoker%2Freact-native-android-vitamio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sejoker","download_url":"https://codeload.github.com/sejoker/react-native-android-vitamio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248536981,"owners_count":21120683,"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-01-05T20:17:22.281Z","updated_at":"2025-04-12T07:41:55.380Z","avatar_url":"https://github.com/sejoker.png","language":"Java","funding_links":[],"categories":["Components"],"sub_categories":["Integrations"],"readme":"\n# react-native-android-vitamio\n\nA React-native component for android [Vitamio video player](https://github.com/yixia/VitamioBundle).\n\n\nSupports React Native up to 0.21.\n\n### Demo app\n\nhttps://github.com/sejoker/react-native-vitamio-demo\n\n### Installation \n\n```bash\nnpm install --save react-native-android-vitamio\n```\n\n### Add it to your android project\n\n* In `android/setting.gradle`\n\n```gradle\n...\ninclude ':vitamio'\nproject(':vitamio').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-android-vitamio/vitamio')\ninclude ':RNVitamioView'\nproject(':RNVitamioView').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-android-vitamio')\n```\n\n* In `android/app/build.gradle`\n\n```gradle\n...\ndependencies {\n    ...\n    compile project(':RNVitamioView')\n}\n```\n\n* register module on React Native \u003e= 0.18 (in MainActivity.java)\n```java\npackage com.vitamio_demo;\n\nimport com.facebook.react.ReactActivity;\nimport com.facebook.react.ReactPackage;\nimport com.facebook.react.shell.MainReactPackage;\n\nimport java.util.Arrays;\nimport java.util.List;\n\nimport com.sejoker.VitamView.VitamioViewPackage; // \u003c--- import\n\npublic class MainActivity extends ReactActivity {\n\n    /**\n     * Returns the name of the main component registered from JavaScript.\n     * This is used to schedule rendering of the component.\n     */\n    @Override\n    protected String getMainComponentName() {\n        return \"vitamio_demo\";\n    }\n\n    /**\n     * Returns whether dev mode should be enabled.\n     * This enables e.g. the dev menu.\n     */\n    @Override\n    protected boolean getUseDeveloperSupport() {\n        return BuildConfig.DEBUG;\n    }\n\n   /**\n   * A list of packages used by the app. If the app uses additional views\n   * or modules besides the default ones, add more packages here.\n   */\n    @Override\n    protected List\u003cReactPackage\u003e getPackages() {\n      return Arrays.\u003cReactPackage\u003easList(\n        new MainReactPackage(),\n        new VitamioViewPackage(this)          // \u003c------ add here\n      );\n    }\n}\n\n```\n\n* register module on React Native \u003c 0.18 (in MainActivity.java)\n```java\nimport com.sejoker.VitamView.VitamioViewPackage;  // \u003c--- import\n\npublic class MainActivity extends Activity implements DefaultHardwareBackBtnHandler {\n  ......\n\n  @Override\n  protected void onCreate(Bundle savedInstanceState) {\n    super.onCreate(savedInstanceState);\n    mReactRootView = new ReactRootView(this);\n\n    mReactInstanceManager = ReactInstanceManager.builder()\n      .setApplication(getApplication())\n      .setBundleAssetName(\"index.android.bundle\")\n      .setJSMainModuleName(\"index.android\")\n      .addPackage(new MainReactPackage())\n      .addPackage(new VitamioViewPackage(this))              // \u003c------ add here\n      .setUseDeveloperSupport(BuildConfig.DEBUG)\n      .setInitialLifecycleState(LifecycleState.RESUMED)\n      .build();\n\n    mReactRootView.startReactApplication(mReactInstanceManager, \"app\", null);\n\n    setContentView(mReactRootView);\n  }\n\n  ......\n\n}\n```\n\n## Example\n```javascript\nvar VitamioView = require('react-native-android-vitamio');\n\nclass VideoScreen extends React.Component {\n  render() {\n    return (\n      \u003cView\u003e\n        \u003cVitamioView style={styles.video} streamUrl=\"rtmp://fms.12E5.edgecastcdn.net/0012E5/mp4:videos/8Juv1MVa-485.mp4\"/\u003e\n      \u003c/View\u003e\n    );\n  }\n}\n\n\nvar styles = StyleSheet.create({\n  video: {\n      flex: 1,\n      flexDirection: 'row',\n      height: 400,\n    }\n})\n\nmodule.exports = VideoScreen;\n```\n\n### Known issues\n\nVitamio doesn't play video in android simulator.\nVideo doesn't start automatically, touch the screen and press start.\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsejoker%2Freact-native-android-vitamio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsejoker%2Freact-native-android-vitamio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsejoker%2Freact-native-android-vitamio/lists"}