Commit Graph
14 Commits
Author SHA1 Message Date
nvrl 79e43ed842 feat(android): Watch Next and voice search on a TV
Roadmap C4. On a television:

- Continue watching also appears on the launcher's home screen, in its
  Play Next row (TvContract.WatchNextPrograms, WRITE_EPG_DATA), with the
  place and length, the provider's art and synopsis, and the episode's own
  name and numbers, never a file name. A card plays its episode through
  ACTION_PLAY_EPISODE. A card the viewer removed stays off until that
  episode is watched again. Settings → Playback has a switch, on by
  default and shown only on a TV.
- The Search page has a mic beside the field, and the remote's Search key
  opens Search listening from any page (RecognizerIntent).
- The assistant's "search for … on Proton Stream" (SEARCH, SEARCH_ACTION)
  opens Search with what was said; "play … on Proton Stream"
  (MEDIA_PLAY_FROM_SEARCH) plays the one title of that name from where
  the viewer is, else shows the search. A search from outside the field
  moves the focus to its results without leaving a keyboard over them.

Fast-forward and rewind through the media session were already in place
from C1.
2026-11-23 23:28:39 +01:00
nvrl 585439fbfd feat(core,android): add a share to a TV from a phone
Typing a share link on a remote is the worst part of setting up a TV.
Add share on a TV now shows a QR code instead. The phone's camera opens
a page the TV serves on the home network, the link is pasted there, and
the TV opens it through the same path as the typed form. A refusal (a
wrong password, an incomplete link) goes back to the page with the link
kept, so it is fixed where the keyboard is. The phone needs nothing
installed.

pstr-core::handoff listens on the TV's private IPv4 address only, under
a random 60-bit path, for ten minutes or until a share is added. The page
runs no script and its CSP allows none; requests are size- and
time-bounded. It is plain HTTP, which PRIVACY.md states, and "Type it
instead" keeps the ordinary form.
2026-11-23 20:27:28 +01:00
nvrl 12187ba1d5 fix(android): make the TV pages work with a remote
Ran the TV UI on an Android TV emulator with a real library and fixed
what came up:

- The app started with the focus in the menu, not on the page.
- Left from a card landed on the menu entry level with it, not on the
  page that is open.
- Down on the search field stayed in the field, so the results could
  not be reached.
- Compose's TV scrolling stops a third of the way in, which cut the row
  above in half on Home and scrolled a title's name away under Play.
  Rows on Home now line up under the top, and a title page, search and
  a genre page scroll only as far as needed.
- Home showed My List twice: as its own row and as the core's shelf.
- A focused episode's text was dark on a dark surface.
2026-11-23 16:32:32 +01:00
nvrl f2261acd0e feat(android): give the TV a UI of its own
On a television MainActivity now composes ui/tv/TvApp instead of the
phone's ProtonStreamApp: the same AppViewModel, library, account and
player, laid out for a screen across a room on androidx.tv:tv-material.

- A navigation drawer down the left edge: Home, Search, History,
  Downloads, Shares, Settings.
- Home: the focused title's backdrop, name and synopsis at the top,
  following the focus after a short pause, and rows of Continue
  watching, My List, the shelves and every title under it.
- A title's page opens with Play focused, then Start over, My List and
  Mark watched, season chips, episodes with stills and synopses, the
  franchise and More like this.
- Search and Browse pages; OK on the field opens the TV's keyboard or
  voice input.
- Menu, or holding OK, opens a focusable menu where a phone has a long
  press. Rows remember the card they were left on.
- The player covers everything and nothing is composed under it.
  Leaving the video stops it: a TV has no mini player.
- History, Downloads, Shares and Settings are the phone's pages inside
  the overscan margins for now.
2026-11-23 14:14:39 +01:00
nvrl 6383f26693 feat(android): drive the app with a TV remote
Issue #5: on an Android TV the app installed but needed a touch screen.
This is the groundwork both the phone UI and a later dedicated TV UI
need.

- The focused control is outlined in the accent, and artwork grows a
  little, instead of Material's ten percent tint.
- The Menu key opens what a long press opens: the Continue watching
  and tile menus, and "Mark watched up to here" on an episode.
- Closing a title gives the focus back to the tile it was opened from.
  The featured banner stops turning while one of its buttons is
  focused.
- Player: a key press keeps the controls up, and Play takes the focus
  when they appear. Skip, Up next, the end card and Retry take the
  focus when they show, and Back hides the controls first. Rewind and
  fast-forward seek 10 s, also from the media session. Next, previous
  and stop work too. A TV has no rotation lock or touch lock.
- On a TV: navigation rail, single pane, overscan margins, a shorter
  banner, and a CAPTCHA window that fits a 540 dp screen.
2026-11-23 13:37:54 +01:00
nvrl 76ff90506c fix(android): ship armeabi-v7a for 32-bit Android TVs
Many Android TVs run a 32-bit userspace on a 64-bit SoC. The APK had only
arm64-v8a and x86_64 native libraries, so the package installer rejected
it there as "not compatible with your TV" before it ever ran.

libmpv (mpv-android's armv7l target), the Rust core (cargo-ndk) and the
JNI shim now build for armeabi-v7a too, and CI installs the
armv7-linux-androideabi Rust target. Adds about 43 MB to the APK.

Refs #5
2026-11-22 16:49:58 +01:00
nvrl 3d6aa3c64c feat(branding) logo + app icon 2026-11-18 01:44:14 +01:00
nvrl f0402e74f9 feat(android): install on Android TV, and take a remote's keys in the player
The app is listed in the TV launcher with a banner, and neither a touch
screen nor leanback is required. While the controls are down the player
takes D-pad left and right as a ten-second seek, the middle button as
bringing the controls up, and play/pause and space as they say.
2026-10-13 21:37:40 +02:00
nvrl 8e42906a7f feat(core,app,android,cli,ios): sync the library and settings, verify a share before adding it
Sync carried only watch positions, so a second device started empty. The
per-installation history file now also carries per-key registers
(pstr-core::profile): every share with its link and custom password, the
playback, appearance and metadata settings, the TMDB key, hand-picked
matches and per-title track choices. Newer updated_at wins per key, a
removal travels as an empty register, and a first sync stamps at 0 so a
fresh install takes the library the other devices have instead of
overwriting it with defaults. Volume, mute and the device-only settings
(cache budget, Wi-Fi only, background audio, hardware decoding) stay out.
The secrets live only in the end-to-end encrypted Drive file, never in
shares.json. FORMAT_VERSION stays 1; an older build ignores the registers.

Adding a share stored it before opening the link, so a first failure left a
broken entry and every retry said "already configured". add_verified opens
the link first and stores nothing on failure, and only the new share is
crawled afterwards, so another broken share cannot fail the add.

Android drops picture-in-picture: the window sized the video wrongly and
background audio already covers leaving the app.

iOS sizes the Metal drawable on every layout, so the picture no longer
stretches after a rotation or a Split View resize. Settings show a save at
once rather than after the match run, and a failed save reverts and says
why. Both phone clients gain an activity banner naming what is running, and
the add-share, metadata and change-match forms show progress and errors in
place.
2026-10-09 03:15:39 +02:00
nvrl 99abc8f205 build(android): move to NDK r30 and mpv-android 687c7fd
Upstream mpv-android moved its build to NDK r30 (30.0.16248370), and each
mpv-android revision pins its own NDK, so the two move together. The new
revision also updates harfbuzz to 14.5.0, unibreak to 8.0, fribidi to
1.0.17, libxml2 to 2.15.4, fontconfig to 2.18.3 and curl to 8.22.0, and
builds libass with assembly on x86_64 (nasm, already installed in CI).

r30 brings an LLVM update with codegen and LTO fixes and sysroots up to
API 37. It is also the NDK current SDK managers install, so a fresh setup
no longer needs r29 installed beside it.

The script change invalidates the cached libmpv tree, so CI rebuilds it
once. The staged libraries are the same set as before, all 16 KiB aligned.
2026-10-04 02:42:53 +02:00
nvrl c63f08ac91 test(android): screenshot tests for every screen
Roborazzi draws Library (phone, tablet, font scale 1.5, empty), a title,
Shares, Settings and Downloads from fixed records under Robolectric, and
build-android.sh check compares them with the committed images in
app/src/test/screenshots. The redesign changes every screen; a layout
regression now fails the gate and shows up in review as a changed image.
2026-10-03 04:34:46 +02:00
nvrl 2275df40a8 ci(android,release): publish the signed APK with each release 2026-10-03 02:45:13 +02:00
nvrl f1b3ad9637 improved android client, feature parity with desktop 2026-08-09 16:40:37 +02:00
nvrl 6db6909824 added android client 2026-08-05 13:07:56 +02:00