You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi i want to compress a List of videos . So i tried to do this using a for in loop . But when compressing starts the app crashes . With one video only it works but with multiple videos it crashes . I use this with firebase storage . Here is my code :
for (File mediaFile in mediaFiles) {
final StorageReference _storageRef = FirebaseStorage.instance.ref();
String _mediaId = Uuid().v4();
final File _media = mediaFile.path.endsWith('.mp4')
? await compressVideo(mediaFile)
: await compressImage(_mediaId, mediaFile);
// Uploads user profile image
final StorageUploadTask _uploadTask = _storageRef
.child(
!mediaFile.path.endsWith('.mp4')
? '$path/$_mediaId.jpg'
: '$path/$_mediaId.mp4',
)
.putFile(_media);
final StorageTaskSnapshot _storageSnap = await _uploadTask.onComplete;
final String _downloadUrl = await _storageSnap.ref.getDownloadURL();
_mediaUrls.add(_downloadUrl);
}
return _mediaUrls;
}
Hi i want to compress a List of videos . So i tried to do this using a
for in
loop . But when compressing starts the app crashes . With one video only it works but with multiple videos it crashes . I use this with firebase storage . Here is my code :And here is my video compression method :
The text was updated successfully, but these errors were encountered: