docs: Record verified watching and history API behavior
Live-tested the the test account account against tube.jeena.net: the watching endpoint stores the playback position (resume possible via userHistory=true) and populates user history; history rows carry no lastViewedAt. Notes feed the v0.2 resume-from-server item.
This commit is contained in:
parent
7f90843287
commit
764fa8b34c
2 changed files with 19 additions and 7 deletions
14
AGENTS.md
14
AGENTS.md
|
|
@ -39,7 +39,7 @@ State flow: `MainActivity` observes `AppViewModel.sessionState`; `NeedsSetup` re
|
|||
setup/login screen, `Ready` renders `HomeScreen`, which switches content on a
|
||||
`Destination` enum. The player pushes a video onto a state and uses a `BackHandler`.
|
||||
|
||||
## PeerTube API notes (verified against tube.jeena.net)
|
||||
## PeerTube API notes (verified 2026-10-10 against tube.jeena.net, v8.3.1)
|
||||
|
||||
- OAuth: `GET /api/v1/oauth-clients/local` → client_id/client_secret;
|
||||
`POST /api/v1/users/token` (form: grant_type=password) → access_token + refresh_token.
|
||||
|
|
@ -53,11 +53,15 @@ setup/login screen, `Ready` renders `HomeScreen`, which switches content on a
|
|||
- `GET /api/v1/video-channels?search=…&searchTarget=local` (local channels only)
|
||||
- Authenticated (`Bearer` header):
|
||||
- `GET /api/v1/users/me/videos` — own videos, ALL privacy levels
|
||||
- `GET /api/v1/users/me/subscriptions/videos`
|
||||
- `GET /api/v1/users/me/history/videos`
|
||||
- `GET /api/v1/users/me/subscriptions/videos` and `users/me/history/videos` return
|
||||
the standard `{ total, data: [...] }` wrapper (verified live); history items are
|
||||
plain video objects — **`lastViewedAt` is NOT returned** (don't rely on it)
|
||||
- `GET /api/v1/accounts/{accountName}/video-channels`
|
||||
- `POST /api/v1/videos/{shortUuid}/watching` `{ "currentTime": <seconds> }` — populates
|
||||
server-side history. Report every ~20 s of wall-clock playback once currentTime ≥ 5 s.
|
||||
- `POST /api/v1/videos/{shortUuid}/watching` JSON body `{ "currentTime": <seconds> }`
|
||||
→ HTTP 204 (verified). This is what populates server-side history AND the stored
|
||||
playback position. Report every ~20 s of wall-clock playback once currentTime ≥ 5 s.
|
||||
- Resume-from-server possible via `GET /api/v1/videos/{shortUuid}?userHistory=true`
|
||||
→ `userHistory: { currentTime, currentPercent }` (verified)
|
||||
- `GET /api/v1/videos/{shortUuid}` for playback URLs: prefer
|
||||
`streamingPlaylists[].playlistUrl` (HLS) else `files[].fileUrl`.
|
||||
- Private/internal media: attach `Authorization: Bearer` to playlist, segment and file
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue