fix(mobile): videos with '#' don't play on android

This commit is contained in:
Yaros
2025-12-03 22:27:09 +01:00
parent 853a024f0f
commit 147cdfa1e2

View File

@@ -104,7 +104,10 @@ class NativeVideoViewer extends HookConsumerWidget {
throw Exception('No file found for the video'); throw Exception('No file found for the video');
} }
final source = await VideoSource.init(path: file.path, type: VideoSourceType.file); // Pass a file:// URI so Android's Uri.parse doesn't
// interpret characters like '#' as fragment identifiers.
final fileUri = Uri.file(file.path).toString();
final source = await VideoSource.init(path: fileUri, type: VideoSourceType.file);
return source; return source;
} }