Embedded <audio/> in HTML page not working online.
FIXED- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Other forums
- :
- Tech Help - Software/Hardware etc
- :
- Embedded <audio/> in HTML page not working online...
07-06-2019 3:41 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hello there
I've just added a simple audio file into a webpage hosted on my Plusnet webspace and while everything works well on my local machine but when I FTP (using Filezilla) the sound no longer works (on any browser). The total added code is
<iframe src="silence.mp3" allow="autoplay" id="audio" style="display:none"></iframe>
<audio id="player" autoplay>
<source src="duke.mp3" type="audio/mp3">
</audio>
The first part just allows Chrome to autoplay the next part.
Any thoughts on why it doesn't work when online would be gratefully received!
Thanks
Michael
Fixed! Go to the fix.

Re: Embedded <audio/> in HTML page not working online.
07-06-2019 3:47 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hi @mpw Welcome to the Forums. It could be that the file can't be found so you might want to set the path of the mp3 file to
./duke.mp3
or provide it with a full path from the server root.
Re: Embedded <audio/> in HTML page not working online.
07-06-2019 3:58 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hello there,
Thanks for the prompt reply!
I've checked and on both my local machine and also on my webspace that the files are just within the same single folder so I didn't think that I'd need a path.
Thanks
Michael

07-06-2019 4:24 PM - edited 07-06-2019 4:27 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
OK @mpw, but humour me if you will and prepend the file name with
./
Also remember that the server will no doubt be Unix so case is an issue as well, so duke.mp3 is not the same as Duke.mp3
Re: Embedded <audio/> in HTML page not working online.
07-06-2019 5:18 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Sir - you are a genius!!
Thank you so much for taking the time to help - I had upper case 'Duke' locally which worked fine but it was looking for lower case when it was online.
Thanks again for your assistance!
Regards
Michael

Re: Embedded <audio/> in HTML page not working online.
08-06-2019 10:34 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
You are more than welcome @mpw, if you need any further assistance we're a friendly bunch here and only too willing to help.
Re: Embedded <audio/> in HTML page not working online.
11-06-2019 12:46 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@mpw wrote:
the files are just within the same single folder so I didn't think that I'd need a path.
You'd be surprised! File paths are a total menace at times and being a simple / boring thing not many pay much attention to them but the simple / and ./ can mean two big differences.
Re: Embedded <audio/> in HTML page not working online.
17-06-2019 12:34 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Just about all web servers run Linux, and Linux is case-sensitive. You could even have Duke.mp3 and duke.mp3 as different files. Only Windows is so carefree about filenames 🙂
Re: Embedded <audio/> in HTML page not working online.
17-06-2019 3:59 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Due to its DOS origins.
"In The Beginning Was The Word, And The Word Was Aardvark."
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Other forums
- :
- Tech Help - Software/Hardware etc
- :
- Embedded <audio/> in HTML page not working online...