Fix audio player bar height: center it instead of expanding

This commit is contained in:
Leon Bösche
2026-01-25 01:19:37 +01:00
parent b819fee208
commit f346b628ed

View File

@@ -55,7 +55,13 @@ class _PublicFileViewerState extends State<PublicFileViewer> {
// Initialize video controller if it's a video file // Initialize video controller if it's a video file
if (_isVideoFile()) { if (_isVideoFile()) {
_initializeVideoPlayer(); try {
await _initializeVideoPlayer();
} catch (e) {
setState(() {
_error = 'Video format not supported in browser. Please download the file.';
});
}
} }
} catch (e) { } catch (e) {
setState(() { setState(() {
@@ -181,9 +187,11 @@ class _PublicFileViewerState extends State<PublicFileViewer> {
), ),
); );
} else if (_isAudioFile()) { } else if (_isAudioFile()) {
return AudioPlayerBar( return Center(
fileName: _fileData!['fileName'] ?? 'Audio', child: AudioPlayerBar(
fileUrl: viewUrl, fileName: _fileData!['fileName'] ?? 'Audio',
fileUrl: viewUrl,
),
); );
} else if (_isDocumentFile()) { } else if (_isDocumentFile()) {
return Expanded( return Expanded(