Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

joshii1

Active Coder
Hello there! in my websites zoom.selync.ga and samia.selync.ga i have added a Winamp mp3/mp4 player and whenever i try to upload a file it wont allow me to do so unless that file is in a folder then it would allow me to upload it. how do i fix the code to where i can just upload a mp4 or a mp3 file into the media player?
 
Hi @joshii1!

Nice looks sites! Very old school I like them! Now with your issue, could you share the code with us? It would help us with finding a solution for you.
 
the javascript file for it is... big to say the least but here is a link to the main .js file and the <script> that is in the HTML file: Main .js file

Code:
<script>
        const Webamp = window.Webamp;
        new Webamp({
            initialTracks: [{
                metaData: {
                    artist: "Kevin MacLeod",
                    title: "Study and Relax"
                },
                url: "assets/Study-and-Relax.mp3",
                duration: 223
            }],
        }).renderWhenReady(document.getElementById('app'));
       
        clippy.load('Clippy', function(agent) {
            // Do anything with the loaded agent
            agent.show();
           
            agent.speak('Welcome to Drazard`s website!');
        });
    </script>
 
the javascript file for it is... big to say the least but here is a link to the main .js file and the <script> that is in the HTML file: Main .js file

Code:
<script>
        const Webamp = window.Webamp;
        new Webamp({
            initialTracks: [{
                metaData: {
                    artist: "Kevin MacLeod",
                    title: "Study and Relax"
                },
                url: "assets/Study-and-Relax.mp3",
                duration: 223
            }],
        }).renderWhenReady(document.getElementById('app'));
      
        clippy.load('Clippy', function(agent) {
            // Do anything with the loaded agent
            agent.show();
          
            agent.speak('Welcome to Drazard`s website!');
        });
    </script>
With line 9: when trying to add a MP3 file how are you writing it under url?
 
what do you mean?
[CODE lang="javascript" highlight="9"]<script>
const Webamp = window.Webamp;
new Webamp({
initialTracks: [{
metaData: {
artist: "Kevin MacLeod",
title: "Study and Relax"
},
url: "assets/Study-and-Relax.mp3",
duration: 223
}],[/CODE]

I have highlighted the line, you have the url for the path to the file as "assets/Study-and-Relax.mp3" if you were to change that to "/Study-and-Relax.mp3" it might work.
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom