
Please set muted=Ĭallback containing duration of the media, in secondsĬalled when media seeks with seconds parameterĬalled when playback rate of the player changed 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. To support IE11 you will need to use babel-polyfill or a similar ES2015+ polyfill.Īs of Chrome 66, videos must be muted in order to play automatically.If you are using npm and need to support browsers without Promise you will need a Promise polyfill.To generate this file yourself, checkout the repo and run npm run build:dist.

See the demo source for a full example.įor platforms without direct use of npm modules, a minified version of ReactPlayer is located in dist after installing. Props can be passed in to control playback and react to events such as buffering or media ending. The component parses a URL and loads in the appropriate markup and external SDKs to play media from various sources. Import React from 'react' import ReactPlayer from 'react-player/lazy' // Lazy load the YouTube player
