react-audio-control

1.0.4 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i react-audio-control

Weekly Downloads

4

Version

1.0.4

License

MIT

Unpacked Size

34.6 kB

Total Files

7

Last publish

Collaborators

  • aweibell