Two pieces of issue #52 feedback from the TV look. The ticks were loud white and drew the eye away from the played part: they are half-white now, separators instead of exclamation marks. The chapter names were invisible entirely. While the controls overlay is up, the row above the seek bar names what is playing — index in amber, title in white, live with the position ("2 of 3 — Middle") — and the scrub preview panel carries the chapter title under the target time. TalkBack named chapters already (the bar's state description); now everyone else sees them too. A UI test asserts the label against the fake's chapters, and the screenshot fake (tools/mock) learns the same chapters/captions/ storyboard routes FakePeertube serves, with the sprite generated in plain Python — one fake world, two servers, as the screenshot skill puts it. Addresses #52 feedback. Chapter JUMPING stays out: on a D-pad it needs a home of its own (a chapters sidebar or a scrub step mode) and the issue itself calls it optional. |
||
|---|---|---|
| .. | ||
| media | ||
| mock_peertube.py | ||
| README.md | ||
Fake PeerTube backend
One fake, two consumers — the same data drives the UI tests and the README screenshots:
app/src/androidTest/assets/fixtures/peertube.json <- the single source of truth
├── UI tests app/src/androidTest/.../FakePeertube.kt (in-process, no network)
└── screenshots tools/mock/mock_peertube.py (HTTP on the host)
Both synthesise videos from the fixture's channel spec ({"name": …, "videos": N}),
so a test can rely on "a channel with exactly 37 videos" and a screenshot can never
show a world the tests don't know about. Neither talks to a real instance.
Screenshots
python3 tools/mock/mock_peertube.py # port 8080, app reaches it at 10.0.2.2:8080
./gradlew :app:assembleDebug && adb install -r app/build/outputs/apk/debug/app-debug.apk
# on the setup screen: http://10.0.2.2:8080, any username/password
app/src/debug/AndroidManifest.xml allows cleartext for this (debug builds only).
If port 8080 is taken, pass --port and use the matching 10.0.2.2:<port> URL.
Tests
./scripts/ui-test.sh fake # fake-backed tests, ~7 s
./scripts/ui-test.sh real # against tube.jeena.net, pre-release
The fake reports itself as the host (not the fixture's placeholder): the app decides what is "local" by comparing a channel's host with the instance URL.