0.0.2 • Published 1 year ago

@kevtucker/react-audio-player-bar v0.0.2

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

npm version GitHub version npm

React Audio Player

Simple React Audio Player with Artwork option. The Player bar can be positioned at the top or bottom of the screen. Works with React 16.8.0 and above, also works with Next.js.

Installation with NPM

npm install @kevtucker/react-audio-player-bar --save

Installation with Yarn

yarn add @kevtucker/react-audio-player-bar

Storybook

I have created a Storybook to show the different options available. You can view it here:

https://docs.ktinternet.net/react-audio-player-bar

Usage

import { Player } from "@kevtucker/react-audio-player-bar";

function App() {
  return (
    <div className="App">
      <Player
        source="https://streams.ktinternet.net:8010/d"
        title="Peoples City Radio"
        artist="Live"
        artwork="https://picsum.photos/200"
      />
    </div>
  );
}

Props

PropTypeDefaultDescription
sourcestring""The audio source
titlestring""The title of the audio
artiststring""The artist of the audio
artworkstring""The artwork of the audio
positionstring"bottom"The position of the player

License

MIT