All Projects → madzadev → audio-player

madzadev / audio-player

Licence: other
🎵 Music player with custom controls, playlist, filters, and search.

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to audio-player

Sjmediacacheserver
A HTTP Media Caching Framework. It can cache FILE or HLS media. 音视频边播边缓存框架, 支持 HLS(m3u8) 和 FILE(mp4, mp3等).
Stars: ✭ 87 (-36.5%)
Mutual labels:  player, mp3
Audioplayer
Audio Player for Nextcloud and ownCloud
Stars: ✭ 179 (+30.66%)
Mutual labels:  player, mp3
Vue Howler
[UNMAINTAINED] A Howler.js mixin for Vue 2 that makes it easy to create custom audio player components
Stars: ✭ 103 (-24.82%)
Mutual labels:  player, mp3
Hysteriaplayer
Objective-C audio player, sitting on top of AVPlayer
Stars: ✭ 568 (+314.6%)
Mutual labels:  player, mp3
TonUINO
Alternative TonUINO Firmware
Stars: ✭ 112 (-18.25%)
Mutual labels:  player, mp3
Piano
🎹用键盘8个键演奏一首蒲公英的约定送给自己或月亮代表我的心送给她
Stars: ✭ 850 (+520.44%)
Mutual labels:  player, mp3
Musicplayer
A minimal music player built on electron.
Stars: ✭ 145 (+5.84%)
Mutual labels:  player, mp3
lplayer
lplayer is a simple audio player for simply listening
Stars: ✭ 40 (-70.8%)
Mutual labels:  player, mp3
uos
United Open-libraries of Sound. United procedures for open-source audio libraries. For FPC/Lazarus/fpGUI/MSEgui.
Stars: ✭ 112 (-18.25%)
Mutual labels:  player, mp3
plex-music
Web/Desktop app for streaming music from your Plex Media Server
Stars: ✭ 42 (-69.34%)
Mutual labels:  player, mp3
Flutter Assetsaudioplayer
Play simultaneously music/audio from assets/network/file directly from Flutter, compatible with android / ios / web / macos, displays notifications
Stars: ✭ 458 (+234.31%)
Mutual labels:  player, mp3
retro-winamp-block
A Winamp-styled audio block for all your retro music player needs.
Stars: ✭ 14 (-89.78%)
Mutual labels:  player, mp3
Simple Music Player
Simple Music Player - SimpleMP - Keeps it simple and plays your music
Stars: ✭ 298 (+117.52%)
Mutual labels:  player, mp3
Aplay
A Better(Maybe) iOS Audio Stream、Cache、Play Framework
Stars: ✭ 44 (-67.88%)
Mutual labels:  player, mp3
Openwhyd
💎 Like Pinterest, for Music
Stars: ✭ 287 (+109.49%)
Mutual labels:  player, mp3
Sbplayerclient
支持全格式的mac版视频播放器
Stars: ✭ 110 (-19.71%)
Mutual labels:  player, mp3
aplay-
a simple BitPerfect player
Stars: ✭ 23 (-83.21%)
Mutual labels:  player, mp3
ATtiny85-TinyDFPlayer
MP3-Player
Stars: ✭ 22 (-83.94%)
Mutual labels:  player, mp3
audioStreamDemo
A music player created in swift using AVPlayer to stream audio from server.
Stars: ✭ 33 (-75.91%)
Mutual labels:  player, mp3
vuetify-audio
A Vue audio player base on Vuetify UI framework: https://wilsonwu.github.io/dist/index.html#/vuetifyaudio
Stars: ✭ 137 (+0%)
Mutual labels:  player, mp3

React/NextJS Audio Player

Maintenance GitHub issues PRs Welcome MIT license

Player Preview

Demo: https://audioplayer.madza.dev


Installation

 npm install @madzadev/audio-player

If you are using NPM v7 or above, you need to add --legacy-peer-deps at the end of the command above.

Usage

import Player from "@madzadev/audio-player";
import "@madzadev/audio-player/dist/index.css";
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"],
  },
];
<Player trackList={tracks} />

trackList is the mandatory prop and requires to pass in an array consisting of objects with url, title and tags keys.

Config for NextJS

If you are working on NextJS, there are 3 additional steps:

  1. npm i next-images next-transpile-modules
  2. create next.config.js in your project's root
  3. paste this in the newly created config file:
const withImages = require("next-images");
const withTM = require("next-transpile-modules")(["@madzadev/audio-player"]);

module.exports = withImages(withTM());

Options

The default values of available options props are displayed.

<Player
  trackList={tracks}
  includeTags={true}
  includeSearch={true}
  showPlaylist={true}
  autoPlayNextTrack={true}
/>

Color schemes

You can further customize the player UI by editing the colors variable below.

Pre-defined color schemes are planned in the future.

const colors = `html {
          --tagsBackground: #9440f3;
          --tagsText: #ffffff;
          --tagsBackgroundHoverActive: #2cc0a0;
          --tagsTextHoverActive: #ffffff;
          --searchBackground: #18191f;
          --searchText: #ffffff;
          --searchPlaceHolder: #575a77;
          --playerBackground: #18191f;
          --titleColor: #ffffff; 
          --timeColor: #ffffff;
          --progressSlider: #9440f3;
          --progressUsed: #ffffff;
          --progressLeft: #151616;
          --volumeSlider: #9440f3;
          --volumeUsed: #ffffff;
          --volumeLeft:  #151616;
          --playlistBackground: #18191f;
          --playlistText: #575a77;
          --playlistBackgroundHoverActive:  #18191f;
          --playlistTextHoverActive: #ffffff;
      }`;
<Player trackList={tracks} customColorScheme={colors} />

Final notes

It's recommended to use CMS like Contentful or DatoCMS to manage your audio files and access them via API.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].