I am able to successfully upload a .mp4 file, captured with the camera package, to firebase storage but only the audio exists when playing the video from firebase storage.
The actual video is blank.
Here is a code snippet used to upload the file:
Future<String> uploadFile({required String uid, required File file}) async {
final fileName = file.uri.pathSegments.last;
final filePath = "$uid/$fileName";
final uploadTask =
FirebaseStorage.instance.ref().child(filePath).putFile(file);
final snapshot = await uploadTask.whenComplete(() {});
final downloadURL = await snapshot.ref.getDownloadURL();
return downloadURL;
}
I can see where the file is temporarily stored on the iphone:
flutter: /var/mobile/Containers/Data/Application/F6913B6A-7282-41D0-AF6A-00DD5EDCEDC3/Documents/camera/videos/REC_43F873D2-A6AB-4BC3-ADDD-3B3EB71B56B7.mp4
And, I can also preview the video in the app that I am creating before uploading it.
But, once uploaded and I go to firebase storage to view it, I am only able to hear the sound, not see the actual video.
Thanks in advance