From 26e68140fd294bdc826be8d7dfccf396bbfa6f45 Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Thu, 12 Nov 2026 23:18:44 +0000 Subject: [PATCH] Send the sign-in with native video playback The native video player requests media itself, without the session cookie the app's file fetches send, so a video shown with show_file (or opened from Files) behind the web login was refused in the phone and Mac apps. Pass ServerSession.headersFor(uri) as the player's HTTP headers. --- .../artifacts/ui/artifact_video_player.dart | 11 ++++++- .../ui/artifact_video_player_test.dart | 30 +++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/app/lib/features/artifacts/ui/artifact_video_player.dart b/app/lib/features/artifacts/ui/artifact_video_player.dart index b679430d..6782013b 100644 --- a/app/lib/features/artifacts/ui/artifact_video_player.dart +++ b/app/lib/features/artifacts/ui/artifact_video_player.dart @@ -1,12 +1,21 @@ import 'package:flutter/material.dart'; import 'package:video_player/video_player.dart'; +import '../../../core/session/server_session.dart'; + /// Creates the player for one media url; tests inject a fake controller. typedef ArtifactVideoControllerFactory = VideoPlayerController Function(Uri uri); +/// The native players request the media themselves, outside the app's own +/// fetch, so they carry the same sign-in the app's file fetches send (the web +/// login's session cookie for a trusted server). A browser's `