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

Package detail

react-player

cookpete3.1mMIT2.16.0TypeScript 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 Test Coverage Become a sponsor on Patreon

A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia, Mixcloud, DailyMotion and Kaltura. Not using React? No problem.


Using Next.js and need to handle video upload/processing? Check out next-video.

✨ The future of ReactPlayer

Maintenance of ReactPlayer is being taken over by Mux. The team at Mux have worked on many highly respected projects and are committed to improving video tooling for developers.

ReactPlayer will remain open source, but with a higher rate of fixes and releases over time. Thanks to everyone in the community for your ongoing support.

Usage

npm install react-player # or yarn add react-player
import React from 'react'
import ReactPlayer from 'react-player'

// Render a YouTube video player
<ReactPlayer url='https://www.youtube.com/watch?v=LXb3EKWsInQ' />

By default, ReactPlayer supports many different types of url. If you only ever use one type, use imports such as react-player/youtube to reduce your bundle size. See config keys for all player keys.

import React from 'react'
import ReactPlayer from 'react-player/youtube'

// Only loads the YouTube player
<ReactPlayer url='https://www.youtube.com/watch?v=LXb3EKWsInQ' />

If your build system supports import() statements, use react-player/lazy to lazy load the appropriate player for the url you pass in. This adds several reactPlayer chunks to your output, but reduces your main bundle size.

import React from 'react'
import ReactPlayer from 'react-player/lazy'

// Lazy load the YouTube player
<ReactPlayer url='https://www.youtube.com/watch?v=ysz5S6PUM-U' />

Demo page: https://cookpete.github.io/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 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.

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. Please set muted={true}.

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.
  ◦  For Vimeo videos, hiding controls must be enabled by the video owner.
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
  ◦  Only available when playing file URLs in certain browsers
false
stopOnUnmount If you are using pip you may want to use stopOnUnmount={false} to continue playing in picture-in-picture mode even after ReactPlayer unmounts true
fallback Element or component to use as a fallback if you are using lazy loading null
wrapper Element or component to use as the container element div
playIcon Element or component to use as the play icon in light mode
previewTabIndex Set the tab index to be used on light mode 0
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
onPlaybackRateChange Called when playback rate of the player changed
  ◦  Only supported by YouTube, Vimeo (if enabled), Wistia, and file paths
onPlaybackQualityChange Called when playback quality of the player changed
  ◦  Only supported by YouTube (if enabled)
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
onClickPreview Called when user clicks the light mode preview
onEnablePIP Called when picture-in-picture mode is enabled
onDisablePIP Called when picture-in-picture mode is disabled

Config prop

There is a single config prop to override settings for each type of player:

<ReactPlayer
  url={url}
  config={{
    youtube: {
      playerVars: { showinfo: 1 }
    },
    facebook: {
      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
onUnstarted: Called when state changes to unstarted (usually when video fails to autoplay)
facebook appId: Your own Facebook app ID
version: Facebook SDK version
playerId: Override player ID for consistent server-side rendering (use with react-uid)
attributes: Extra data attributes to pass to the fb-video element
soundcloud options: Override the default player options
vimeo playerOptions: Override the default params
title: Set the player iframe title attribute
mux attributes: Apply element attributes
version: Mux player version
wistia options: Override the default player options
playerId: Override player ID for consistent server-side rendering (use with react-uid)
mixcloud options: Override the default player options
dailymotion params: Override the default player vars
twitch options: Override the default player options
playerId: Override player ID for consistent server-side rendering (use with react-uid)
file attributes: Apply element attributes
forceVideo: Always render a <video> element
forceAudio: Always render an <audio> element
forceHLS: Use hls.js for HLS streams
forceSafariHLS: Use hls.js for HLS streams, even on Safari
forceDisableHLS: Disable usage hls.js for HLS streams
forceDASH: Always use dash.js for DASH streams
forceFLV: Always use flv.js
hlsOptions: Override the default hls.js options
hlsVersion: Override the hls.js version loaded from jsdelivr, default: 0.13.1
dashVersion: Override the dash.js version loaded from cdnjs, default: 2.9.2
flvVersion: Override the flv.js version loaded from jsdelivr, default: 1.5.0

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 attempting 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
showPreview() When using light mode, returns to the preview overlay

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.

You can also pass a component through the light prop:

<ReactPlayer light={<img src='https://example.com/thumbnail.png' alt='Thumbnail' />} />

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

SDK Overrides

You can use your own version of any player SDK, assuming the correct window global is set before the player mounts. For example, to use a local version of hls.js, add <script src='/path/hls.js'></script> to your app. If window.Hls is available when ReactPlayer mounts, it will use that instead of loading hls.js from cdnjs. See #605 for more information.

Standalone player

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

<script src='https://cdn.jsdelivr.net/npm/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.

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

Passing an array of YouTube URLs to the url prop will load them as an untitled playlist.

<ReactPlayer
  url={[
    'https://www.youtube.com/watch?v=oUFJJNQGwhk',
    'https://www.youtube.com/watch?v=jNgP6d9HraI'
  ]}
/>

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 config.file:

<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'}
    ]
  }}}
/>

Migrating to v2.0

ReactPlayer v2.0 changes single player imports and adds lazy loading players. Support for preload has also been removed, plus some other changes. See MIGRATING.md for information.

Supported media

Contributing

See the contribution guidelines before creating a pull request.

Thanks


Jackson Doherty

Joseph Fung

changelog

Changelog

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

Generated by auto-changelog.

v2.16.0

  • feat: add Mux + hls.js support back in #1769

v2.15.1

2 March 2024

  • fix: dynamic Mux import #1758
  • docs: fix demo URL #1752
  • docs: readme updates, next-video callout #1751
  • fix: dynamic Mux import (#1758) #1755
  • chore(release): 2.15.1 4d7fcb5

v2.15.0

28 February 2024

  • chore(cd): remove --changelog b/c auto-changelog #1750
  • feat: add Mux player #1748
  • chore(github-pages): add demo preview #1747
  • chore: remove unneeded config files #1744
  • Add aria-label to Preview component #1705
  • Add Deno-specific browser check #1632
  • docs: fix badges #1735
  • chore(release): 2.15.0 6dfff1c

v2.14.1

19 December 2023

  • fix: cjs interop require default pita #1722
  • docs(CHANGELOG): 2.14.1 921b0e0
  • chore(release): 2.14.1 8ca9747
  • chore: npm ignore unneeded folders 678f466

v2.14.0

14 December 2023

  • fix: repo url #1709
  • fix: pkg repository.url #1708
  • chore: add CD workflow #1706
  • chore: use Node matrix with 16.x, 18.x, 20.x #1688
  • docs: update demo App.js link #1689
  • fix: modernize build using esbuild #1684
  • docs(CHANGELOG): 2.14.0 e018c42
  • chore(release): 2.14.0 1496f67

v2.13.0

5 September 2023

  • Fix #1604 - FilePlayer does not work if I passed an array of urls #1612
  • fix: src sttribute become "undefinded" if url is an array #1648
  • Adding keepPlaying to other player types #1639
  • CI #1654
  • Swap out broken youtube URL #1659
  • Add keepPlaying to seekTo #1620
  • Added forceDisableHls option for FilePlayer #1625
  • added onPlaybackQualityChange prop #1636
  • Update the list of supported YouTube domains #1599
  • Fix #1604 - FilePlayer does not work if I passed an array of urls (#1612) #1604
  • Support Wisita URLs with query params #1591
  • Support vimeo manage links #1593
  • Update readme 90237f5

v2.12.0

7 March 2023

  • Added Vimeo Muteability #1588
  • Add forceSafariHLS option for FilePlayer #1560
  • fix: standalone has side effects #1586
  • Update DASH example #1589
  • Support live youtube URLs #1580

v2.11.2

10 February 2023

  • Remove module property from package.json #1574

v2.11.1

8 February 2023

  • Update light prop usage re: new feature in PR#1405 #1510
  • Extending valid DailyMotion URL regex Fix #1430 #1516
  • Add "sideEffects": false to package.json #1524
  • responsive CSS fix #1533
  • add unbundled es6 build with jsx file extensions #1537
  • Replace Vimeo default preview thumbnail #1553
  • fix typo #1558
  • fix: empty src attr in StrictMode #1538
  • Extending valid DailyMotion URL regex Fix #1430 (#1516) #1430

v2.11.0

17 September 2022

  • Add event playbackratechange on vimeo player #1502
  • feat: allow auto play on mixcloud player #1467
  • Fix onProgress not firing in Strict Mode #1465
  • Generate a file dist/ReactPlayer.standalone-module.js ES6 module #1425
  • ability to pass a component in light prop #1405
  • (fix): clear video src to prevent old video from continue to load #1360
  • apply interface onProgressProps at base.d.ts #1342
  • Do not pass wrapper ref to custom wrappers #1476
  • Update readme e955a2c
  • Update browserslist dc68dba
  • Remove patreon supporter 4e5d334

v2.10.1

7 May 2022

  • don't stack event listeners #1186
  • Add flvjs error handling, pass it to props onError method. #1426
  • Allow parameters after entry_id on kaltura #1432
  • adds support for youtube short urls #1438
  • Prevent double load bug in strict mode #1439 #1450
  • Use allow rather than allowFullScreen #1444
  • yarn audit fix 9ad5f38
  • Fix Player tests 30314c7
  • Remove email from package.json 646e62e

v2.10.0

18 March 2022

  • Added .m4b extension to AUDIO_EXTENSIONS #1415
  • Adjust listener for kaltura #1226
  • update default HLS version to latest release #1402
  • Make pre-publish.js ES5 compatible #1393
  • fix: Add exception handling when seekTo is called with amount value 0 #1372
  • Add onSeek support to Twitch player #1354
  • Add attributes in FacebookConfig type #1351
  • handle setPlaybackRate error #1223
  • Add onPlaybackRateChange callback prop #1224
  • Ability to pass null to previewTabIndex #1256
  • Add media attribute to source tag in file player #1269
  • fix: don't defer MediaStream #1230
  • add title attribute to vimeo iframe #1229
  • Add oEmbedUrl as changeable prop #1333
  • update video extenstions to accept media fragments for time #1213
  • Add type for wrapper in base.d.ts #1234
  • Make facebook config type properties optional #1314
  • Add disableDeferredLoading prop #1396
  • Support new vimeo external link format #1399
  • Tweak Vidyard pattern #1373
  • Adjust listener for kaltura (#1226) #1202
  • Update caniuse-lite 9f6adcd
  • Fix kaltura test 0f512c2

v2.9.0

17 February 2021

  • Adds previewTabIndex property to light mode #1169
  • Update YouTube URL pattern (#1170) #1171
  • Support Kaltura's HTML5 player #1082
  • Fix suspense check for nextjs #1165
  • Add kaltura player types b1e1053

v2.8.2

26 January 2021

  • fix: ensure lazy typedefs mirror defaults #1153
  • fix: nullify srcObject instead of calling removeAttribute #1145
  • updated basic types with fallback #1144
  • Update wistia url pattern #1149
  • fix: ensure lazy typedefs mirror defaults (#1153) #1146

v2.8.1

20 January 2021

  • fix: remove srcObject attribute if next uri is not a MediaStream #1121
  • Add onClickPreview #1131
  • Added types for single players #953
  • yarn upgrade 0c7dd4a
  • Fix clean script 9a448b1

v2.8.0

20 January 2021

  • added soundcloud playlist preview button for demo page so developers can know it also supports sc playlists #1113
  • Add missing FLV props to TS defs #1122
  • FEAT: customize fallback through props for lazy loading #1133
  • Add onClickPreview #1131
  • Added types for single players #953
  • Add custom control support to Wistia #1125
  • Fix facebook muted logic #1127
  • yarn upgrade b21c908

v2.7.2

16 December 2020

  • fix: add playIcon prop to TS declaration #1084

v2.7.1

16 December 2020

  • Improve youtube playlist regex #1088

v2.7.0

16 November 2020

  • Parse start time from twitch url #1046
  • Add explicit comment to set muted to true for autoplay #1036
  • Updates the default version of dash.js, hls.js #1056
  • Fix canPlayFile to support blob uri, fix #1023 #1041
  • Update CONTRIBUTING.md #1017
  • Use hls.js manifest parsed event for onReady #1066
  • Add config.facebook.attributes #1071
  • Prevent errors when updating without a player #1052 #1074
  • Add support for youtube live channel urls #1033
  • Fix canPlayFile to support blob uri, fix #1023 (#1041) #1023
  • Add console warning when using youtube embedOptions.events #1016
  • Add support for fb.watch URLs #1061
  • Run yarn-audit-fix 0c1bfd1
  • Fix tests 8e8c107
  • Adjust blob util f9c5429

v2.6.2

8 September 2020

v2.6.1

21 August 2020

  • Fixes youtube player playsinline variable type #989
  • Add descriptive text to Controls section #982
  • added missing type for 'getSecondsLoaded' #977
  • Fix single player import logic #993
  • Remove gitads banner cea0c38
  • Tweak vimeo controls readme wording c05cf93
  • Tweak gitads copy e252438

v2.6.0

23 July 2020

  • Make force disabling PIP dependent on prop #964
  • vimeo: listen for bufferring events and handle with matching callbacks #975
  • Call onLoaded when file streaming SDKs have loaded #976
  • yarn upgrade 05ae217
  • Add gitads banner to readme 6840e35

v2.5.0

3 July 2020

  • Add support for FLV files #958
  • Fix single player imports on IE11 #954

v2.4.0

28 June 2020

  • Hide wistia controls with controls prop #937
  • Add Cloudflare Stream support to file player #944
  • Fix sample files #948

v2.3.1

13 June 2020

  • dash deprecated method fix for different versions. #933
  • wistia config types updated #931
  • Tweak .npmignore 2204c7e

v2.3.0

11 June 2020

  • Add Wistia player id to support multiple players #905
  • Copy typings into lazy dir before publish #918
  • Add basic caching of preview thumbnails #927
  • Fix SDK fetching when exports exists in global scope #921
  • Bump packages b92031a
  • Remove bower info from readme c66a1c7
  • Fix wistia tests 85af252

v2.2.0

7 June 2020

  • Move lazy loading players to react-player/lazy #912 #907 #865 #910 #902
  • Support array of youtube urls #906
  • The return of single player imports 45635ef
  • Move canPlay logic into patterns.js 45369bb
  • Add preview chunk name 17b28ca

v2.1.1

31 May 2020

  • Correct typings for onReady #884
  • Add webpackChunkName to dynamic imports #899
  • Add patreon info to readme c4c597f

v2.1.0

23 May 2020

  • Match YouTube User Uploads #877
  • Destroy previous vidyard player before creating new one #894
  • Improve light mode a11y #878
  • Prevent Soundcloud onPause right before onEnded #879
  • Prevent unwanted Vidyard autoplay #887
  • Add onUnstarted youtube config option #888
  • Reset hls and dash before loading new url #892 #874
  • Support youtube-nocookie.com #896 #272 #557
  • Fix youtube fragment looping #897
  • Prevent dynamic import transforms to fix lazy loading #886
  • Fix youtube example playlist fcf4657

v2.0.1

28 April 2020

  • Adds the missing default data for the selected player #864
  • Only try and disablePIP on unmount if player is ready #849
  • Prevent Suspense being rendering during SSR #738 #865
  • Match twitch channel pattern case-insensitive #860
  • Rename refs to references #868 #866 #867 #861
  • Use file player for soundcloud hosted audio files #811

v2.0.0

25 April 2020

  • Breaking change: Use lazy players 1752b8d
  • Breaking change: Remove preload support 1baa227
  • Breaking change: Remove legacy config props 9339efa

v1.15.3

25 March 2020

  • fix for soundcloud direct file link #803
  • Update documented default hls.js version to 0.13.1 #806
  • Fix hls sdk url #826
  • Use proxy methods in wistia player #805
  • Move hls destroy from stop to unmount #817
  • Update vimeo readme links #819
  • Bump packages 013c9a8
  • Remove dist test page 763bb15
  • Add FUNDING.yml e708e8e

v1.15.2

2 February 2020

  • Move @ava/babel to devDependencies #794
  • Update yarn.lock da79e77
  • Update facebook regex to match story URLs 94172f2

v1.15.1

2 February 2020

  • Update facebook regex #793

v1.15.0

31 January 2020

  • Bump handlebars from 4.2.0 to 4.5.3 #771
  • Add showPreview() method to ReactPlayer typings #785
  • Add playerId override to facebook and twitch players #788
  • Relax facebook regex #778
  • Update hls.js CDN and version #758 #768 #779
  • Bump packages 8c037ab
  • Bump packages 9c59c13
  • Migrate to terser-webpack-plugin 83fd60d

v1.14.2

20 November 2019

  • Support to set custom facebook version #745

v1.14.1

11 November 2019

  • Ignore React nodes in isEqual #740

v1.14.0

6 November 2019

  • fixes #733 #736
  • Add PIP support for Safari #716
  • Properly delete SDK requests #718
  • Pass dash.js errors through to onError callback #732
  • Use https SDK urls by default #728
  • Add playIcon prop #730
  • fixes #733 (#736) #733
  • Tweak Twitch controls bug comment 987a18b

v1.13.0

19 September 2019

  • Delete SDK requests array after loading error #711
  • Add typedef support for MediaStream url source #674
  • Add readme note about SDK overrides #605
  • Use proxy methods for FilePlayer listeners #616
  • Add pip support info to readme #694
  • Add controls support to Twitch and Vimeo #687
  • Remove default black backgrounds #673
  • Fix demo file paths #697
  • Bump packages 4c4e0b5
  • Bump packages 9d39d92

v1.12.0

18 August 2019

v1.11.2

10 August 2019

  • Fix preload display logic #675
  • Add showPreview instance method #679
  • Hide preview thumbnail when light changes to false #680
  • Add playbackRate support to Vimeo #681
  • Fix Vimeo fast switch bug #683

v1.11.1

13 June 2019

  • Do not use vimeo API to play vimeo hosted video files. #597
  • Catches error on Vimeo play() #645
  • Update Meteor section in readme #647
  • [d.ts] Fix typing of arguments of onError handler #655
  • Fix twitch permanent loading state when stream is offline #657
  • Fix an issue with setting state in the Preview component after being unmounted. #658
  • Prevent double inline styles being applied #609
  • Fix onProgress for infinite duration streams #503
  • Fix light mode poster not updating #646
  • Fix youtube looping #530 #639 #662
  • Fix multiple onError params not being passed through #627

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
  • Refactor progress logic f1b12e2
  • Clean up tests 717397e

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

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
  • 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
  • Add babel es3 plugins 26abe2c
  • 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

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

25 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