Is there a way for Website to read certain file from Android SDCard (i know that this file exist on SDCard) while working in browser?
I want my <strong>website</strong> to open "certain video file" <strong>from SDCard</strong> (hugeXXX.avi) :)
Is it even possible?Answer1:
The HTML5 <em>Filesystem</em> API allows web pages to open and manipulate files only within a sandboxed filesystem. The browser decides where and how this sandboxed filesystem exists, and your webpage cannot break out of the sandbox to access arbitrary files on the device's actual filesystem.
What you <em>can</em> do is provide a file input element (
<input type=file>) that allows the <em>user</em> to specify a file that your webpage can then upload/read. In that case, the user can select any file within the device's filesystem, including mounted SD cards. See the <a href="http://www.html5rocks.com/en/tutorials/file/dndfiles/" rel="nofollow">HTML5 Rocks tutorial</a> on reading files.
So, no, there is no way to do precisely what you want, for security reasons.
(Unless, of course, the webpage were hosted <em>on the device itself</em> and the file in question sat in your website directory. Then you could load it from the server via an Ajax call or similar (that is, load it from the device itself, which hosts the page).)