summaryrefslogtreecommitdiff
path: root/player-android/android
AgeCommit message (Collapse)Author
2026-05-22Pass session cookie to ExoPlayer/just_audio for authenticated streamingPaul Buetow
The audio/video players spawn a localhost proxy (just_audio) or call ExoPlayer directly (video_player) using their own HTTP stack, which does not share Dio's cookie jar. Without the session cookie those requests hit the stream endpoint anonymously and fail with 401. Expose the Dio CookieJar via a Riverpod provider (cookieJarProvider) and attach a Cookie header (alongside the existing Authorization: Bearer) to both AudioSource.uri and VideoPlayerController.networkUrl. Also enable android:usesCleartextTraffic="true" on the Application — just_audio's headers-injection proxy listens on 127.0.0.1 and Android 28+ blocks cleartext to it without the explicit opt-in. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22Add migration for missing playback_progress.finished column (5f)Paul Buetow
Existing databases created before the finished column was added to the base schema still satisfied CREATE TABLE IF NOT EXISTS and never got the column, causing GET /api/v1/media/{id} to fail with "SQL logic error: no such column: finished" and break media detail view. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22Implement public ShareViewerScreen with Android deep-link intent-filter (9b)Paul Buetow
- New ShareViewerScreen (/share/:token): unauthenticated share-viewer that fetches share metadata via publicApiClientProvider, renders filename, type, duration, thumbnail, and a Play button routing to the video/audio player. - New publicApiClientProvider: bare Dio client (no auth interceptors) for the public share endpoint; shares kPlayerBaseUrl with the authenticated client. - AndroidManifest: http + https deep-link intent-filters for /share/.* so Android routes share URLs directly into the app (App Links / autoVerify). - router.dart: /share/:token bypasses the authentication redirect; guard uses AppRoutes.shareViewerPrefix constant instead of a raw '/share/' string (DIP). - app_routes.dart: shareViewer route constant, shareViewerPrefix, shareViewerPath helper. - error_mappers.dart: shareViewerErrorMessage — 404 invalid/revoked, 410 expired. - player_api_client.dart: baseUrl getter encapsulates rawDio.options.baseUrl so screens never access transport internals directly (ISP, DIP). - Review fixes: OCP icon map in _FallbackThumbnail, LSP explicit baseUrl overrides in test fakes, DIP shareViewerPrefix constant. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21Add video/audio player packages, routes, and placeholder screens (task xa)Paul Buetow
- pubspec.yaml: add video_player ^2.9.2, chewie ^1.8.5, just_audio ^0.9.42, audio_service ^0.18.15 with descriptive comments explaining each package's role. - AndroidManifest.xml: add FOREGROUND_SERVICE, FOREGROUND_SERVICE_MEDIA_PLAYBACK, and WAKE_LOCK permissions; declare AudioService with foregroundServiceType= mediaPlayback and MediaButtonReceiver for hardware media button support. INTERNET was already present — not duplicated. - app_routes.dart: add videoPlayer (/video/:mediaId) and audioPlayer (/audio/:mediaId) route constants plus videoPlayerPath/audioPlayerPath helpers. - router.dart: wire GoRoutes for the two new paths, forwarding mediaId from path params and optional mediaUrl from route extra. - screens/video_player_screen.dart: placeholder VideoPlayerScreen accepting mediaId + mediaUrl, importing chewie and video_player for resolution check. - screens/audio_player_screen.dart: placeholder AudioPlayerScreen accepting mediaId + mediaUrl, importing just_audio and audio_service for resolution check. flutter pub get and flutter analyze both pass clean. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17Complete player-android Flutter scaffoldPaul Buetow