Open dlo-x-olb opened 5 years ago
@githue: BTW, I realize that it's been a long time since you made this project and you're surely busy with life and other projects. However—if this turns out to be something you're not interested in implementing—could you give a total JQuery newbie like me some idea as to what it would take to implement it myself?
So far:
files
variable (instead of getting them from the upload form). document.querySelector('#input-files').files
, though (or if that's even a good approach).My first version of Drawing Timer (which was never made public) actually used local file/folder paths to find and load the images, it even had a start page for selecting a playlist. However it only worked in specific browsers due to security restrictions, it also only worked if the app was 'installed' on your file system.
When I found out about the FileReader API, which is a well supported web standard, I decided to switch from reading file paths to loading images directly into the browser. The FileReader API doesn't have access to file paths, only files or 'blobs'.
If you have a web server (even a local one) you could do just about anything as far as creating and loading collections, but it's a lot of work and needs to be managed long term.
You could make your own version as you described that uses local file paths. Or, my solution was to create different folders for different kinds of photos which are stored in a central location, the file selection dialog remembers the last folder I opened so I don't have to go digging around, some operating systems also let you do a 'select all' (I wonder if there's phone apps to enable this).
To read from file paths you'd have to populate the playlist array with file paths instead of blobs, then based on the content of the playlist, switch between using the reader
object and file paths. To make the browser remember your collections you'd need to use cookies or local storage, or hard-code the locations of the JSON files if you're not using a web server.
This is either a feature request, or a request for some pointers on how to implement it:
I'd love the ability to load a session with a prepared collection of files (like a json list of file locations, or a URL argument).
My goals are to:
The ability to save slideshows from the UI would be nice, too—but right now, just being able to load them would be fantastic!