Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
react-simple-audio-player
Advanced tools
Readme
A React component with graphics for playing audio files
npm install react-simple-audio-player --save
import React, { Component } from 'react'
import PlayAudio from 'react-simple-audio-player'
class App extends Component {
render () {
return <PlayAudio url={'http://www.noiseaddicts.com/samples_1w72b820/4186.mp3'} />
}
}
export default App;
The component uses react-player
package to play media and add simple design and controls to extend the package.
Prop | Description | Default |
---|---|---|
url | The url of an audio to play | |
width | Set the width and height (height is equal to width) of the player | 60px |
simpleMode | Set to true disable seconds counter, automatically true with width less then 45px | false |
colorScale | Pass array of 5 colors for theme personalisation | scaled red shades (see demo) |
import React, { Component } from 'react'
import PlayAudio from 'react-simple-audio-player'
import chroma from "chroma-js"
const colorScale = chroma
.scale([
'#0199CB',
'#ffffff',
])
.mode('lch')
.colors(5)
class App extends Component {
render () {
return <PlayAudio url={'http://www.noiseaddicts.com/samples_1w72b820/4186.mp3'} colorScale={colorScale} />
}
}
export default App
Result:
FAQs
React component for playing audio files.
The npm package react-simple-audio-player receives a total of 35 weekly downloads. As such, react-simple-audio-player popularity was classified as not popular.
We found that react-simple-audio-player demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.