There are source codes of the remarkable project https://github.com/Nasso/urmusic There you can see music from soundcloud or the one that the client downloaded. I would like my default music to be used from the directory and accordingly it was visualized immediately after entering the site, but I could not do it.
- my music from the directory - from what? local? or server? for local - impossible - Grundy
- @Grundy, naturally from the server - user210886
|
1 answer
In this example, the person himself must download the music to the browser. After a brief study of the code, this is done through the following code.
<div style="display: none;"> <a id="downloader"></a> <input type="file" id="fileChooser" multiple /> <audio id="audioElement" loop></audio> </div> Accordingly, in your case it must be obtained from the server. To do this, you need to write (add to the existing) web server functionality to transfer music to the client.
99% working with Java on the server, the first thing that came to mind was Spring MCV. I quickly found a solution like this:
https://stackoverflow.com/questions/4786602/allowing-audio-files-in-spring-mvc-3-0
Accordingly, it turns out that by specifying a certain folder on the server, the server will read and transfer to the client.
|