An open API service indexing awesome lists of open source software.

https://github.com/ejfox/music-player


https://github.com/ejfox/music-player

Last synced: 4 months ago
JSON representation

Awesome Lists containing this project

README

          

# music

A minimal music player for Cloudflare R2-hosted MP3s. Built for [smallweb](https://smallweb.run).

Live: https://music.ejfox.com

## Features

- Lists MP3s from R2 bucket
- Real-time audio visualizer
- Unicode waveform display (crowdsourced from clients)
- Keyboard shortcuts: `space` play/pause, `n` next, `p` prev, `s` shuffle
- Shareable track URLs

## Setup

```bash
cp .env.example .env
# Edit .env with your R2 credentials
```

## Environment Variables

| Variable | Description |
|----------|-------------|
| `R2_ACCOUNT_ID` | Cloudflare account ID |
| `R2_ACCESS_KEY_ID` | R2 API access key |
| `R2_SECRET_ACCESS_KEY` | R2 API secret key |
| `R2_BUCKET_NAME` | R2 bucket name (default: `ejfox-personal`) |

## Run

```bash
deno run --allow-net --allow-env --allow-read --allow-write main.ts
```

Or with smallweb, just drop in a folder and set env vars in `.env`.