

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.

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
