{"id":4665,"url":"https://github.com/ghondar/react-native-vlc-player","last_synced_at":"2025-04-06T19:13:16.761Z","repository":{"id":6106427,"uuid":"54703415","full_name":"ghondar/react-native-vlc-player","owner":"ghondar","description":"VLC Player for react-native","archived":false,"fork":false,"pushed_at":"2023-11-07T20:07:40.000Z","size":103418,"stargazers_count":152,"open_issues_count":30,"forks_count":39,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T12:10:26.083Z","etag":null,"topics":["android","react-native","vlc","vlc-player"],"latest_commit_sha":null,"homepage":"","language":"Java","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/ghondar.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}},"created_at":"2016-03-25T07:46:21.000Z","updated_at":"2024-04-25T03:43:39.809Z","dependencies_parsed_at":"2024-04-25T03:43:20.216Z","dependency_job_id":"b83ab9ad-abe4-49b8-b156-8a86fef5ff02","html_url":"https://github.com/ghondar/react-native-vlc-player","commit_stats":{"total_commits":42,"total_committers":4,"mean_commits":10.5,"dds":0.09523809523809523,"last_synced_commit":"f599086a09e39aa81ea803d0c647b0c797ce41c8"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghondar%2Freact-native-vlc-player","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghondar%2Freact-native-vlc-player/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghondar%2Freact-native-vlc-player/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghondar%2Freact-native-vlc-player/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghondar","download_url":"https://codeload.github.com/ghondar/react-native-vlc-player/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247535520,"owners_count":20954576,"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":["android","react-native","vlc","vlc-player"],"created_at":"2024-01-05T20:17:19.567Z","updated_at":"2025-04-06T19:13:16.725Z","avatar_url":"https://github.com/ghondar.png","language":"Java","funding_links":[],"categories":["Components","\u003ca name=\"Image-\u0026-Audio-\u0026-Video-\u0026-Docs:-Native-Modules\"\u003eImage, Audio, Video \u0026 Docs: Native Modules\u003c/a\u003e","Java"],"sub_categories":["Media"],"readme":"# react-native-vlc-player\n\n## Getting started\n\n`$ npm install react-native-vlc-player --save`\n\n## Dependencies\n\n`$ npm install react-native-vector-icons --save`\n\n### Manual installation\n\nCopy Ionicons.ttf from `node_modules/react-native-vector-icons/Fonts` to `android/app/src/main/assets/fonts`\n\n\n#### Android\n\n1. Insert the following lines inside the dependencies block in `android/app/build.gradle`:\n```Diff\n...\nallprojects {\n\t...\n\tdependencies {\n\t\t\t...\n+      maven {\n+        url(\"https://jitpack.io\")\n+      }\n\t}\n}\n```\n\n\n## Usage\n```javascript\nimport React, {Component} from 'react';\nimport {\n  StyleSheet,\n  View\n} from 'react-native';\n// Import library\nimport VlcPlayer from 'react-native-vlc-player';\n\nexport default class App extends Component {\n  vlcplayer = React.createRef();\n\n  componentDidMount() {\n    console.log(this.vlcplayer)\n  }\n\n  render() {\n    return (\n      \u003cView\n        style={[\n          styles.container\n        ]}\u003e\n        \u003cVlcPlayer\n          ref={this.vlcplayer}\n          style={{\n            width: 300,\n            height: 200,\n          }}\n          paused={false}\n          autoplay={true}\n          source={{\n            uri: 'file:///storage/emulated/0/Download/example.mp4',\n            autoplay: true,\n            initOptions: ['--codec=avcodec'],\n          }}  /\u003e\n      \u003c/View\u003e\n    );\n  }\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: 'center',\n    alignItems: 'center',\n    backgroundColor: 'grey',\n  },\n});\n```\n\n## Props\n```javascript\n\u003cVLCPlayer\n\tref='vlcplayer'\n\tpaused={this.state.paused}\n\tstyle={styles.vlcplayer}\n\tsource={{uri: this.props.uri, initOptions: ['--codec=avcodec']}}\n\tonVLCProgress={this.onProgress.bind(this)}\n\tonVLCEnded={this.onEnded.bind(this)}\n\tonVLCStopped={this.onEnded.bind(this)}\n\tonVLCPlaying={this.onPlaying.bind(this)}\n\tonVLCBuffering={this.onBuffering.bind(this)}\n\tonVLCPaused={this.onPaused.bind(this)}\n/\u003e\n```\n\n## Static Methods\n\n`seek(seconds)`\n\n```\nthis.refs['vlcplayer'].seek(0.333);\n```\n\n`snapshot(path)`\n\n```\nthis.refs['vlcplayer'].snapshot(path);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghondar%2Freact-native-vlc-player","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghondar%2Freact-native-vlc-player","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghondar%2Freact-native-vlc-player/lists"}