npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mobin-ava-music-player

v1.6.19

Published

`$ npm install mobin-ava-music-player`

Downloads

34

Readme

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

| API | Type | required | Default | Description | | ------------------ | --------------------------------- | :------: | :-------: | -------------------------------------------------------------------------------------- | | playlist | PlaylistType | ✓ | - | playlist data | | log | boolean | ✘ | - | If set to 'true,' it enables logging | | xWebId | string | ✘ | - | Set x-web-id to log request header | | provider | string | ✘ | "unknown" | set provider to send in log request | | playStatus | boolean | ✘ | - | set play status | | preFetchAudioCount | number | ✘ | 5 | Define number of prefetch audios | | preFetchAudioSize | number(MB) | ✘ | 100 MB | Define maximum size of prefetch | | onClose | function => {} | ✘ | - | Music player close event | | onOpenFullscreen | function => {} | ✘ | - | Event trigger when music player get full screen | | onCloseFullscreen | function => {} | ✘ | - | Event trigger when music player minimize from full screan | | onMusicChange | function => music | ✘ | - | Event trigger when active music change and reutrns audio and it's index in musics list | | onPlay | function => music | ✘ | - | Event trigger on music change or play | | onPlay | function => {} | ✘ | - | Event trigger on music pause | | onError | function => url, isLastUrl, music | ✘ | - | Event trigger when music url is bloken |

PlaylistType:

| API | Type | required | Default | Description | | ----------- | ----------- | :------: | :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | id | number | ✓ | - | playlist id | | scope | string | ✓ | - | It indicates the service user of the web service. Its value for audiom is 'audiom' | | name | string | ✓ | - | Playlist name | | description | string | ✓ | - | Playlist description | | cover | string,null | ✓ | - | Playlist cover | | timestamp | number | ✘ | - | Playlist create date | | shareUrl | string | ✘ | - | Share url of playlist | | startIndex | number | ✓ | - | Each playlist has a startIndex. When played, it starts playing the music that corresponds to this index, (Change it to change the playing music) | | items | AudioType | ✓ | - | List of musics |

AudioType:

| API | Type | required | Default | Description | | -------------- | ------------- | :------: | :-----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | music_id | string | ✓ | - | Music Id | | name | string | ✓ | - | Music name | | artist | Artist[] | ✓ | - | Music artists information | | cover | string , null | ✓ | - | Music Cover | | url | string[] | ✓ | - | Music urls | | lyric | string | ✘ | - | Music lyric | | shareUrl | string | ✘ | - | Music share url | | timestamp | number | ✓ | - | Music create date | | quality | string | ✓ | - | Music quality | | from | string | ✓ | - | 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_duration | number | ✓ | - | Music duration | | mood | string[] | ✓ | - | Music moods list | | genre | string[] | ✓ | - | Music genres list | | tags | string[] | ✓ | - | Music tags list |

Artist:

| API | Type | required | Default | Description | | ----------- | ------ | :------: | :-----: | ----------- | | artist_name | string | ✓ | - | Artist name | | artist_id | string | ✓ | - | Artist Id |