1.4.3 • Published 2 years ago

@zxkfall/audio-player v1.4.3

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

@zxkfall/audio-player

This is a HTML Audio Player

Import

You can use it by CDN

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@zxkfall/audio-player/dist/style.css">

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@zxkfall/audio-player/dist/index.js"></script>

Or you can install it by npm

$ npm install @zxkfall/audio-player

then use it

import AudioPlayer from '@zxkfall/audio-player'
import '@zxkfall/audio-player/index.css'

Usage

For NPM,you can use it like this

const audioPlayer = new AudidoPlayer()
const items = [{url: 'localMusic.flac',cover:'image.jpg'},{url:'https://me.mp3',cover:'https://image.png'}];
audioPlayer.createAPlayer({items: items});

Or

const audioPlayer = new window.$AudidoPlayer()
const items = [{url: 'localMusic.flac',cover:'image.jpg'},{url:'https://me.mp3',cover:'https://image.png'}];
audioPlayer.createAPlayer({items: items});

For CDN,you can use it like this

const audioPlayer = new window.$AudidoPlayer()
const items = [{url: 'localMusic.flac',cover:'image.jpg'},{url:'https://me.mp3',cover:'https://image.png'}];
audioPlayer.createAPlayer({items: items});

If your are use react,you need to import image or music like this

import Me from './me.flac';

Future feats

  • support next or pre audio
  • show cover
  • extract picture from audio if it has cover
    • will get cover from FLAC music if not cover attribute,if music has not inner cover and item not cover attribute,it will show default image
    • get cover from mp3 music
  • more styles
  • ...

Contract

If you have any questions,you can add your question to My Github issues.

issues

I will deal with it when I am free.

1.4.3

2 years ago

1.4.2

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.1

2 years ago

1.2.1

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago