How to upload a video to Firebase Storage with Flutter Web ?
I have a video in mp4 format on my computer.
I am in Flutter 3.7.1, the storage package is in 11.0.11
Do you have an idea? A solution?
When I use the method :
snapshot = await reference.putFile(file);
I get the following error that is caught:
Unsupported operation: Platform._operatingSystem
My file have a path which looks like this:
blob:http://localhost:7800/id
When my file is just an image, for the web, I use :
snapshot = await reference.putData(await file.readAsBytes(), metadata);
When i try :
snapshot = await reference.putString(file.path);
Firebase does save a file, but it only represents a black image, the video is not actually stored on Firebase Storage
Related
i want to make a media player
i want to read all device directories (device storage and Sd card) and show which contains videos
like this
Using this package
https://pub.dev/packages/photo_manager
final List<AssetPathEntity> paths = await PhotoManager.getAssetPathList(type: RequestType.video);
This package will help u to retrieve albums but u have to build your own UI to display it.
I want to show to progress of the video uploaded to the azure cloud can someone give me a sample code for that
i am using file picker to get files from local.
i found video for firebase storage using dio package but i cannot use dio as everthing breaks
A sample code or pseudo code
Any one can explain my query
Why Firebase storage slow working ?
when we upload a video in firebase storage from the app , and we play video in flutter video player using downloading URL. it take 7 to 8 sec for play video.
but we directly put a another server hosted video URL in firebase storage ,then play in video player it take 2 to 3 sec.
Why & How can we achieve fast loading from firebase storage in application.
Thanks for reach the post & suggestion.
I wanted a flutter app, which downloads video from the network and stores it in local memory. Video stored in local memory should not be accessible by other media players. Those videos should only be shown by my apps video player. Is it possible to do it in flutter?
you can store video in application directory, other apps cannot access it
import 'package:path_provider/path_provider.dart' as path_provider;
final directory = await path_provider.getApplicationDocumentsDirectory();
I want to record a video or audio in my Flutter App and wants it to appear in gallery. How can I do it because path_provider is saving file to safe location and one need a rooted device to access it.
I was trying Flutter Camera Plugin Example
Also asked on https://github.com/flutter/flutter/issues/20807
The reason I was facing the problem is that the example I was trying uses path_provider function "getApplicationDocumentsDirectory()" to store the files.
By replacing above Function with "getExternalStorageDirectory()" I am able to store the file in the external directory and they appear in the Gallery.
You need to do scan media files using broadcast intent.
sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.fromFile(YOUR_PATH)));