Fix video view factory: format code for better readability
This commit is contained in:
@@ -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.';
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user