How to play your mp3 audacity recording on your website

This section is now closed.
Forum rules
Audacity 1.3.x is now obsolete. Please use the current Audacity 2.1.x version.

The final version of Audacity for Windows 98/ME is the legacy 2.0.0 version.
Locked
rainbowweaver
Posts: 2
Joined: Mon Mar 08, 2010 6:19 pm
Operating System: Please select

How to play your mp3 audacity recording on your website

Post by rainbowweaver » Mon Mar 08, 2010 6:25 pm

Hi there

Sorry new and cant find info anywhere so far.

I've created an mp3 file from audacity recording, how do I upload to my website with a player button, so that people can control the recording themself, rather than be stuck with it.

Thanks for your help

Kim

kozikowski
Forum Staff
Posts: 69384
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: How to play your mp3 audacity recording on your website

Post by kozikowski » Mon Mar 08, 2010 9:20 pm

Downloading a player is rough without going through YouTube or one of the other entertainment services.

Generally, you can post the work in a simple web page and the user controls playback with the player inside their own browser.

http://www.kozco.com/tech/soundtests.html

Use your browser to View > Source and see what the coding looks like. I write all this stuff by hand in NotePad or Text Edit.

You park all your work in one folder along with an HTML page with the interface in it. The browser automatically goes straight for the html file which allows the user to pick the music clip and play it.

If you're a lot further away from web generation than that, you will need to use a program that automatically generates web pages for you and use straight FTP, WinFTP, Fetch, or other tool to upload the whole thing to your web site. The program may already have tools to do that.

For example, Microsoft Publisher can easily generate web pages using your document layout as a guide. I think the current Publisher will not allow you to do graphic things that it knows it can't do in HTML. I got in trouble once when I told Publisher to post my test "web page" and it wiped out my whole web site by accident.

It does what I tell it, not what I want.

Let me know how techie you are.

Koz

rainbowweaver
Posts: 2
Joined: Mon Mar 08, 2010 6:19 pm
Operating System: Please select

Re: How to play your mp3 audacity recording on your website

Post by rainbowweaver » Mon Mar 08, 2010 9:27 pm

Hi Koz

fairly techie and can upload mp3 to web page no problem, but I want for people to be able to play it when they open a page.

Essentially Ive done an audio introduction that i want live streaming on my page, but with the facility for people to stop the recording if they want.

Perhaps I should make it into a movie using movie maker and youtube?

Love Kim

steve
Site Admin
Posts: 81653
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: How to play your mp3 audacity recording on your website

Post by steve » Mon Mar 08, 2010 11:55 pm

Unfortunately there is currently no universally supported way to do that. The "correct" way to do it is with the "Object" tag http://www.w3schools.com/TAGS/tag_object.asp

An example for embedding an MP3:

Code: Select all

<object type="audio/mpeg" data="data/test.mp3" width="200" height="20">
  <param name="src" value="data/test.mp3">
  <param name="autoplay" value="false">
  <param name="autoStart" value="0">
  alt : <a href="data/test.mp3">test.mp3</a>
</object>
Unfortunately, while this works in most modern browsers, the appearance is unpredictable as it is browser dependent. Also, Safari will automatically start playing the MP3 on load irrespective of the "autoplay" and "autoStart" values.

Other solutions include using JavaScript players, but these rely on JavaScript being enabled in the web browser (most people have it enabled) or using a Flash player (or similar technology), but these relay on the user having the appropriate plug-in installed (most people have Flash installed). An example of a free Flash MP3 player: http://flash-mp3-player.net/

The only method that is universally supported and works predictably is a plain old fashioned html link.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked