react-audio-control
v1.0.4
Published
A React component providing a volume slider bar with additional controls
Downloads
43
Readme
react-audio-control
A React component providing a volume slider bar with additional controls
Install
npm install --save react-audio-control
Usage
import React, { Component } from 'react'
import { ReactAudioControl } from 'react-audio-control'
import 'react-audio-control/dist/index.css'
lass Example extends Component {
const songTitle = 'Theme by TimMoor'
const togglePlay = () => {
// setIsPlaying(!isPlaying)
}
const updateVolume = (vol) => {
// setVolume(vol)
}
render() {
return <ReactAudioControl
updateVolume={updateVolume}
togglePlay={togglePlay}
styling={{back: {border: 'solid 2px green'}}}
title={songTitle}
/>
}
}
License
MIT © aweibell