Fix video view factory: format code for better readability

This commit is contained in:
Leon Bösche
2026-01-25 02:29:58 +01:00
parent aec4fd0272
commit 927d35c984

View File

@@ -111,7 +111,9 @@ class _PublicFileViewerState extends State<PublicFileViewer> {
}
void _registerVideoViewFactory(String videoUrl) {
ui_web.platformViewRegistry.registerViewFactory(_videoViewType!, (int viewId) {
ui_web.platformViewRegistry.registerViewFactory(_videoViewType!, (
int viewId,
) {
final videoElement = web.HTMLVideoElement()
..src = videoUrl
..controls = true
@@ -124,7 +126,8 @@ class _PublicFileViewerState extends State<PublicFileViewer> {
videoElement.onError.listen((event) {
if (mounted) {
setState(() {
_error = 'Video format not supported or could not be loaded. Please download the file.';
_error =
'Video format not supported or could not be loaded. Please download the file.';
});
}
});