Hy, I'am using the jPlayer ( from this Site https://jplayer.org/ ) to play audio files based on playlists. Now i would like to play random audio files from a folder. There are a lot of instructions about that on stackoverflow but the most of them are based on loading the whole folder content into a playlist and play it randomly. I'am not sure if it's a good approach in my case because i have a huge folder with audio files. So is it possible to play audio files randomly without adding them to a playlist ?
jPlayer - Play random audio files based on files in folder
279 Views Asked by Bennek At
1
There are 1 best solutions below
Related Questions in JAVASCRIPT
- Using Puppeteer to scrape a public API only when the data changes
- inline SVG text (js)
- An array of images and a for loop display the buttons. How to assign each button to open its own block by name?
- Storing the preferred font-size in localStorage
- Simple movie API request not showing up in the console log
- Authenticate Flask rest API
- Deploying sveltekit app with gunjs on vercel throws cannot find module './lib/text-encoding'
- How to request administrator rights?
- mp4 embedded videos within github pages website not loading
- Scrimba tutorial was working, suddenly stopped even trying the default
- In Datatables, start value resets to 0, when column sorting
- How do I link two models in mongoose?
- parameter values only being sent to certain columns in google sheet?
- Run main several times of wasm in browser
- Variable inside a Variable, not updating
Related Questions in PHP
- How to add the dynamic new rows from my registration form in my database?
- Issue in payment form gateway
- How to create a facet for WP gridbuilder that displays both parent and child custom fields?
- Function in anonymous Laravel Blade component
- How to change woocomerce or full wordpress currency with value from USD to AUD
- General questions about creating a custom theme Moodle CMS
- How to add logging to an abstract class in php
- error 500 on IIS FastCGI but no clue despite multiple error loggings activated
- Composer installation fails and reverts ./composer.json and ./composer.lock to original content
- How to isolate PHP apps from each other on a local machine(Windows or Linux)?
- Laravel: Using belongsToMany relationship with MongoDB
- window.location.href redirects but is causing problems on the webpage
- Key provided is shorter than 256 bits, only 64 bits provided
- Laravel's whereBetween method not working with two timestamps
- Implementing UUID as primary key in Laravel intermediate table
Related Questions in JPLAYER
- stop and progress bar overlapped in jplayer
- how to add header in jPlayer function in angularJS
- Error "The play() request was interrupted by a call to pause()." in jPlayer
- Remove File Extensions from Song Titles in jPlayer Playlist
- jPlayer with Icecast stream: how to play stream from live position (not last position) after pause?
- Advanced Custom Fields Repeater with jPlayer Audio Playlist
- Play each track at specific time position from a playlist
- jPlayer - Play random audio files based on files in folder
- Running Jplayer from an SSL website, but the audio files are non-SSL. Audio files will not play
- Image in jPlayer playlist
- Latest Safari Browser issue with jPlayer
- JPlayer set a custom duration
- How can I change the CSS of this embed player?
- Disable auto start in JPlayer
- how can send data-* attr to a js function?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I'd personally recommend finding all the files you want to play and storing the file path to each individual file in an array, and playing them in whatever sequence you desire. This is an argument of disk-storage over memory-storage, and memory storage is quicker. I doubt you'll run out of space by just reading and saving the file-paths.
However, if your folder really is that large - or maybe you just want the performance, I'd recommend splitting up those files into sub-directories. You can then set up your code to load each sub-directory individually. However, you may lose some of the 'randomness' as they are not in the same folder.
In addition to the storing all the filepaths, you may also want to start loading the next audio file before the one you're currently playing ends so that you don't have any stops or 'lag'.