Can I access the local filesystem from a Chrome App? - google-chrome-app

I am trying to write a simple media player as a chrome packaged app, and to do that I need to access any folder from the filesystem directly from whithin the app.
Pseudocode
chrome.runtime.getFolderContents(
'c:/my_music',
function(contents){
// Do something
});
Is that possible? And if so, how? Searching didn't give me a clear "can not do" so... Can I?

The Media Galleries API offers "access media files (images, video, audio) from the user's local disks (with the user's consent)."
It is best suited for your application, as it asks the user for just enough permission to do what you want, and not more.

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.)

How can I have an .mp3 file on my site open in an app that plays MP3's?

I publish MP3s on my site. Since my audience prefers to listen to those MP3s on their iPhones, they tend to 1) download my files, 2) open up iTunes, 3) find the app folder, and 4) drag my MP3 to the audio app of their choice.
It's a tough process.
But they don't want to listen to my MP3s is their iPhone's browser and I can't get all my MP3s into a podcast.
So, I was wondering if there's a URL scheme that would let my readers, click a link on my site and have it automatically open the corresponding MP3 in a program like Apple's Podcast or Downcast or even send it to Dropbox.
This question sounds interesting, the answer is you must known the third app's scheme which contains url parameter, also the the third app must support playing mp3 file online and is already launched in the user's iPhone.
Yep!
There's the "music://" URL schema that opens iPod/Music app. I just don't know if it's valid to content from web, but you can try it out.
Check more information here:
http://wiki.akosma.com/IPhone_URL_Schemes#Music_.2F_iPod

Sencha Touch and Saving Local Media

Does anyone know if it is possible to save media from the internet on the local device using Sencha Touch? From what I've seen so far, I understand it's definitely possible to save XML or JSON data locally on the device, but I have had no luck finding ways to store media locally.
To be more specific, I am looking to program an app that provides the user with a series of audio seminars - like podcasts, really. The user would be able to stream those audio files directly from the internet, but I also need to provide the user with the ability to save an episode/seminar for later. This will be important for when a user is traveling and does not have a reliable internet connection or data plan.
The primary delivery device would be on iOS (iPhone, iPad, iPod Touch) and I would hope to be able to use the same technology on Android devices - but that would be a secondary phase.
If this is possible, how would I go about saving material? And what, if any, would be the limitations on doing so? Any thoughts on this would be greatly appreciated.
I have done something similar using Sencha Touch 1 and PhoneGap to produce a hybrid app.
Basically, I use Sencha Touch to download the JSON, etc and LocalStorage to hold the data. Downloading media/files/etc to the actual device is not supported in Sencha Touch as the framework doesn't have access to a file system.
I then use PhoneGap's API's to tap into the device's native file system and download files to the app's Documents directory and pass the file names/paths to Sencha Touch for use in the app.
I'm assuming you are looking to create a hybrid app based on your question but if this is strictly a web app then there isn't much you can do.
TO add to the above point, you possibly could base64 encode the file and store it within LocalStorage but this isn't a sustainable model as LocalStorage only gives you 5mb of space. If you go over 5mb, the user is prompted (yes, no) to allow LocalStorage to use more space (in 5mb increments). Since the files your reference have the potential to be 5mb each, you can see how this could quickly become unmanageable for both you and the user.
EDIT:
See http://phonegap.com/ for the native wrapper
http://blog.clearlyinnovative.com/post/2056122828/phonegap-plugin-for-downloading-url-all-the-code for the phonegap download plugin
and https://github.com/aaronksaunders/FileDownLoadApp for the code
Check this website out. Scroll down to storing data offline. They discuss Sencha Touch provides a set of data store and proxy classes that make it very easy to work with data from (and going to) a variety of sources - both server- and client-side... hope this helped, cheers.

Importing photos saved in ios device's Documents folder to desktop

I'm creating a catalog/collection ios4 application. One element of the app lets the user take a picture which they use for a new item entry. The image they choose is then saved to their app's local Document folder.
I was wondering if it's possible to give the user the ability to import the photos to their desktop when they plug in their ios device. Like how iPhoto lets you import photos from your camera roll when you plug in your device
I've looked around, and all i can seem to find are posts on saving to the documents folder, and then retrieving the data within the app.
Any help would be great.
Thanks Ian
You could use an intermediate web service to transfer the files. Upload them to your service from the device, download them to the desktop.
Apple locks this stuff down pretty tight, so that might be your best bet.

placing video files on http from my local computer

I am making one application in which I need to play some videos on my webpage or application.
And my videos are placed on my computer locally. Now what kind of URL i need to provide, or what type of streaming do I need to make it playable on other computers, from the webpage only.
Is there any controls, which plays videos locally on my computer and show it to the client side.??
Thanks in advance.
First of all is your web site hosted on your computer or are using a Hosting service?
Either way
You can use either flash Plug in or Windows Media Player Plugin
(silver light is also an option, the risk is the users may not have installed it since it is fairly new)
you must configure them with the URL of the videos, so that they will be served for viewing
Eg:
while doing that place your videos in a seperate folder in the site's root folders
like /videos/video1.mpg