百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

audio-player

> 前端框架
开源

带有自定义控制、播放列表、过滤器和搜索功能的音乐播放器。

379 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

带有自定义控制、播放列表、过滤器和搜索功能的音乐播放器。

React/NextJS Audio Player

Demo: https://audioplayer.madza.dev


Requirements

Node.js 18.x / 20+ is required.

Tested on React 18.2.0 and NextJS 14.1.0.

Installation

javascript
 npm install @madzadev/audio-player

Usage

javascript
import Player from "@madzadev/audio-player";
import "@madzadev/audio-player/dist/index.css";
javascript
const tracks = [
  {
    url: "https://audioplayer.madza.dev/Madza-Chords_of_Life.mp3",
    title: "Madza - Chords of Life",
    tags: ["house"],
  },
  {
    url: "https://audioplayer.madza.dev/Madza-Late_Night_Drive.mp3",
    title: "Madza - Late Night Drive",
    tags: ["dnb"],
  },
  {
    url: "https://audioplayer.madza.dev/Madza-Persistence.mp3",
    title: "Madza - Persistence",
    tags: ["dubstep"],
  },
];
javascript

The only mandatory prop is trackList for audio source.

It requires to pass in an array consisting of objects with url, title and tags keys.

Options

There are multiple optional props you can use to configure the player.

The default values of them are displayed below.

javascript

Color schemes

You can customize the design of the player by editing the colors object below.

Include only those properties, that you want to customize.

…
javascript

Final notes

The audio files can be stored and accessed both locally in your project via file path (e.g., public/yourtrack.mp3) or using external host and providing direct URL to the source (e.g., https://website.com/yourtrack.mp3).

This project is under MIT license, so be free to check it out and contribute!

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScriptaudiomp3musicnextjs

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架