Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

react-player-custom

CookPete458MIT1.11.14TypeScript support: included

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

react, media, player, video, audio, youtube, facebook, twitch, soundcloud, streamable, vimeo, wistia, dailymotion, hls, dash, react-component

readme

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, Mixcloud, and DailyMotion. Not using React? No problem.

Usage

npm install react-player --save
# or
yarn add react-player
import React, { Component } from 'react'
import ReactPlayer from 'react-player'

class App extends Component {
  render () {
    return <ReactPlayer url='https://www.youtube.com/watch?v=ysz5S6PUM-U' playing />
  }
}

Demo page: https://cookpete.com/react-player

The component parses a URL and loads in the appropriate markup and external SDKs to play media from various sources. Props can be passed in to control playback and react to events such as buffering or media ending. See the demo source for a full example.

For platforms like Meteor 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.

Polyfills

Autoplay

As of Chrome 66, videos must be muted in order to play automatically. Some players, like Facebook, cannot be unmuted until the user interacts with the video, so you may want to enable controls to allow users to unmute videos themselves.

Props

Prop Description Default
url The url of a video or song to play
  ◦  Can be an array or MediaStream object
playing Set to true or false to pause or play the media false
loop Set to true or false to loop the media false
controls Set to true or false to display native player controls
  ◦  Vimeo, Twitch and Wistia player will always display controls
false
light Set to true to show just the video thumbnail, which loads the full player on click
  ◦  Pass in an image URL to override the preview image
false
volume Set the volume of the player, between 0 and 1
  ◦  null uses default volume on all players #357
null
muted Mutes the player
  ◦  Only works if volume is set
false
playbackRate Set the playback rate of the player
  ◦  Only supported by YouTube, Wistia, and file paths
1
width Set the width of the player 640px
height Set the height of the player 360px
style Add inline styles to the root element {}
progressInterval The time between onProgress callbacks, in milliseconds 1000
playsinline Applies the playsinline attribute where supported false
pip Set to true or false to enable or disable picture-in-picture mode false
wrapper Element or component to use as the container element div
config Override options for the various players, see config prop

Callback props

Callback props take a function that gets fired on various player events:

Prop Description
onReady Called when media is loaded and ready to play. If playing is set to true, media will play immediately
onStart Called when media starts playing
onPlay Called when media starts or resumes playing after pausing or buffering
onProgress Callback containing played and loaded progress as a fraction, and playedSeconds and loadedSeconds in seconds
  ◦  eg { played: 0.12, playedSeconds: 11.3, loaded: 0.34, loadedSeconds: 16.7 }
onDuration Callback containing duration of the media, in seconds
onPause Called when media is paused
onBuffer Called when media starts buffering
onBufferEnd Called when media has finished buffering
  ◦  Works for files, YouTube and Facebook
onSeek Called when media seeks with seconds parameter
onEnded Called when media finishes playing
  ◦  Does not fire when loop is set to true
onError Called when an error occurs whilst attempting to play media
onEnablePIP Called when picture-in-picture mode is enabled
onDisablePIP Called when picture-in-picture mode is disabled

Config prop

As of version 0.24, there is a single config prop to override the settings for the various players. If you are migrating from an earlier version, you must move all the old config props inside config:

<ReactPlayer
  url={url}
  config={{
    youtube: {
      playerVars: { showinfo: 1 }
    },
    facebook: {
      appId: '12345'
    }
  }}
/>

The old style config props still work but will produce a console warning:

<ReactPlayer
  url={url}
  youtubeConfig={{ playerVars: { showinfo: 1 } }}
  facebookConfig={{ appId: '12345' }}
/>

Settings for each player live under different keys:

Key Options
youtube playerVars: Override the default player vars
embedOptions: Override the default embed options
preload: Used for preloading
facebook appId: Your own Facebook app ID
soundcloud options: Override the default player options
preload: Used for preloading
vimeo playerOptions: Override the default params
preload: Used for preloading
wistia options: Override the default player options
mixcloud options: Override the default player options
dailymotion params: Override the default player vars
preload: Used for preloading
twitch options: Override the default player options
file attributes: Apply element attributes
forceVideo: Always render a <video> element
forceAudio: Always render an <audio> element
forceHLS: Use hls.js for HLS streams
forceDASH: Always use dash.js for DASH streams
hlsOptions: Override the default hls.js options
hlsVersion: Override the hls.js version loaded from cdnjs, default: 0.10.1
dashVersion: Override the dash.js version loaded from cdnjs, default: 2.9.2
Preloading

When preload is set to true for players that support it, a short, silent video is played in the background when ReactPlayer first mounts. This fixes a bug where videos would not play when loaded in a background browser tab.

Methods

Static Methods

Method Description
ReactPlayer.canPlay(url) Determine if a URL can be played. This does not detect media that is unplayable due to privacy settings, streaming permissions, etc. In that case, the onError prop will be invoked after attemping to play. Any URL that does not match any patterns will fall back to a native HTML5 media player.
ReactPlayer.canEnablePiP(url) Determine if a URL can be played in picture-in-picture mode
ReactPlayer.addCustomPlayer(CustomPlayer) Add a custom player. See Adding custom players
ReactPlayer.removeCustomPlayers() Remove any players that have been added using addCustomPlayer()

Instance Methods

Use ref to call instance methods on the player. See the demo app for an example of this.

Method Description
seekTo(amount, type) Seek to the given number of seconds, or fraction if amount is between 0 and 1
  ◦  type parameter lets you specify 'seconds' or 'fraction' to override default behaviour
getCurrentTime() Returns the number of seconds that have been played
  ◦  Returns null if unavailable
getSecondsLoaded() Returns the number of seconds that have been loaded
  ◦  Returns null if unavailable or unsupported
getDuration() Returns the duration (in seconds) of the currently playing media
  ◦  Returns null if duration is unavailable
getInternalPlayer() Returns the internal player of whatever is currently playing
  ◦  eg the YouTube player instance, or the <video> element when playing a video file
  ◦  Use getInternalPlayer('hls') to get the hls.js player
  ◦  Use getInternalPlayer('dash') to get the dash.js player
  ◦  Returns null if the internal player is unavailable

Advanced Usage

Light player

The light prop will render a video thumbnail with simple play icon, and only load the full player once a user has interacted with the image. Noembed is used to fetch thumbnails for a video URL. Note that automatic thumbnail fetching for Facebook, Wistia, Mixcloud and file URLs are not supported, and ongoing support for other URLs is not guaranteed.

If you want to pass in your own thumbnail to use, set light to the image URL rather than true.

The styles for the preview image and play icon can be overridden by targeting the CSS classes react-player__preview, react-player__shadow and react-player__play-icon.

Responsive player

Set width and height to 100% and wrap the player in a fixed aspect ratio box to get a responsive player:

class ResponsivePlayer extends Component {
  render () {
    return (
      <div className='player-wrapper'>
        <ReactPlayer
          className='react-player'
          url='https://www.youtube.com/watch?v=ysz5S6PUM-U'
          width='100%'
          height='100%'
        />
      </div>
    )
  }
}
.player-wrapper {
  position: relative;
  padding-top: 56.25% /* Player ratio: 100 / (1280 / 720) */
}

.react-player {
  position: absolute;
  top: 0;
  left: 0;
}

See jsFiddle example

Single player imports

If you are only ever playing a single type of URL, you can import individual players to keep your bundle size down:

import YouTubePlayer from 'react-player/lib/players/YouTube'

<YouTubePlayer
  url='https://www.youtube.com/watch?v=d46Azg3Pm4c'
  playing
  controls
  // Other ReactPlayer props will work here
/>

See a list of available players here.

Standalone player

If you aren’t using React, you can still render a player using the standalone library:

<script src='https://unpkg.com/react-player/dist/ReactPlayer.standalone.js'></script>
<script>
  const container = document.getElementById('container')
  const url = 'https://www.youtube.com/watch?v=d46Azg3Pm4c'

  renderReactPlayer(container, { url, playing: true })

  function pausePlayer () {
    renderReactPlayer(container, { url, playing: false })
  }
</script>

See jsFiddle example

Adding custom players

If you have your own player that is compatible with ReactPlayer’s internal architecture, you can add it using addCustomPlayer:

import YourOwnPlayer from './somewhere';
ReactPlayer.addCustomPlayer(YourOwnPlayer);

Use removeCustomPlayers to clear all custom players:

ReactPlayer.removeCustomPlayers();

It is your responsibility to ensure that custom players keep up with any internal changes to ReactPlayer in later versions.

Using Bower

bower install react-player --save
<script src='bower_components/react/react.js'></script>
<script src='bower_components/react/react-dom.js'></script>
<script src='bower_components/react-player/dist/ReactPlayer.js'></script>
<script>
  ReactDOM.render(
    <ReactPlayer url='https://www.youtube.com/watch?v=d46Azg3Pm4c' playing />,
    document.getElementById('container')
  )
</script>

Mobile considerations

Due to various restrictions, ReactPlayer is not guaranteed to function properly on mobile devices. The YouTube player documentation, for example, explains that certain mobile browsers require user interaction before playing:

The HTML5 <video> 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).

Multiple Sources and Tracks

When playing file paths, an array of sources can be passed to the url prop to render multiple <source> tags.

<ReactPlayer playing url={['foo.webm', 'foo.ogg']} />

You can also specify a type for each source by using objects with src and type properties.

<ReactPlayer
  playing
  url={[
    {src: 'foo.webm', type: 'video/webm'},
    {src: 'foo.ogg', type: 'video/ogg'}
  ]}
/>

<track> elements for subtitles can be added using fileConfig:

<ReactPlayer
  playing
  url='foo.webm'
  config={{ file: {
    tracks: [
      {kind: 'subtitles', src: 'subs/subtitles.en.vtt', srcLang: 'en', default: true},
      {kind: 'subtitles', src: 'subs/subtitles.ja.vtt', srcLang: 'ja'},
      {kind: 'subtitles', src: 'subs/subtitles.de.vtt', srcLang: 'de'}
    ]
  }}}
/>

Supported media

Contributing

See the contribution guidelines before creating a pull request.

Thanks

changelog

Changelog

All notable changes to this project will be documented in this file. Dates are displayed in UTC.

Generated by auto-changelog.

v1.11.0

10 April 2019

  • Soundcloud - fix autoplay delegation #614
  • Implemented onBufferEnd cb prop for FilePlayer, YouTube and Facebook #615
  • Add on error callback to wistia player #617
  • align typings for seekTo method with code #619
  • Really really small typo in README.md #606
  • Add issue template ba6c274

v1.10.0

24 March 2019

  • Add playsinline support to vimeo #574
  • Use normal wrapper for light mode #584
  • Pass controls prop through to preload players #587
  • Add Soundcloud preload to props files #588
  • Add type parameter to seekTo method #591
  • Set isLoading to false after error #595
  • Unbind wistia player events correctly #594

v1.9.3

27 January 2019

v1.9.2

27 January 2019

  • Support player setLoop methods #560
  • Upgrade screenfull #560

v1.9.1

25 January 2019

  • Use https for noembed fetching #558 #448
  • Add controls toggle and light mode to demo app 0ba5b71
  • Show preview when switching from non-light to light 4a39dc4

v1.9.0

24 January 2019

  • Allows wrapper proptype to be a ForwardRef component #556
  • playsinline for Android wechat #544
  • Fix broken URL for standalone script #546
  • Accept youtube.com/playlist?list= URLs #541
  • Add youtube embedOptions config option #557 #272
  • Bump deepmerge 7722679
  • Youtube playlist fixes 04bf181

v1.8.0

19 December 2018

  • Add light prop #448

v1.7.1

5 December 2018

  • Parse youtube playlist from URL list param #318
  • Loop youtube playlists correctly #530
  • Fix dist build 29fb971
  • Update npmignore 32e8286

v1.7.0

17 November 2018

  • Support Chrome Picture In Picture (PIP) mode #504
  • Typings - label in TrackProps #489
  • fix: fix onProgress callback not firing during iOS live streams #497
  • Update vimeo preload URL #509
  • add absent methods signature #507
  • Add hlsVersion and dashVersion file config #513
  • Export single player exports to main file #421
  • Refresh vimeo duration on play #514
  • Use PLAYING event instead of PLAY for Twitch player #498
  • Do not call onEnded when looping #496
  • Prevent singlePlayer from returning null when forcing via config #500

v1.6.6

20 September 2018

  • Add coverage to npmignore 580e21c

v1.6.5

20 September 2018

  • Fix: signal multiple sources change to the browser #482
  • Check null before accessing FilePlayer properties #465
  • Adds hlsOptions to FileConfig def #483
  • Updated hls.js documentation link in README.md #440
  • Prevent YouTube from playing after seekTo when paused #437
  • Fix facebook iframe visibility bug #455
  • Update dailymotion regex #438
  • Fix issues with non-embeddable Facebook videos 48401ab
  • Enable partial line coverage with codecov 488f82d
  • Run tests before versioning 4055469

v1.6.4

7 June 2018

  • YouTube videos not forwarding end param #420

v1.6.3

6 June 2018

  • Set FilePlayer autoPlay correctly #405
  • Tidy up start and end timestamp logic #412
  • Improve MediaStream guards #415
  • Overhaul tests 4bd78e0
  • Remove requirement for window global 9618272
  • Player component tweaks 1ac1480

v1.6.2

27 May 2018

  • Pass instance through to onReady callback #407
  • Mute preload players 16f5fcb

v1.6.1

20 May 2018

v1.6.0

17 May 2018

  • Add support for MediaStream objects #398
  • Prevent errors when switching URLs whilst loading #377
  • Prevent loading SDKs multiple times #391

v1.5.1

15 May 2018

  • Add proper mute support to fix autoplay #395 #389
  • Mute player for tests 58c6a58
  • Fix vimeo config options property a645eee
  • Skip soundcloud tests 3958f8d

v1.5.0

23 April 2018

  • Fix FilePlayer getSecondsLoaded #380
  • Add support for dropbox files #379
  • Tidy up getSecondsLoaded 93351f9
  • Update readme de639e4

v1.4.0

11 April 2018

  • Add support for custom players #364
  • Add instance methods to single player imports #376
  • Fix tests 597bf33

v1.3.2

5 April 2018

  • Render video element when poster is set #369
  • Add https to Twitch SDK URL #367
  • Add forceVideo option for FilePlayer a743396
  • Remove migration note 308bca9

v1.3.1

22 March 2018

  • Fix file player load sequence on iOS #340
  • Do not use Vimeo player for vimeo.com file paths #358

v1.3.0

15 March 2018

  • Include Mixcloud in README #342
  • Add support for twitch player options #343
  • Add single player wrapper div #346
  • Loosen up the vimeo URL pattern #349 #348
  • Pass through HLS errors to onError #354 #355
  • Set volume to null by default #357
  • Escape dots in URL patterns 129a179
  • Tweak tests 3b92c4a
  • Unmute facebook player when ready a672ee1

v1.2.1

26 February 2018

  • Add progressInterval logic back in to onProgress #339
  • Skip mixcloud tests 34b51a4

v1.2.0

23 February 2018

  • Fixes the onPause event propogation #336
  • Support custom wrappers #334
  • Add Mixcloud player #335
  • Add support for importing single players #311
  • Move onProgress logic into Player component 42a030e

v1.1.3

21 February 2018

  • Match YouTube URL with extra parameters #332
  • Update mp3 example #330
  • Update stored config when props change #329
  • Pass through all source props when using array of objects #333
  • Skip wistia tests 6e536d1
  • Fix soundcloud canPlay test 1f158d1

v1.1.2

8 February 2018

  • Add config.file.hlsOptions #325 #319
  • Send any soundcloud URL to the widget #322 #324
  • Change progressFrequency to progressInterval #317
  • Guard against navigator not being available #315
  • Update hls, dash and streamable SDKs 22dd274

v1.1.1

18 January 2018

v1.1.0

18 January 2018

v1.0.0

17 January 2018

  • Do not load hls.js on iOS #293
  • Better prop comparison for shouldComponentUpdate #302
  • Less aggressive URL matching #297
  • Remove vidme player #294
  • Bump packages 7050614
  • Bump packages c309053
  • Use postcss-loader in favour of sass-loader d691af4

v1.0.0-beta.7

14 December 2017

v1.0.0-beta.6

5 December 2017

  • Vimeo On Demand URL Support #289
  • Use index keys for FilePlayer source array #276
  • Add more tests 2e88e5e
  • Add url switch tests 78c483c
  • Bump auto-changelog cd26b44

v1.0.0-beta.5

10 November 2017

  • Set internal isPlaying flag to false on ended #271
  • Bump auto-changelog e246e43

v1.0.0-beta.4

8 November 2017

  • Update twitch URL pattern #267
  • Retain player order to prevent weird iframe behaviour when switching players #264 #265

v1.0.0-beta.3

30 October 2017

v1.0.0-beta.2

30 October 2017

v1.0.0-beta.1

28 October 2017

  • Use latest auto-changelog d3401dc
  • Bump packages c381cc2
  • Prevent errors when unmounting before SDK loads 979e639

v1.0.0-beta.0

26 October 2017

v0.25.3

26 October 2017

  • Loop when player is running #257
  • properly destroy HLS.JS and / or DASH.JS instances #254
  • Fix preloading 6dd81ba
  • Update readme d5ba064

v0.25.2

17 October 2017

v0.25.1

17 October 2017

  • Update typings for onProgress callback #246
  • Fix parameter name for Vimeo player configuration #243
  • Add passthrough prop support to typings #247
  • Fix Vimeo duration logic #250
  • fix parameter name for Vimeo player configuration f810221

v0.25.0

4 October 2017

  • Update polyfill info #239
  • Use React 16 for demo #241
  • Tweak vimeo player logic #240
  • Bump packages a31ab1c
  • Update scripts and config file names 920c602
  • Remove promise and fetch polyfills from browser build a33238c

v0.24.6

28 September 2017

  • Make getInternalPlayer more flexible #238

v0.24.5

16 September 2017

  • Update Streamable player to use player.js #237
  • Bump auto-changelog 84ad345
  • Remove unnecessary stop logic from soundcloud f478f1a
  • Skip Streamable tests f210f93

v0.24.4

14 September 2017

  • Updated TypeScript typings #235
  • Prevent warnings when unmounting preloading players 4c4d2ec

v0.24.3

14 September 2017

  • update of DOM listeners in FilePlayer when audio/video tags was switched #234
  • Use callPlayer util for player methods c760655
  • Clean up tests 717397e
  • Refactor progress logic f1b12e2

v0.24.2

11 September 2017

v0.24.1

9 September 2017

v0.24.0

9 September 2017

  • Use single config prop #71
  • Fix webpack production config #231
  • Remove legacy Soundcloud player a55ef3c
  • Readme tweaks c0071f2
  • Bring back static canPlay util f4861d7

v0.23.0

8 September 2017

  • Soundcloud: use Widget API instead of HTTP API #199
  • Fixed broken TypeScript type definitions #230
  • Refactor development setup 81df2a8
  • Use Widget instead of Soundcloud API 4ea29f9
  • Tidy up Soundcloud player d0947e2

v0.22.0

3 September 2017

  • Move SDK loading logic into getSDK util 318c9e9
  • Add Twitch player 288c18d
  • Add sourcemap config to uglify plugin 901dfbf

v0.21.0

2 September 2017

v0.20.0

27 July 2017

  • Allow seekTo to accept number of seconds #75
  • Pass errors when playing files through to onError callback #200
  • Add support for subtitle tracks in FilePlayer #214
  • Unmute facebook video when setting volume #215
  • Bump packages 8e9e57b

v0.19.1

17 July 2017

  • More accurate played fraction for Wistia #201

v0.19.0

13 July 2017

  • Detatch HLS media when stopping #212
  • Add wistia player options #198
  • Pass through auto or falsey width and height to FilePlayer #211
  • Only use add-module-exports plugin for bower build #193 #196
  • Bump packages 7372bcb
  • Remove need for findDOMNode in Vimeo player f6abc06
  • Add streaming tools to readme adf1338

v0.18.0

9 May 2017

v0.17.2

7 May 2017

  • Add forceAudio to fileConfig #188

v0.17.1

5 May 2017

  • Fix initial loading bug for Private Vimeo videos #187
  • Fix initial loading bug for Private Vimeo videos ff8a449

v0.17.0

30 April 2017

  • Add support for m.youtube.com #186
  • Add support for multiple file sources #81
  • Remove need for Vimeo player IDs 214a7af

v0.16.0

27 April 2017

  • Apply all non-valid props to the wrapper element #183
  • Ensure YouTube player is in DOM when stopping #180
  • Use new Vimeo player API #142
  • Fix FilePlayer seekTo bug #149
  • Add Facebook player #109
  • Apply all non-valid props to the wrapper element #167
  • Added DailyMotion support. 71dcda6
  • DailyMotion tweaks 64f3cd3
  • Bump babel-loader 478c2c3

v0.15.0

14 April 2017

  • Add vidmeConfig with choice of video format #162
  • Call player.load() when loading files #177
  • Add getCurrentTime and getDuration methods #178
  • Use prop-types library #179
  • Add loadedSeconds and playedSeconds to onProgress #164
  • Add playsinline prop #148
  • Bump packages 41aac30
  • Update to standard 10 1371cbc
  • Bump snazzy 90c60b3

v0.14.3

21 February 2017

  • Add assertion for canPlay with https://vimeo #141
  • Use npm 4.x on travis #143
  • Use ubuntu 14.04 for travis #144
  • fixed width & height of video when it is in fullscreen mode #151
  • update webpack to 2.2.1 #156
  • Fix vidme url regex #158
  • Bump packages 92b9315
  • Minor code style fixes b39b1ec
  • Add assertion for making sure canPlay is valid for https://vimeo 0f55002

v0.14.2

14 February 2017

  • Fix youtube player vars config usage #152
  • Fix npm prepublish script on windows #139
  • fixed width & height of video when it is in fullscreen mode f966a15
  • Use cross-env for build scripts a6191cf

v0.14.1

1 January 2017

  • Use video element for ogg files #137

v0.14.0

26 December 2016

v0.13.0

12 December 2016

  • PlaybackRate change feature #123
  • Fix onProgress non-reporting if playing prop is not set. #127
  • Add additional audio file extensions to regex #131
  • Use node 6 on travis #130
  • Add typescript definition file #134
  • [feature] Change PlaybackRate d28c309
  • Fix incorrect duration calculation in demo app. 4114677
  • Remove unnecessary escape characters ec078d1

v0.12.1

19 November 2016

  • Add fullscreen example to demo 563252b
  • Fullscreen youtube player fix 83e8e60

v0.12.0

10 October 2016

  • Pass DOM node to YouTube Player instead of ID #111
  • update all dependencies #107
  • Add showArtwork option to soundcloud config #108
  • Tidy up code 0f18e71
  • Add Vidme support 609ee08
  • Remove anonymous ref callback functions 26aec63

v0.11.0

26 September 2016

  • Add onReady prop #106

v0.10.0

25 September 2016

  • Add hidden prop to ReactPlayer #102
  • Use mounted property to prevent setting state when unmounted #105
  • Update onProgress logic to still report loaded amounts when paused #94
  • Remove brackets from single param arrow functions ab24d08
  • Add Streamable player ff6a300
  • Use ref callbacks instead of ref strings 6c16ba0

v0.9.0

9 August 2016

  • Ensure YouTube SDK is loaded before resolving promise #88
  • Fix looping behaviour #91
  • Add style prop #92
  • Skip tests before versioning ed6cab0

v0.8.0

29 July 2016

  • Add support for non-es5 compatible browsers #87
  • Render FilePlayer by default 8d249ce
  • Bump packages 2d43659

v0.7.5

27 July 2016

  • Always send both played and loaded values in progress events #79
  • Add RTSP stream support to FilePlayer #83
  • Move initial setVolume to onStart #82
  • Update player when width or height changes #84
  • Stop progress loop on pause 180039b
  • Add babel es3 plugins 26abe2c

v0.7.4

23 June 2016

  • Pause FilePlayer when stopping #78

v0.7.3

21 June 2016

  • Pass fileConfig down correctly 1dffcca

v0.7.2

3 June 2016

  • Add m4v and m4a extensions to filePlayer #72
  • Fix onDuration being called with null #52
  • Rename seekOnReady to seekOnPlay 91f7344
  • Add failing onDuration test 564243e
  • Nest media switching test in a describe block 2fe8806

v0.7.1

1 June 2016

  • Update supported file type regex #68
  • Update README.md links #66
  • Tweak example usage eff2623
  • make file extensions case insensitive 6f0f346
  • Update supported media readme c37e87e

v0.7.0

21 May 2016

  • Use filePlayer for SoundCloud tracks #64
  • Add controls prop 9a2ae22
  • Tidy up filePlayer 79c2d5a
  • Skip FilePlayer onError test c4ed490

v0.6.0

19 May 2016

  • Add filePlayer config prop #62
  • Add loop prop #57
  • Add onStart prop #61
  • Use fetch-jsonp for SoundCloud resolve endpoint #24 #47
  • Remove class property semicolons 0c8070d
  • Remove arrow function brackets cb71f30
  • Add contribution guidelines 16f515d

v0.5.8

19 April 2016

v0.5.7

13 April 2016

  • Pass on error event #48
  • Add FilePlayer support for urls with query string #45
  • Add progressFrequency prop #50
  • Only include played amount in onProgress when playing #51
  • Pass on event including error message and code onError #44
  • Add default props to readme 2abb25e
  • Ignore dist when linting 1740ca6
  • Specify https in YouTube SDK location c05bd9d

v0.5.6

8 March 2016

  • Fix bower support #42
  • Update readme with mobile considerations #41
  • Remove comments from production builds 03a4e22
  • Fix browser build 78463b2
  • Bump karma-mocha-reporter 98bc28a

v0.5.5

29 February 2016

  • Add browser build #35 #38
  • Add promise and fetch polyfills to build #39
  • Update standard code style 7231c45
  • Add bower.json e95ee66
  • Add react-component keyword fb50625

v0.5.4

3 February 2016

  • Remove the need for array.find polyfill 7aa4719
  • Add demo deployment to travis build 60bcaf6
  • Tweak YouTube default playerVars b99e6d9

v0.5.3

26 January 2016

  • Support YouTube start time param 7908463
  • Better karma test grouping 8a3d4e8
  • Better SoundCloud error handling bce57af

v0.5.2

25 January 2016

v0.5.1

21 January 2016

  • Move onDuration callback from onReady to onPlay #31
  • Destructure state in demo render method 6ed327d
  • Add simple Duration component to improve demo d42c6d3
  • Change onProgress frequency to 1 second 45746d9

v0.5.0

14 January 2016

  • Add onDuration prop #28
  • Ensure YouTube player calls onReady on subsequent loads 3a997bb
  • Ensure vimeo player has duration before calling onReady 8b31a8f
  • Add live demo to readme 4aa8a29

v0.4.2

11 January 2016

  • Add semicolons to class properties #27
  • Limit Travis to just basic tests #26
  • Bump packages 21f03b2

v0.4.1

11 January 2016

v0.4.0

9 January 2016

  • Use react-transform development setup #25
  • Add basic karma testing #22
  • Rebase on react-transform-boilerplate #8
  • Add styles and various fixes to the demo app 0b16606
  • Use a partial shrinkwrap to limit babel packages to 6.3 e9bcd72
  • Separate demo files c7230e7

v0.3.7

4 January 2016

  • When seeking before player is ready, store value and seek later #19
  • Remove redundant soundcloud player options 647fa9e
  • Prevent IndexSizeError in FilePlayer ba31958
  • Fix FilePlayer not loading on mount 00f9671

v0.3.6

4 January 2016

  • Ensure volume on subsequent youtube loads 5895663

v0.3.5

4 January 2016

  • Fix YouTube onReady bugs #21
  • Set isReady before setVolume in onReady #23
  • Handle YouTube URL change during SDK load #20
  • Tidy up YouTube code 64c952f
  • Lint and test before versioning fdf2fa3

v0.3.4

3 January 2016

v0.3.3

2 January 2016

  • Stronger guards for YouTube player methods f18792a

v0.3.2

2 January 2016

  • Use explicit isReady property to guard player methods #18
  • Improve progress logic b0b3040
  • Remove propTypes and defaultProps from players 796edd1
  • Start using auto-changelog 373b698

v0.3.1

27 December 2015

  • Use displayNames for players #17
  • Fix changelog link f82b351

v0.3.0

24 December 2015

  • Prime players to enable autoplay when out of focus #13
  • Enable multiple YouTube players #15
  • Prime Youtube and Vimeo players with a blank video #7
  • Move defaultProps to separate props file 90ef334
  • Always render every player 158fdde
  • Move progress logic from players to top level component 17fbef8

v0.2.1

13 November 2015

  • Remove autoplay and only play if props.playing is true when ready #10
  • Be a bit more const-friendly a15700a
  • Better npm publish cleanup scripts 821be95
  • Add onError support to FilePlayer 63f1660

v0.2.0

6 November 2015

  • Configuration #4
  • Abort SoundCloud streaming if url changes during requests #6
  • pass configuration options to players via props f1395d1
  • Add change log 28dfdad
  • Update readme e99df95

v0.1.0

19 October 2015

  • Add FilePlayer for HTML5 media files 66482d5
  • Add very basic shallow rendering tests 7beccbe
  • Vimeo player improvements d308aa6

v0.0.8

20 September 2015

  • Use findDOMNode #3
  • Add basic unit tests for static canPlay method f1cde2c
  • Improve SoundCloud URL regex 3c4c5fa

v0.0.7

10 September 2015

  • Guard against no iframe contentWindow in Vimeo player #2
  • Set correct initial state in ReactPlayer #2
  • Stop soundcloud track before playing another 61bc61e

v0.0.6

31 August 2015

  • Use shouldComponentUpdate to prevent unnecessary rendering b7ca5a6
  • Fix onProgress bug 1bf018e

v0.0.5

27 August 2015

v0.0.4

27 August 2015

  • Add Array.find() polyfill #1
  • Add fetch polyfill libraries to package.json #1

v0.0.3

26 August 2015

v0.0.2

24 August 2015

  • First commit a4deecf
  • Move react package to dev and peer dependencies f42ea0c