Topic: Best way to put music on a web page?

Up to now I've been using an 'embed' tag to put in an m3u file which links to 1 or more mp3s. Like this on http://www.daihachiryodan.com/music/mori.html:

<embed type="audio/mpeg" src="mori.m3u" autostart="true" repeat="1" height="40" hspace="0" vspace="0" width="200">

But, as gutterslob noticed, it doesn't necessarily play right off. In this case, for Firefox, installing the vlc or mplayer plugin fixed it, but I wonder if anyone has any better ideas for making a playlist as playable for as many people as possible with the least possible effort on their part?

John
------------------------
( a boring Japan blog , and idle twitterings )
“Good morning sir, which way up would you like your reality today?”  "As it comes, Jeeves, as it comes..."

Re: Best way to put music on a web page?

a small mp3 player would be nice

here's one made by me, i think i still have the .fla if you're interested

http://bge.fileave.com/music.html

Re: Best way to put music on a web page?

way back in my windows-days, I made a flash-musicplayer that reads from an xml-file: http://potdikkie.nl/music
never did finish the 'upload your own'-part tongue
I have the source somewhere, I believe, but it's made in swishmax, which runs buggy at best in wine.

but here's an html5 solution which I've used a few times: http://www.jezra.net/projects/pageplayer
(made made the guy who made heybuddy)

laptop: asus zenbook UX31 [debian wheezy, kernel 3.3.0-rc7-custom]
tablet: acer iconia a500 [honeycomb]
home: C2D E8500, 4GB RAM, 74GB Raptor HDD + 2.5TB in various HDD [debian squeeze, liquorix kernel]

Re: Best way to put music on a web page?

this one here is nice:
http://cashmusic.org/tools/flower/

Pancakes
1 cup all-purpose flour, 2 eggs, 1 cup of  milk, 3 tbs water, 1-2 tsp of vanilla extract, 1/2 cup of sugar, 1/2 apple, few grains of salt
Preheat your pan or griddle to about medium heat. Slowly combine the wet ingredients to the dry ingredients, work in sliced apple. Each pancake should take about a minute or so on each side. Serve with plum jam, maple syrup, or powdered sugar

Re: Best way to put music on a web page?

beadmaze wrote:

this one here is nice:
http://cashmusic.org/tools/flower/

hey, that one looks really nice!
bookmarked!

laptop: asus zenbook UX31 [debian wheezy, kernel 3.3.0-rc7-custom]
tablet: acer iconia a500 [honeycomb]
home: C2D E8500, 4GB RAM, 74GB Raptor HDD + 2.5TB in various HDD [debian squeeze, liquorix kernel]

Re: Best way to put music on a web page?

beadmaze wrote:

this one here is nice:
http://cashmusic.org/tools/flower/

Yes that looks promising! And doesn't seem to use Flash, which I was hoping to avoid. Thank you, and thanks to everyone else too. smile

Still, I was originally thinking of just a little bit of simple code to put in the page so people on Linux/Mac/Windows using Firefox/IE whatever would all be able to play the mp3 file easily. Especially, standards-compliant code, if anyone knows what the current standard is?

Last edited by johnraff (2011-03-10 13:36:05)

John
------------------------
( a boring Japan blog , and idle twitterings )
“Good morning sir, which way up would you like your reality today?”  "As it comes, Jeeves, as it comes..."

Re: Best way to put music on a web page?

johnraff wrote:
beadmaze wrote:

this one here is nice:
http://cashmusic.org/tools/flower/

Yes that looks promising! And doesn't seem to use Flash, which I was hoping to avoid. Thank you, and thanks to everyone else too. smile

Still, I was originally thinking of just a little bit of simple code to put in the page so people on Linux/Mac/Windows using Firefox/IE whatever would all be able to play the mp3 file easily. Especially, standards-compliant code, if anyone knows what the current standard is?

the last one on that flower-player page looks like it's pretty much what you want:
"Soundplayers are created by adding the 'flower_soundplayer' class to a div containing links to audio files. Multiple players are handled intelligently, and by adding 'flower_soundplayer' to a link outside a soundplayer div you can even play links inline."
include the js-file, put some mp3-links in a div with class flower_soundplayer and it should work.

And standards still aren't *really* clear in webdesign..... hmm

laptop: asus zenbook UX31 [debian wheezy, kernel 3.3.0-rc7-custom]
tablet: acer iconia a500 [honeycomb]
home: C2D E8500, 4GB RAM, 74GB Raptor HDD + 2.5TB in various HDD [debian squeeze, liquorix kernel]

Re: Best way to put music on a web page?

Yes that flower-player looked good. The only thing I need to check is what happens if the browser has javascript disabled, so that at least the mp3 links are visible. Accessibility!

John
------------------------
( a boring Japan blog , and idle twitterings )
“Good morning sir, which way up would you like your reality today?”  "As it comes, Jeeves, as it comes..."

Re: Best way to put music on a web page?

johnraff wrote:

Yes that flower-player looked good. The only thing I need to check is what happens if the browser has javascript disabled, so that at least the mp3 links are visible. Accessibility!

just tested it with no-script. With javascript disabled, the player becomes a set of links to the mp3's smile

I'd say: accessible!

laptop: asus zenbook UX31 [debian wheezy, kernel 3.3.0-rc7-custom]
tablet: acer iconia a500 [honeycomb]
home: C2D E8500, 4GB RAM, 74GB Raptor HDD + 2.5TB in various HDD [debian squeeze, liquorix kernel]

Re: Best way to put music on a web page?

Deleted.  Sorry,  Don't know how my answer ended up here.  I never clicked on this thread.

Last edited by kernel (2011-03-11 04:55:57)