Socket
Socket
Sign inDemoInstall

react-player

Package Overview
Dependencies
Maintainers
1
Versions
162
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-player

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


Version published
Weekly downloads
982K
increased by9.55%
Maintainers
1
Weekly downloads
 
Created

What is react-player?

The react-player npm package is a React component for playing various types of media, including YouTube, SoundCloud, Vimeo, and more. It provides a simple interface for embedding media players in React applications.

What are react-player's main functionalities?

Playing YouTube Videos

This feature allows you to embed and play YouTube videos in your React application. The URL of the YouTube video is passed as a prop to the ReactPlayer component.

<ReactPlayer url='https://www.youtube.com/watch?v=ysz5S6PUM-U' />

Playing Vimeo Videos

This feature allows you to embed and play Vimeo videos. Similar to YouTube, you pass the Vimeo video URL as a prop to the ReactPlayer component.

<ReactPlayer url='https://vimeo.com/123456789' />

Playing SoundCloud Tracks

This feature allows you to embed and play SoundCloud tracks. The SoundCloud track URL is passed as a prop to the ReactPlayer component.

<ReactPlayer url='https://soundcloud.com/artist/track' />

Customizing Player Controls

This feature allows you to enable or disable player controls. By setting the 'controls' prop to true, you can display the default player controls.

<ReactPlayer url='https://www.youtube.com/watch?v=ysz5S6PUM-U' controls={true} />

Playing Local Media Files

This feature allows you to play local media files by providing the file path as a prop to the ReactPlayer component.

<ReactPlayer url='path/to/local/file.mp4' />

Other packages similar to react-player

Keywords

FAQs

Package last updated on 28 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc