1.2.16 • Published 14 days ago

mobin-ava-music-player v1.2.16

Weekly downloads
-
License
-
Repository
-
Last release
14 days ago

Ava Music Player (ReactJS Music Player)

Installation

$ npm install mobin-ava-music-player

Getting started

import AvaMusicPlayer from "mobin-ava-music-player";
import "mobin-ava-music-player/dist/style.css";

function App() {
    return (
        <>
            <AvaMusicPlayer
                playlist={{
                    id: 1,
                    scope: "audiom",
                    name: "playlist name",
                    cover: "playlist cover",
                    startIndex: 1,
                    description: "playlist description",
                    items: [
                        {
                            music_id: "1",
                            name: "music name",
                            artist: [
                                {
                                    artist_name: "artist name",
                                    artist_id: 1,
                                },
                            ],
                            cover: "music cover",
                            url: ["music url"],
                            lyric: "music lyric",
                            timestamp: 1,
                            quality: "320",
                            from: "string",
                            music_duration: 1,
                            mood: [""],
                            genre: [""],
                            tags: [""],
                        },
                    ],
                }}
            />
        </>
    );
}
<div id="root"></div>
<div id="ava-music-player-dialog-root"></div>
<!-- Add This line for player portal -->

API Reference

APITyperequiredDefaultDescription
playlistPlaylistType-playlist data
logboolean-If set to 'true,' it enables logging
providerstring"unknown"set provider to send in log request
onClosefunction => {}-Music player close event
onOpenFullscreenfunction => {}-Event trigger when music player get full screen
onCloseFullscreenfunction => {}-Event trigger when music player minimize from full screan
onMusicChangefunction => music-Event trigger when active music change and reutrns audio and it's index in musics list

PlaylistType:

APITyperequiredDefaultDescription
idnumber-playlist id
scopestring-It indicates the service user of the web service. Its value for audiom is 'audiom'
namestring-Playlist name
descriptionstring-Playlist description
coverstring,null-Playlist cover
timestampnumber-Playlist create date
shareUrlstring-Share url of playlist
startIndexnumber-Each playlist has a startIndex. When played, it starts playing the music that corresponds to this index, (Change it to change the playing music)
itemsAudioType-List of musics

AudioType:

APITyperequiredDefaultDescription
music_idstring-Music Id
namestring-Music name
artistArtist[]-Music artists information
coverstring , null-Music Cover
urlstring[]-Music urls
lyricstring-Music lyric
shareUrlstring-Music share url
timestampnumber-Music create date
qualitystring-Music quality
fromstring-It specifies where the music should be played from. It could be from a specific page like the home page or an artist's page, a playlist, shuffle mode, or the respective album.
music_durationnumber-Music duration
moodstring[]-Music moods list
genrestring[]-Music genres list
tagsstring[]-Music tags list

Artist:

APITyperequiredDefaultDescription
artist_namestring-Artist name
artist_idstring-Artist Id
1.2.16

14 days ago

1.2.15

14 days ago

1.2.14

23 days ago

1.2.12

2 months ago

1.2.13

2 months ago

1.2.8

2 months ago

1.2.7

2 months ago

1.2.6

2 months ago

1.2.5

2 months ago

1.2.9

2 months ago

1.2.10

2 months ago

1.2.11

2 months ago

1.2.3

3 months ago

1.2.2

3 months ago

1.2.1

3 months ago

1.2.0

3 months ago

1.1.3

4 months ago

1.1.1

4 months ago

1.1.0

4 months ago

1.1.2

4 months ago

1.0.17

5 months ago

1.0.16

5 months ago

1.0.15

5 months ago

1.0.14

5 months ago

1.0.13

5 months ago

1.0.12

5 months ago

1.0.11

5 months ago

1.0.10

5 months ago

1.0.9

5 months ago

1.0.8

6 months ago

1.0.6

6 months ago