How to get to play an audio file in browser itself rather than downloading from a onedrive shared folder link? - flutter

I'm working on a flutter application which uses the shared data from onedrive to play in the app but I'm having trouble getting the m4a file.
For instance, This is a onedrive link: https://1drv.ms/u/s!Aicuq23aphFzb_KQvr0anumY9Jk?e=NQZfXl. Now, I converted it to an api as given in here and I got this URL.
When I browse children.#content.downloadUrl I see a link which is a download link but I want a link with m4a file that will play in the browser itself. How am I suppose to achieve that ?

You will need an audio playing service in your app which can take an URL and play it for you handling all the internals like downloading, buffering etc.
Checkout this package: audio_service

Related

[Flutter]How to download video to app, and make it accessible only through the app (Similarly to Youtube/Netflix)

i'm fairly new to Flutter and is currently working on a course app that requires downloading the videos to the app.
The downloaded video will only be accessible through the app just like Youtube and Netflix, and will be hidden/encrypted from gallery. Would greatly appreciate if someone if someone could point me in the right direction in building this feature.
On iOS and Android your app has it's own isolated folder for storing documents. Items stored there are not intended to be accessible to the user outside of your app. This folder isn't scanned by the Gallery or accessible to other apps on the device. (However, with a little effort a user can access the files so this is not a complete solution where security is an concern. You would need to add encryption if you didn't, say, want a motivated user to copy the video file to a PC and be able to play it.)
the path_provider plugin gives your Flutter app common file locations on a device. The private app folder location is retrieved with getApplicationDocumentsDirectory()
"Download video" is a vague requirement. Most video on the internet (Netflix, Youtube) is provided via HLS or DASH for streaming, which you do download but the video is split up into many files- sometimes thousands of files for a single video. The dart:http package is likely what you're going to want to use to get/download the files (unless the video files aren't available via HTTP/HTTPS, then you'll need a different transport-specific library, like FTP, RTSP, etc.)

Flutter - Upload Video to Youtube

In my app I need the ability to take and upload or save a short 5 to 15 second video. I also need to be able to save the video if the user is offline, and upload it when connected to internet.
I can create the video file with the plugin image_picker, I tried to save it to the users gallery using plugin image_picker_saver but that seems to only handle images.
So I will probably have to use something like path_provider to save it to local storage (again examples of writing files are images as byte data)
When connected is there a way to upload a video to a Youtube account ?
I have read up on some Youtube plugins, but they are geared towards playing videos.
I was thinking of using WebViews to pop up the m.youtube.com/upload page but once you start an upload it goes to the desktop www.youtube.com
Other option to consider is using Firestore as the upload destination when they have a connection, but I would still have to manage offline local storage.
Thank you any help
Edit RE: comments below
Here is what I get when trying to capture a Landscape video on iPhone X with camera plugin:

Downloading audio file from google drive and playing

I have uploaded audio from my app into google drive.Now I want to download the audio file and also play the audio while it is getting downloaded into application.
Thanks
Query File.list() with restriction on filetype
Find webContentLink from Files resource. You'll get HTTP link for file
There are many libraries to stream audio/video with HTTP in iOS
If you are new to Drive API, check iOS quickstart

Netstream() progressive download of internal file

Hello All I have been working on a project for a while:
I have a non standard MP4 video file I want to play off a server in a IPhone App (I am using Flash builder to create it).
Due to a combination of server problems (not correctly identifying MIME type and cant be changed) and IPhone limitations (e.g. not being able to force the iplayer to play files with wrong extension), I have had to setup a process that reads the file in, saves it locally and then point the video player at the local file.
Although this sort of works, i am having an issue with some of the files that are large (94mb for a 17 min video) and a slow server - which takes 120 seconds to transfer the whole file.
I thought that if you started playing the video, then the transfer rate would be faster than the playback rate so the video would play ok.
However sometimes the video just crashes, which i am guessing is a result of the video reading beyond what has been written.
If the video played the internal file using progressive download I think it would probably not crash but resume once more date had been read but understand that progressive download is triggered by a url extension beginning with HTTP://
Can you make an internal file play using progressive download ? I know this would not normally be expected as logically the system would expect a local file to already be download ?
Any help appreciated
Thanks
Toby
try this to know download file is complete or not
HCDownload
it is very easy to use only write its delegate method.
Edit
also see StitchedStreamPlayer

Downloading Video on iPhone using SDK

I would like to develop such iphone application that provides functionality to download viedo. i am doing some as below
1) Loading HTML content on web view
2) The loaded html content contains the video link (i.e http://test.com/test.mp4")
3) When i click on that it will play the video in native player.
4) but i would like to prevent this thing and start downloading video from that URL
for example, if i click on link it should not open native video player, it should start downloading from that url and store somewhere on iphone (i.e document directory)
is there any solution for same?
Thanks
Vivek
You should use UIWebViewDelegates webView:shouldStartLoadWithRequest:navigationType: method to decide whether or not to load a URL.
You can check the request, and perform some logic, for instance, checking if the URL's suffix is 'mp4' and if so, do something other than load the request in the webview.
You can intercept the mp4 urls, and then hand them off to another method in your controller that will kick off an NSURLRequest to download the video data.
Once you have the video data, you can write it to the documents directory.