From 5befbfab44313a48d7770cf00f3cda200ebc3bbb Mon Sep 17 00:00:00 2001 From: Pete Cook Date: Thu, 18 Jan 2018 09:30:13 +0000 Subject: [PATCH] Tidy up readme --- CONTRIBUTING.md | 10 +++ README.md | 216 +++++++++++++++++++++++++++++++----------------- 2 files changed, 148 insertions(+), 78 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4b1352a7..255c8010 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,6 +2,16 @@ Thanks for contributing to ReactPlayer! +Running the demo locally is relatively easy: + +```bash +git clone https://github.com/CookPete/react-player.git +cd react-player +npm install # or yarn +npm start +open http://localhost:3000 +``` + ## `dist` files There is **no need** to build or commit files in `dist` after making changes. The `dist` files are only there for [bower](http://bower.io) support, and there is very little point in polluting every commit or pull request with the changes. The `dist` files will be automatically built and commmited when new versions are released, so your changes will be included then. diff --git a/README.md b/README.md index 27c72558..717e5495 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,33 @@ -ReactPlayer -=========== - -[![Latest npm version](https://img.shields.io/npm/v/react-player.svg)](https://www.npmjs.com/package/react-player) -[![Build Status](https://img.shields.io/travis/CookPete/react-player/master.svg)](https://travis-ci.org/CookPete/react-player) -[![Dependency Status](https://img.shields.io/david/CookPete/react-player.svg)](https://david-dm.org/CookPete/react-player) -[![Test Coverage](https://img.shields.io/codecov/c/github/cookpete/react-player.svg)](https://codecov.io/gh/CookPete/react-player) -[![Donate](https://img.shields.io/badge/donate-PayPal-blue.svg)](https://paypal.me/ckpt) - -A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion. - -The 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. +

+ ReactPlayer +

+ +

+ + Latest npm version + + + Build Status + + + Dependency Status + + + Test Coverage + + + Donate + +

+ +

+ A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion. +

#### Migrating to `1.0.0` All existing implementations of `ReactPlayer` should still work without any changes after migrating. The major changes are to how the component works internally. Keep an eye out for bugs and [raise an issue](https://github.com/CookPete/react-player/issues/new) if one doesn’t already exist. -### Polyfills - -* If you are using `npm` and need to support [browsers without `Promise`](http://caniuse.com/#feat=promises) you will need a [`Promise` polyfill](https://github.com/stefanpenner/es6-promise). -* To support IE11 you will need to use [`babel-polyfill`](https://babeljs.io/docs/usage/polyfill) or a similar ES2015+ polyfill. - ### Usage ```bash @@ -39,45 +47,16 @@ class App extends Component { } ``` -See [the demo source](https://github.com/CookPete/react-player/blob/master/src/demo/App.js) for a full example. - -For platforms like [Meteor](https://www.meteor.com) without direct use of `npm` modules, a minified version of `ReactPlayer` is located in `dist` after installing. To generate this file yourself, checkout the repo and run `npm run build:dist` - -#### Bower - -```bash -bower install react-player --save -``` - -```html - - - - -``` - -### Demo +Demo page: [`https://cookpete.com/react-player`](https://cookpete.com/react-player) -See a [live demo](http://cookpete.com/react-player), or run: +The 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. See [the demo source](https://github.com/CookPete/react-player/blob/master/src/demo/App.js) for a full example. -```bash -git clone https://github.com/CookPete/react-player.git -cd react-player -npm install # or yarn -npm start -open http://localhost:3000 -``` - -### Mobile considerations +For platforms like [Meteor](https://www.meteor.com) without direct use of `npm` modules, a minified version of `ReactPlayer` is located in `dist` after installing. To generate this file yourself, checkout the repo and run `npm run build:dist`. -Due to various restrictions, `ReactPlayer` 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: +#### Polyfills -> The HTML5 `