# Devor Player

A small, open-source media player with its own library – for music, videos,
pictures and audiobooks, on desktop and on the phone. It runs entirely in the
browser: no backend server, no account, no tracking. Your files stay on your device.

## What it does

- **One library for four kinds of media.** Music is grouped into albums,
  audiobooks remember where you stopped (chapters included), videos keep their
  position too, pictures open in a viewer with a slideshow.
- **Every file gets a face.** Covers come from the files themselves (ID3, MP4,
  FLAC, Ogg, video frames). Files without artwork get a generated cover. The shape
  of a tile tells you what it is: square for music, wide for video, tall for a
  book, small for a picture.
- **Three ways in.** Pick files (copied into the browser's storage), connect a
  folder (read in place, nothing copied – Chrome and Edge), or add an online
  address.
- **Cloud and online.** A synced cloud folder (OneDrive, Google Drive, Dropbox,
  iCloud Drive) can be connected like any other folder; on a phone, cloud files
  appear in the system file picker. Direct links to files and streams are added
  as online items – share links from Dropbox and Nextcloud are converted
  automatically. Google Drive share links only work for small, publicly shared
  files, because Google answers large files with a confirmation page.
- **Works offline and as an app.** Installable (PWA), opens media files from
  the system, keeps playing with the screen off, shows up in the lock-screen
  controls (Media Session API). Keyboard shortcuts on desktop.
- **Three languages.** German, English, Czech – picked from the browser,
  changeable in the settings.
- **Light and dark**, following the device or set by hand.

## What it does not do

- It plays what *your browser* can decode. That is usually MP3, AAC/M4A/M4B,
  FLAC, Opus, Vorbis, WAV, MP4 (H.264/AAC), WebM and the common picture
  formats. AVI, WMV, MKV with unusual codecs, HEIC and similar may not play –
  such files are marked as "not playable" instead of failing silently.
- It does not browse Google Drive, Dropbox or OneDrive accounts from inside the
  app. That would need registered app keys for each provider. Use a synced
  folder or a direct link instead.
- It is not a streaming service. Nothing is uploaded anywhere.

## Running it

Devor Player is static: HTML, CSS and JavaScript, no build step, no dependencies.

- **Locally:** open `index.html` in Chrome, Edge or Firefox. Everything works,
  except installing as an app (that needs https).
- **On a web server:** copy the folder as it is. Serve it over https so that
  the service worker and "install as app" are available.
- **Online items** are fetched by the visitor's browser directly from the
  address given. If you also want Devor Player to read tags and covers of online
  files, the server hosting them must allow cross-origin reads and byte ranges
  (`Access-Control-Allow-Origin`, `Accept-Ranges`).

### Shipping your own media

A site owner can ship a set of media with the player. Point the
`devor:catalogue` meta tag in `index.html` at a JSON file:

```html
<meta name="devor:catalogue" content="library.json">
```

```json
{ "items": [
  { "url": "media/song.mp3", "title": "Song", "artist": "Band", "album": "Album", "track": 1, "art": "media/cover.jpg" },
  { "url": "media/clip.mp4", "kind": "video" },
  { "url": "https://example.org/stream", "kind": "music", "title": "Radio" }
] }
```

`url` is required; everything else is optional. Visitors can remove catalogue
items from their view; items that disappear from the file disappear from their
libraries too.

## Browser notes

| | Chrome / Edge | Firefox | Safari |
|---|---|---|---|
| Copy files into the library | yes | yes | yes |
| Connect a folder (no copy) | yes (desktop, Android) | no | no |
| Install as app | yes | no | via "Add to Home Screen" |

On iPhone and iPad, Safari deletes site data after seven days without a
visit. Adding Devor Player to the Home Screen prevents that. The settings show how
much storage is used and let you ask the browser to protect it.

## Privacy and security

- No analytics, no fonts or scripts from other sites, no cookies.
- A strict Content Security Policy: the app loads nothing but its own files,
  plus the online addresses you add yourself.
- The service worker caches only the app's files, never your media.
- Everything lives in IndexedDB in your browser. "Clear library" removes it;
  your original files are never touched.

## Structure

```
index.html            page, icons, security policy
app.css               all styles (light and dark)
js/util.js            helpers, DOM builder
js/i18n.js            texts in de / en / cs
js/db.js              IndexedDB layer
js/tags.js            metadata reader (ID3, MP4, FLAC, Ogg, WAV, chapters)
js/library.js         library, import, folders, online items, thumbnails
js/player.js          playback, queue, resume, Media Session
js/app.js             views and interaction
sw.js                 offline cache for the app itself
manifest.webmanifest  app manifest (install, file handlers)
icons/                app icons
```

## Licence

MIT – see `LICENSE`. Copyright (c) 2026 Jiri Sevcik.

Devor Player was designed and built together with an AI assistant, directed and
tested by Jiri Sevcik as part of his learning portfolio at godevor.com.
