1.6.19 • Published 4 months ago

mobin-ava-music-player v1.6.19

Weekly downloads
-
License
-
Repository
-
Last release
4 months 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
xWebIdstring-Set x-web-id to log request header
providerstring"unknown"set provider to send in log request
playStatusboolean-set play status
preFetchAudioCountnumber5Define number of prefetch audios
preFetchAudioSizenumber(MB)100 MBDefine maximum size of prefetch
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
onPlayfunction => music-Event trigger on music change or play
onPlayfunction => {}-Event trigger on music pause
onErrorfunction => url, isLastUrl, music-Event trigger when music url is bloken

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.6.15

5 months ago

1.6.17

4 months ago

1.6.16

5 months ago

1.6.19

4 months ago

1.6.18

4 months ago

1.6.4

7 months ago

1.6.3

7 months ago

1.6.2

7 months ago

1.6.1

7 months ago

1.6.0

7 months ago

1.6.11

7 months ago

1.6.10

7 months ago

1.6.13

6 months ago

1.6.12

6 months ago

1.6.14

6 months ago

1.5.3

8 months ago

1.5.2

8 months ago

1.5.1

8 months ago

1.5.0

9 months ago

1.6.9

7 months ago

1.6.8

7 months ago

1.6.7

7 months ago

1.6.6

7 months ago

1.6.5

7 months ago

1.4.0

9 months ago

1.3.0

9 months ago

1.2.20

9 months ago

1.2.21

9 months ago

1.2.19

9 months ago

1.2.18

9 months ago

1.2.17

9 months ago

1.2.16

10 months ago

1.2.15

10 months ago

1.2.14

10 months ago

1.2.12

11 months ago

1.2.13

11 months ago

1.2.8

11 months ago

1.2.7

11 months ago

1.2.6

11 months ago

1.2.5

11 months ago

1.2.9

11 months ago

1.2.10

11 months ago

1.2.11

11 months ago

1.2.3

12 months ago

1.2.2

12 months ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.3

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.1.2

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.6

1 year ago