A thin HTTP proxy to the public PeerTube demo instance with overrides so the authenticated screens populate without an account, for regenerating the README screenshots without the private instance. Includes a debug-only cleartext flag so a debug build can reach the proxy over HTTP. Kept on this branch; main stays clean. See tools/mock/README.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| mock_peertube.py | ||
| README.md | ||
Screenshot mock backend
Throwaway tooling to regenerate the README screenshots without exposing the
private family content on the real instance. Lives on the tools/screenshot-mock
branch only — main never carries the mock or the cleartext flag.
mock_peertube.py is a thin HTTP proxy to the public PeerTube demo instance
(peertube2.cpy.re, real CC/Blender content) with a handful of overrides so the
authenticated screens are populated without an account (login always succeeds, a
"Demo User" with an avatar, Continue watching / My videos / Subscriptions each
show a different slice so thumbnails don't repeat, My videos gets privacy badges,
and a channel page shows the full video grid). Media and images still load
straight from peertube2 over HTTPS; only the JSON and thumbnails pass through the
proxy. The app itself runs unmodified — the only app-side change is the
debug-only android:usesCleartextTraffic="true" in app/src/debug/ that lets a
debug build reach the proxy over HTTP.
Regenerate the screenshots
git checkout tools/screenshot-mock- Start the proxy on the host:
python3 tools/mock/mock_peertube.py(port 8080; needs only Python 3 stdlib). - Build + install the debug build on the emulator:
./gradlew :app:assembleDebug && adb install -r app/build/outputs/apk/debug/app-debug.apk - On the setup screen enter
http://10.0.2.2:8080(the emulator's alias for the host) and sign in with any username/password. - Drive the UI with
adb shell input …andadb shell screencapto capturehome,drawer,myvideos,channels,player, and a channel page. - Commit the PNGs on
main(only the images), not here.