You can do this with a little JavaScript programming. Nothing else will work if you are running these off-line (not from a server). If you do want to run them from a server, then you can also use PHP or another server-side language. The basics of this are to provide a data structure like an array, filled with the filenames of the videos, and then programmatically choose one of them.
<script type="text/javascript">
var movies = ['movie-1.mp4', 'movie-3.mp4', 'movie-8.mp4'];
var key = Math.round(Math.random() * (movies.length - 1));
var movie = movies[key];
</script>
Then you would put a placeholder movie on the screen, and use this script to override its content with the chosen movie:
<video id="placeholder" src="movie-2.mp4" controls></video>
<!-- (below that video in the source order, so use Before /Body in the Page / HTML Markup picker) -->
<script type="text/javascript">
document.querySelector('#placeholder').src = movie;
</script>
Questions: what do you do with the other videos? Do you show them as well, or just the randomly-chosen one of the moment? What does the folder structure have to do with this? If you are viewing this off-line, where do the videos live? (I am assuming you won’t be trying to access the internal file structure of an iPad, since that is off-limits to user-land applications like MobileSafari.) Do you have a sketch of this on line somewhere that we can look at it and think about it more?
Walter
On Jan 27, 2016, at 10:41 AM, Robert B email@hidden wrote:
Hey, gang!
Haven’t been on here for a very long time. Kind of been out of the web design business. But I have a question…
Is there a way to have videos (mp4s) randomized when a certain folder is accessed? And, have selections chosen from specific folders?
For instance…a person pics a folder. Videos are randomly displayed from that folder. Or, they want videos randomly selected from two of the three folders only. Maybe choose a radio button or something.
This will not reside on the web. It would be accessed from an iPad or computer.
I know this sounds a little confusing. I can try to clarify if need be.
As I said, I’ve been out of the loop for a while, so any help would be appreciated.
Thanks!
Bob
freewaytalk mailing list
email@hidden
Update your subscriptions at:
Information for existing FreewayTalk / Groups.io users - Site Feedback - Softpress Talk
freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options