{"id":19785517,"url":"https://github.com/imerkle/ireact-player","last_synced_at":"2025-04-30T23:30:41.691Z","repository":{"id":40346081,"uuid":"95355354","full_name":"imerkle/ireact-player","owner":"imerkle","description":"A material  React Web html5 player like youtube ","archived":false,"fork":false,"pushed_at":"2025-03-10T07:29:38.000Z","size":36632,"stargazers_count":16,"open_issues_count":7,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T05:51:15.828Z","etag":null,"topics":["html5","material","material-ui","mobx","mobx-react","react","video","videoplayer","youtube"],"latest_commit_sha":null,"homepage":"https://imerkle.github.io/ireact-player/","language":"JavaScript","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/imerkle.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}},"created_at":"2017-06-25T11:23:09.000Z","updated_at":"2023-05-19T18:10:34.000Z","dependencies_parsed_at":"2022-08-09T17:41:37.509Z","dependency_job_id":null,"html_url":"https://github.com/imerkle/ireact-player","commit_stats":null,"previous_names":["dsslimshaddy/utube"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imerkle%2Fireact-player","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imerkle%2Fireact-player/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imerkle%2Fireact-player/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imerkle%2Fireact-player/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imerkle","download_url":"https://codeload.github.com/imerkle/ireact-player/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251799259,"owners_count":21645767,"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":["html5","material","material-ui","mobx","mobx-react","react","video","videoplayer","youtube"],"created_at":"2024-11-12T06:14:52.155Z","updated_at":"2025-04-30T23:30:40.249Z","avatar_url":"https://github.com/imerkle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[Live Demo](https://dsslimshaddy.github.io/utube/)\n\nIReactPlayer\n===========\n\n[![Latest npm version](https://img.shields.io/npm/v/ireact-player.svg)](https://www.npmjs.com/package/ireact-player)\n[![Build Status](https://img.shields.io/circleci/project/github/dsslimshaddy/utube/master.svg)](https://circleci.com/dsslimshaddy/utube)\n[![Dependency Status](https://img.shields.io/david/dsslimshaddy/utube.svg)](https://david-dm.org/dsslimshaddy/utube)\n[![devDependency Status](https://img.shields.io/david/dev/dsslimshaddy/utube.svg)](https://david-dm.org/dsslimshaddy/utube?type=dev)\n\nA react component for playing a variety of URLs, including file paths, YouTube.\n\nThe component parses a URL and loads in the appropriate markup and external SDKs to play media from [various sources](#supported-media). [Props](#props) can be passed in to control playback and react to events such as buffering or media ending.\n\n### Usage\n\n```bash\nyarn add ireact-player\n```\n\n```js\nimport React, { Component } from 'react'\nimport { VideoPlayer: IReactPlayer } from 'ireact-player'\n\nclass App extends Component {\n  render () {\n    return \u003cIReactPlayer src='https://www.youtube.com/watch?v=ysz5S6PUM-U' /\u003e\n  }\n}\n```\n\nSee [the demo source](https://github.com/dsslimshaddy/utube/blob/master/docs/src/index.js) for a full example.\n\nFor platforms like [Meteor](https://www.meteor.com) without direct use of `yarn` modules, a minified version of `IReactPlayer` is located in `build` after installing. To generate this file yourself, checkout the repo and run `yarn run build`\n\n### Demo\n\nSee a [live demo](https://dsslimshaddy.github.io/utube/), or run:\n\n```bash\ngit clone https://github.com/dsslimshaddy/utube.git\ncd utube\nyarn install\nyarn run start\nopen http://localhost:3000\n```\n# Peer Dependency\nIt is based on [`material-ui`](https://github.com/callemall/material-ui/tree/v1-beta) and a tiny [`material-son`](https://github.com/dsslimshaddy/material-son) wrapper to extend some features of `material-ui`.\n\nIt uses [`mobx`](https://github.com/mobxjs/mobx) to manage store.\n\n\n### Props\n\nProp | Description | Default\n---- | ----------- | -------\n`src` | The url of a video or song to play. Can also be a array see demo\n`markers` | To create markers `[{start: 23,end: 35,color: 'green'}...]` | `[]`\n`stats` | An array of `[{label:\"\",value: \"\"}...]` to show dev stats | `false`\n`holdToDisplay` | Seconds of delay before context menu appear( for mobile )  | `-1`\n`separator` | The separator of timecode | `/`\n`bounds` | Bounds of which you can drag the player (only on dragmode) | `body`\n`isAutoQuality` | Sets the Auto Quality playback | `false`\n`style` | Add [inline styles](https://facebook.github.io/react/tips/inline-styles.html) to the root element\n`autoplay` | The player plays automatically | `false`\n`poster` | A image url to show as poster of video | `\"\"`\n`caption_url` | Sets the url of caption source file | `\"\"`\n`thumbnail_url` | Sets the url of thumbnail source file | `\"\"`\n`annotation_url` | Sets the url of annotation source file | `\"\"`\n`extenstionLayers` | To add extension/plugin layers on top of video. This also gets the whole `VideoPlayerStore` (mobx) therefore you will be fully able to control the player. | `[]`\n### Mobile considerations\n\nDue to various restrictions, `iReactPlayer` is not guaranteed to function properly on mobile devices. The [YouTube player documentation](https://developers.google.com/youtube/iframe_api_reference), for example, explains that [certain mobile browsers require user interaction](https://developers.google.com/youtube/iframe_api_reference#Mobile_considerations) before playing:\n\n\u003e The HTML5 `\u003cvideo\u003e` element, in certain mobile browsers (such as Chrome and Safari), only allows playback to take place if it's initiated by a user interaction (such as tapping on the player).\n\n\n#### Multiple Sources and Tracks\n\nWhen playing file paths, an array of sources can be passed to the `url` prop to render multiple `\u003csource\u003e` tags.\n\n```jsx\n\u003cIReactPlayer src={[src: 'foo_720.mp4',src: 'foo_480.mp4']} /\u003e\n```\n\n\n```jsx\n\u003cIReactPlayer\n  src={[\n    {src: 'foo_720.mp4', value: 720},\n    {src: 'foo_480.mp4', value: 480}\n  ]}\n/\u003e\n```\n\n`caption_url` elements for subtitles can be added using `props`:\n\n```jsx\n\u003cIReactPlayer\n  src='foo.webm'\n  caption_url=\"https://gist.githubusercontent.com/dsslimshaddy/ca3163ba1cb1d610f3b1aef3cb51eecf/raw\"\n/\u003e\n```\n\n### CSS Styling\n\nIt uses the same  styling solution (jss) as [`material-ui`](https://material-ui-525cf.firebaseapp.com/customization/css-in-js)\n\nFor theming you need to pass a `theme` prop simmilar to [here](https://github.com/dsslimshaddy/utube/blob/master/src/VideoPlayer/playerSheet.js)\n\n[CSS Options are available here](https://github.com/dsslimshaddy/utube/blob/master/src/VideoPlayer/playerSheet.js)\n\n\n\n### Methods\n\nUse [`ref`](https://facebook.github.io/react/docs/refs-and-the-dom.html) to call methods on the player. See [the demo app](docs/src/index.js) for an example of this.\n\n*Comming soon*\n\n### Supported media\n\n* YouTube videos use the [YouTube iFrame Player API](https://developers.google.com/youtube/iframe_api_reference)\n* [Supported file types](https://github.com/dsslimshaddy/utube/blob/master/src/players/FilePlayer.js#L5-L6) are playing using [`\u003cvideo\u003e`](https://developer.mozilla.org/en/docs/Web/HTML/Element/video) or [`\u003caudio\u003e`](https://developer.mozilla.org/en/docs/Web/HTML/Element/audio) elements\n  * HLS streams are played using [hls.js](https://github.com/video-dev/hls.js)\n  * DASH streams are played using [dash.js](https://github.com/Dash-Industry-Forum/dash.js)\n\n### ROADMAP\n- [ ] fix youtube quality change\n- [ ] smoothen the quality change transition\n- [ ] add more playback ( facebook , Soundcloud etc ) \n- [ ] add tests\n- [ ] Improve docs and props\n### Thanks\n\n* Anyone who has [contributed](https://github.com/dsslimshaddy/utube/graphs/contributors)\n\n# Bugs\n- *Thumbnails are are from youtube and not with proper timing/position(only in demo)*\n- *Youtube quality change not working for some bug*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimerkle%2Fireact-player","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimerkle%2Fireact-player","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimerkle%2Fireact-player/lists"}