1.0.4 • Published 1 year ago

react-audio-control v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

react-audio-control

A React component providing a volume slider bar with additional controls

NPM JavaScript Style Guide

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