# MIRA Player Desktop — install & plane-mode downloads (v0.1.1)

**Status:** unsigned early-access build, free with your membership. Linked from the public site at miraplayer.tv/get.

## Artifacts (this folder)

| File | Platform |
|------|----------|
| `MIRA-Player-0.1.1-mac-arm64.zip` | Apple Silicon MacBook (M1/M2/M3/M4) — **use this for modern MacBooks** |
| `MIRA-Player-0.1.1-mac-x64.zip` | Intel Mac |
| `MIRA-Player-0.1.1-win-x64.zip` | Windows 10/11 x64 (see `WIN_INSTALL.md`) |
| `MIRA-Player-0.1.1-linux-x64.AppImage` | Linux smoke (built on the home box) |
| `SHA256SUMS.txt` | checksums |

Full build/signing/update plan: `software/mira_tv_desktop/DESKTOP_BUILD_PATH_20260723.md`.

## Honest packaging note

- **DMG was not produced on the Linux build host** — `hdiutil` is macOS-only. Electron-builder successfully packages `MIRA Player.app` into a **zip**. On your Mac you can optionally convert: open zip → drag app to Applications (same UX as a DMG without the fancy disk image).
- **Not code-signed / not notarized** (`identity: null`). Gatekeeper will warn. That is expected for this MVP.

## Install on MacBook (unsigned)

1. Copy the right zip to the Mac (AirDrop / USB / scp). Prefer **arm64** for your plane MacBook if it is Apple Silicon.
2. Unzip → you get `MIRA Player.app`.
3. Drag `MIRA Player.app` to **Applications** (or leave on Desktop/SSD).
4. First open:
   - Right-click (or Control-click) the app → **Open** → **Open** again in the dialog.
   - Or: System Settings → Privacy & Security → allow “MIRA Player” after a blocked open.
5. Do **not** expect App Store / notarization green checks yet.

## Plane workflow (offline downloads)

Legal shape: you download from **your own** authorized sources (BYO) onto **your own** disk. MIRA does not host or re-serve content.

1. Online (home / hotel Wi‑Fi): sign in, ensure your sources are connected (Account → Sources).
2. Open a **movie** title → **Download** (desktop-only button).  
   Series: open title → episode row → **DL**.
3. Files go to **`~/Movies/MIRA`** (override with env `MIRA_DOWNLOADS_DIR` if you want an external SSD path — set before launch).
4. Progress / pause / resume / delete: nav **Downloads** (or File → Downloads / ⌘D).
5. On the plane (airplane mode): open **Downloads** → **Play offline**. Playback uses the local file via the app’s loopback server (`/offline/<id>`) — **no API resolve required** for that play.

### Quality pick (“compression logic”)

Not server transcoding. The app picks the best **existing progressive** URL (mp4/mkv) from the resolve candidate list — prefers 1080p, then 720p; skips pure HLS/m3u8 for offline MVP.

### Gaps (honest)

| Gap | Detail |
|-----|--------|
| HLS-only sources | Cannot offline-download yet (no client m3u8 segment stitcher in this MVP). |
| DMG | Build on a Mac for a real `.dmg`, or use the zip (same app). |
| Signing/notarize | Not done — right-click Open required. |
| Browser web | Download UI is desktop-only (`window.miraDesktop`). |
| Live TV | Not offline-downloadable (by design). |

## Rebuild (dev machine)

```bash
cd ~/mira/software/mira_tv_desktop
npm run sync-web          # rebuilds mira_tv_web with VITE_BASE=/ into web-dist
# On macOS:
npm run dist:mac          # dmg + zip when hdiutil available
# Cross from Linux (what we did):
CSC_IDENTITY_AUTO_DISCOVERY=false npx electron-builder --mac zip --arm64
```

## Smoke verified on build host (2026-07-22)

- Web `tsc` + vite build green (desktop base `/`).
- Download URL picker unit tests PASS (1080 progressive preferred; HLS-only → null).
- Integration: HTTP progressive download + Range resume → complete file on disk.
- Linux AppImage packaged; mac x64 + arm64 zips packaged with `downloads.cjs` + fresh web-dist inside `app.asar`.
- Live MacBook open + plane play: **owner to verify** (no Mac in this loop).
