Save file link using html5

I am trying to play media files from a local file system. The user now selects the file via "enter" and plays it. I want to save this link to a file, so when the user visits the next time, I should be able to tell him / her how many times he / she has played it before, etc.,

I have to either download the file link from the server or save it locally .. any ideas how to do this?

+5
source share
3 answers

Using IndexedDBor localStorageyou can save information about audio or video on the client side. Local storage is easier to use IMO:

var obj = {
        "timestamp": new Date(),
        "title": "Blah Blah",
        "Performer": "Lady Blahblah"
    };

localStorage["previous"] = JSON.stringify(obj);

, , . , Base-64 <video> <audio>, Google Chrome, .

+1

, ? , , , , . , , , - localstorage.

javascript md5, google, .

http://jsfiddle.net/influenztial/b3b2V/2/

+1

What you can do is save user.recent_files (only names) in the database and do some general calculations to show him how many times he has looked at it before.

What you cannot do is allow him to click on a link to a previously read file in order to read it again, well, with HTML5 I mean only.

Rgds.

0
source

All Articles