0.4.3 • Published 5 years ago

react-responsive-music-player v0.4.3

Weekly downloads
57
License
MIT
Repository
github
Last release
5 years ago

React Responsive Music Player

Example

Please see a demo.

npm.io npm.io

Install

npm install react-responsive-music-player --save

or

yarn add react-responsive-music-player

Usage

import React, { Component } from 'react';
import MusicPlayer from 'react-responsive-music-player';

class App extends Component {
  render() {
    return (
      <div>
        <MusicPlayer playlist={playlist} />
      </div>
    );
  }
}

API

props

proptypedefaultnotes
modestringhorizontal
widthnumber, string100%
autoplayboolfalse
progressColorstring#66ccccthe color of the progress
btnColorstring#4a4a4athe color of the buttons
playlistarray[]the playlist
styleobject{}

JSON

const playlist = [
  {
    url: 'path/to/mp3',
    cover: 'path/to/jpg',
    title: 'Despacito',
    artist: [
      'Luis Fonsi',
      'Daddy Yankee'
    ]
  },
  {
    url: 'path/to/mp3',
    cover: 'path/to/jpg',
    title: 'Bedtime Stories',
    artist: [
      'Jay Chou'
    ]
  }
]

Development

npm install
npm start

License

MIT License

Copyright (c) 2019 Shixiang Zhang

0.4.3

5 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.0

6 years ago

0.2.4

6 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago