Fix web build: use dynamic cast for Blob arguments
This commit is contained in:
@@ -109,7 +109,7 @@ class _PublicFileViewerState extends State<PublicFileViewer> {
|
|||||||
final mimeType =
|
final mimeType =
|
||||||
_fileData?['capabilities']?['mimeType'] ?? 'video/mp4';
|
_fileData?['capabilities']?['mimeType'] ?? 'video/mp4';
|
||||||
final blob = web.Blob(
|
final blob = web.Blob(
|
||||||
[Uint8List.fromList(bytes)], // ignore: argument_type_not_assignable
|
[Uint8List.fromList(bytes)] as dynamic,
|
||||||
web.BlobPropertyBag(type: mimeType),
|
web.BlobPropertyBag(type: mimeType),
|
||||||
);
|
);
|
||||||
videoUrl = web.URL.createObjectURL(blob);
|
videoUrl = web.URL.createObjectURL(blob);
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ class AudioPlayer {
|
|||||||
final path = url.replaceFirst(apiClient.baseUrl, '');
|
final path = url.replaceFirst(apiClient.baseUrl, '');
|
||||||
final bytes = await apiClient.getBytes(path);
|
final bytes = await apiClient.getBytes(path);
|
||||||
final blob = web.Blob(
|
final blob = web.Blob(
|
||||||
[Uint8List.fromList(bytes)], // ignore: argument_type_not_assignable
|
[Uint8List.fromList(bytes)] as dynamic,
|
||||||
web.BlobPropertyBag(type: mimeType ?? 'audio/mpeg'),
|
web.BlobPropertyBag(type: mimeType ?? 'audio/mpeg'),
|
||||||
);
|
);
|
||||||
final blobUrl = web.URL.createObjectURL(blob);
|
final blobUrl = web.URL.createObjectURL(blob);
|
||||||
|
|||||||
Reference in New Issue
Block a user