0.0.6 • Published 6 years ago

@fiveem/react-music-player v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

React Music Player

npm (scoped)

Simple react music player.

Screenshots

React Music Player

Install

npm i @fiveem/react-music-player

Usage

import MusicPlayer from '@fiveem/react-music-player'

<MusicPlayer    playlist={this.state.playlist}
                playClicked={this.playClicked}
                pauseClicked={this.pauseClicked}
                previousClicked={this.previousClicked}
                nextClicked={this.nextClicked}
                backgroundColor={this.backgroundColor}
                activeButtonColor={this.activeButtonColor}
                inactiveButtonColor={this.inactiveButtonColor}
                buttonTextColor={this.buttonTextColor}
                textColor={this.textColor}
                activeTrackColor={this.activeTrackColor}
                progressBarColor={this.progressBarColor} />

API

nametypedefault valuedescription
playlistArray (Required)[]The playlist for the music player
playClickedFunctionFunction that is called when the play button is clicked
pauseClickedFunctionFunction that is called when the pause button is clicked
previousClickedFunctionFunction that is called when the previous button is clicked
nextClickedFunctionFunction that is called when the next button is clicked
backgroundColorString#fcfcfcBackground color of the music player
inactiveButtonColorString#8a8a8aColor of the inactive buttons (the inactive button are the next and previous buttons)
buttonTextColorString#000Color of the text/icon that is displayed on the buttons
textColorString#000Color of the music player text
activeTrackColorString#f0f0f0Highlight color of the active track
progressBarColorString#111111Color of the progress bar

JSON

const playlist = [
    {
        name: 'One Last Time',
        author: 'South London HiFi',
        image: 'theImage',
        file: 'file_name.mp3'
    }, {
        name: 'Sunshine Samba',
        author: 'Chris Haugen',
        image: 'theImage',
        file: 'file_name.mp3'
    }, 
]

License

react-music-player is released under the MIT license.

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago