Avatar of cindysei
 asked on

music to web page

I've put in code to the following web page - it works for me locally but not on the server I've uploaded it to. Is it because there is an "embed" tag? I got this code from the internet so don't really understand it. What can I do so it plays "live"? Here's the code for the page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

Thanks, Cindy
<table width="400" border="1">
    <td><img src="images/background-music.jpg" width="400" height="220" alt="music" /></td>
  <embed src="Amélie.mp3" width=150 height=45 autostart=true repeat=true loop=true>
Scripting LanguagesAdobe DreamweaverWeb Components

Avatar of undefined
Last Comment
Dave Baldwin

8/22/2022 - Mon
Dave Baldwin

An embed tag without a player will use the default media player on the user's computer.  It often has to download completely before it will play.  Most of us use a flash music player.  Also, you are not supposed to put anything between a </tr> and </table>.  That will cause an error in the W3C HTML validator.  If you have Flash, you can make a simple one.  If you don't, I've used the XSPF music player on some web sites.  http://musicplayer.sourceforge.net/   Their directions are a little obscure but it does work.

So why does it work for me locally but not when I test it live? If I'm using my computer in both instances - I should already have the player, right? What do you mean :"if I have Flash, I can make a simple one?" - I'm not an expert at all as you might have guessed so any further direction would help. I really didn't think playing music automatically on a page would be so difficult code wise!
Dave Baldwin

No browser will automatically play music by itself.  They always require an external program or a plugin to do that.  It's not particularly difficult but it takes a little more than what you are doing.  About Flash, I meant the Adobe Flash compiler program.  I have an old copy that I use strictly for generating music clips that will play on web sites.

Did you upload the MP3 to the server?
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck

Yes, I uploaded to the server. Sorry, I get the flash thing now - was having a blond moment. I have flash but it's been years since I've used it so a tad rusty. I was trying to get away with as little coding as possible. In Dreamweaver, can I put in a plug-in code? If so, where in my page should I do that? Thanks for your help! Cindy
Dave Baldwin

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question