mirror of
https://github.com/navidrome/navidrome.git
synced 2026-07-02 07:12:36 +00:00
# APlayer Integration for Navidrome Shares This integration allows you to share music from Navidrome using APlayer, a beautiful HTML5 music player, without requiring authentication. ## Features - 🎵 Beautiful, responsive music player interface - 🔐 No authentication required - works with public share links - ⏰ Respects share expiration dates - 🎨 Clean, modern design - 📱 Mobile-friendly - 🔗 Easy to embed on external websites ## How to Use ### 1. Create a Share in Navidrome 1. In Navidrome, select songs, albums, or playlists you want to share 2. Click the share button and create a share link 3. Configure the share settings (expiration, description, etc.) ### 2. Get the APlayer URL 1. Go to the Navidrome admin panel 2. Navigate to "Shares" in the menu 3. Click on your share to edit it 4. You'll see two URLs: - **Share URL**: The regular Navidrome share page - **APlayer Embed URL**: The APlayer player page ### 3. Share or Embed You can either: - **Direct link**: Share the APlayer URL directly for people to listen in their browser - **Embed in website**: Use an iframe to embed the player on your own website #### Embed Example ```html <iframe src="http://your-navidrome-server/share/SHARE_ID/aplayer" width="100%" height="500" frameborder="0" allow="autoplay"> </iframe> ``` ## Technical Details ### How It Works 1. The APlayer page loads the share data from the server (no authentication needed) 2. Track streaming uses JWT tokens embedded in the share link 3. Tokens automatically expire when the share expires 4. All streaming is done through Navidrome's public API endpoints ### Security - No username/password required - Uses the same security model as regular Navidrome shares - JWT tokens are scoped to specific shares - Respects share expiration dates - Cannot access data outside the shared content ### Files Added/Modified **New Files:** - `resources/aplayer.html` - HTML template for the APlayer page - `resources/aplayer-share.js` - JavaScript that initializes APlayer with share data **Modified Files:** - `server/public/public.go` - Added route for `/share/:id/aplayer` - `server/public/handle_shares.go` - Added handler for APlayer page - `ui/src/utils/urls.js` - Added `shareAPlayerUrl()` function - `ui/src/share/ShareEdit.jsx` - Added APlayer URL display ## Customization ### Styling You can customize the appearance by modifying `resources/aplayer.html`. The default theme uses a purple gradient background, but you can change: - Colors and gradients - Player theme color - Layout and spacing - Font styles ### Player Options Edit `resources/aplayer-share.js` to modify APlayer settings: ```javascript const ap = new APlayer({ autoplay: false, // Auto-start playback theme: '#b7daff', // Player color theme loop: 'all', // Loop mode (all/one/none) volume: 0.7, // Default volume (0-1) // ... more options }); ``` For all available options, see [APlayer documentation](https://aplayer.js.org/). ## Credits - [Navidrome](https://github.com/navidrome/navidrome) - Modern Music Server - [APlayer](https://github.com/DIYgod/APlayer) - Beautiful HTML5 Music Player - [AplayerForNavidrome](https://github.com/maytom2016/AplayerForNavidrome) - Original inspiration ## License This integration follows the same license as Navidrome (GPL-3.0).
148 lines
6.0 KiB
Modula-2
148 lines
6.0 KiB
Modula-2
module github.com/navidrome/navidrome
|
|
|
|
go 1.25
|
|
|
|
// Fork to fix https://github.com/navidrome/navidrome/issues/3254
|
|
replace github.com/dhowden/tag v0.0.0-20240417053706-3d75831295e8 => github.com/deluan/tag v0.0.0-20241002021117-dfe5e6ea396d
|
|
|
|
require (
|
|
github.com/Masterminds/squirrel v1.5.4
|
|
github.com/RaveNoX/go-jsoncommentstrip v1.0.0
|
|
github.com/andybalholm/cascadia v1.3.3
|
|
github.com/bmatcuk/doublestar/v4 v4.9.1
|
|
github.com/bradleyjkemp/cupaloy/v2 v2.8.0
|
|
github.com/deluan/rest v0.0.0-20211102003136-6260bc399cbf
|
|
github.com/deluan/sanitize v0.0.0-20241120162836-fdfd8fdfaa55
|
|
github.com/dexterlb/mpvipc v0.0.0-20241005113212-7cdefca0e933
|
|
github.com/dhowden/tag v0.0.0-20240417053706-3d75831295e8
|
|
github.com/disintegration/imaging v1.6.2
|
|
github.com/djherbis/atime v1.1.0
|
|
github.com/djherbis/fscache v0.10.2-0.20231127215153-442a07e326c4
|
|
github.com/djherbis/stream v1.4.0
|
|
github.com/djherbis/times v1.6.0
|
|
github.com/dustin/go-humanize v1.0.1
|
|
github.com/fatih/structs v1.1.0
|
|
github.com/go-chi/chi/v5 v5.2.3
|
|
github.com/go-chi/cors v1.2.2
|
|
github.com/go-chi/httprate v0.15.0
|
|
github.com/go-chi/jwtauth/v5 v5.3.3
|
|
github.com/go-viper/encoding/ini v0.1.1
|
|
github.com/gohugoio/hashstructure v0.6.0
|
|
github.com/google/go-pipeline v0.0.0-20230411140531-6cbedfc1d3fc
|
|
github.com/google/uuid v1.6.0
|
|
github.com/google/wire v0.7.0
|
|
github.com/gorilla/websocket v1.5.3
|
|
github.com/hashicorp/go-multierror v1.1.1
|
|
github.com/jellydator/ttlcache/v3 v3.4.0
|
|
github.com/kardianos/service v1.2.4
|
|
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
|
|
github.com/knqyf263/go-plugin v0.9.0
|
|
github.com/kr/pretty v0.3.1
|
|
github.com/lestrrat-go/jwx/v2 v2.1.6
|
|
github.com/maruel/natural v1.2.1
|
|
github.com/matoous/go-nanoid/v2 v2.1.0
|
|
github.com/mattn/go-sqlite3 v1.14.32
|
|
github.com/microcosm-cc/bluemonday v1.0.27
|
|
github.com/mileusna/useragent v1.3.5
|
|
github.com/onsi/ginkgo/v2 v2.27.3
|
|
github.com/onsi/gomega v1.38.3
|
|
github.com/pelletier/go-toml/v2 v2.2.4
|
|
github.com/pocketbase/dbx v1.11.0
|
|
github.com/pressly/goose/v3 v3.26.0
|
|
github.com/prometheus/client_golang v1.23.2
|
|
github.com/rjeczalik/notify v0.9.3
|
|
github.com/robfig/cron/v3 v3.0.1
|
|
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
|
|
github.com/sirupsen/logrus v1.9.3
|
|
github.com/spf13/cobra v1.10.2
|
|
github.com/spf13/viper v1.21.0
|
|
github.com/stretchr/testify v1.11.1
|
|
github.com/tetratelabs/wazero v1.10.1
|
|
github.com/unrolled/secure v1.17.0
|
|
github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342
|
|
go.uber.org/goleak v1.3.0
|
|
golang.org/x/exp v0.0.0-20251209150349-8475f28825e9
|
|
golang.org/x/image v0.34.0
|
|
golang.org/x/net v0.48.0
|
|
golang.org/x/sync v0.19.0
|
|
golang.org/x/sys v0.39.0
|
|
golang.org/x/term v0.38.0
|
|
golang.org/x/text v0.32.0
|
|
golang.org/x/time v0.14.0
|
|
google.golang.org/protobuf v1.36.11
|
|
gopkg.in/yaml.v3 v3.0.1
|
|
)
|
|
|
|
require (
|
|
dario.cat/mergo v1.0.2 // indirect
|
|
github.com/Masterminds/semver/v3 v3.4.0 // indirect
|
|
github.com/atombender/go-jsonschema v0.20.0 // indirect
|
|
github.com/aymerick/douceur v0.2.0 // indirect
|
|
github.com/beorn7/perks v1.0.1 // indirect
|
|
github.com/cespare/reflex v0.3.1 // indirect
|
|
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
|
github.com/creack/pty v1.1.11 // indirect
|
|
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
|
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect
|
|
github.com/fsnotify/fsnotify v1.9.0 // indirect
|
|
github.com/go-logr/logr v1.4.3 // indirect
|
|
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
|
|
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
|
|
github.com/goccy/go-json v0.10.5 // indirect
|
|
github.com/goccy/go-yaml v1.18.0 // indirect
|
|
github.com/google/go-cmp v0.7.0 // indirect
|
|
github.com/google/pprof v0.0.0-20251213031049-b05bdaca462f // indirect
|
|
github.com/google/subcommands v1.2.0 // indirect
|
|
github.com/gorilla/css v1.0.1 // indirect
|
|
github.com/hashicorp/errwrap v1.1.0 // indirect
|
|
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
|
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
|
|
github.com/kr/text v0.2.0 // indirect
|
|
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
|
|
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
|
|
github.com/lestrrat-go/blackmagic v1.0.4 // indirect
|
|
github.com/lestrrat-go/httpcc v1.0.1 // indirect
|
|
github.com/lestrrat-go/httprc v1.0.6 // indirect
|
|
github.com/lestrrat-go/iter v1.0.2 // indirect
|
|
github.com/lestrrat-go/option v1.0.1 // indirect
|
|
github.com/mfridman/interpolate v0.0.2 // indirect
|
|
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
|
|
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
|
github.com/ogier/pflag v0.0.1 // indirect
|
|
github.com/pkg/errors v0.9.1 // indirect
|
|
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
|
github.com/prometheus/client_model v0.6.2 // indirect
|
|
github.com/prometheus/common v0.66.1 // indirect
|
|
github.com/prometheus/procfs v0.16.1 // indirect
|
|
github.com/rogpeppe/go-internal v1.14.1 // indirect
|
|
github.com/sagikazarmark/locafero v0.12.0 // indirect
|
|
github.com/sanity-io/litter v1.5.8 // indirect
|
|
github.com/segmentio/asm v1.2.1 // indirect
|
|
github.com/sethvargo/go-retry v0.3.0 // indirect
|
|
github.com/sosodev/duration v1.3.1 // indirect
|
|
github.com/spf13/afero v1.15.0 // indirect
|
|
github.com/spf13/cast v1.10.0 // indirect
|
|
github.com/spf13/pflag v1.0.10 // indirect
|
|
github.com/stretchr/objx v0.5.2 // indirect
|
|
github.com/subosito/gotenv v1.6.0 // indirect
|
|
github.com/wtolson/go-taglib v0.0.0-20210406152913-79209c280058 // indirect
|
|
github.com/zeebo/xxh3 v1.0.2 // indirect
|
|
go.uber.org/multierr v1.11.0 // indirect
|
|
go.yaml.in/yaml/v2 v2.4.2 // indirect
|
|
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
|
golang.org/x/crypto v0.46.0 // indirect
|
|
golang.org/x/mod v0.31.0 // indirect
|
|
golang.org/x/telemetry v0.0.0-20251203150158-8fff8a5912fc // indirect
|
|
golang.org/x/tools v0.40.0 // indirect
|
|
gopkg.in/ini.v1 v1.67.0 // indirect
|
|
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
|
|
)
|
|
|
|
tool (
|
|
github.com/atombender/go-jsonschema
|
|
github.com/cespare/reflex
|
|
github.com/google/wire/cmd/wire
|
|
github.com/onsi/ginkgo/v2/ginkgo
|
|
golang.org/x/tools/cmd/goimports
|
|
)
|