To Thread - Forum Home

The Mudcat Café TM
https://mudcat.org/thread.cfm?threadid=117835
15 messages

Tech: Music on websites

17 Jan 09 - 04:28 AM (#2541067)
Subject: Tech: Music on websites
From: Ian Hendrie

How should I improve music playing on a website? I have a dilemma at the moment and would welcome advice.

So far my web-site
'Songs of the Inland Waterways' plays snippets of music using buttons I designed myself marked 'Play' which link to the music files. These then open in whatever media player the viewer uses and the web-page with the words or music are no longer visible.

I starting going through the web-site using the target="_blank" command to make the music player open in a new window so that the words/music could be viewed whilst listening to the song. Then I discovered on the internet some web designers vehemently opposed to websites forcing the opening up of new windows so I am having a re-think.

A little player such as can be seen on various such as here or other music retaining sites would be nice. However, I would want it to fit in with the rest of my site - the graphics should be customisable or plain or small. It should also not delay page loading time significantly and not make my site dependent on accessing other sites (which may go down).

Am I in danger of making life very complicated for myself and should I leave it as it is? If so what about this opening new window business?

Suggestions and advice welcome.

Ian


17 Jan 09 - 10:10 AM (#2541280)
Subject: RE: Tech: Music on websites
From: Nick

I think the reason behind not wanting to open new windows is that it destroys the 'Back' arrow so that you might lose people from the site or navigation could become confused. But in the case of yours I can't see the problem.

Another option

You could host the mp3s elsewhere and then embed a player onto your page. On the plus side you'd chop down on your bandwidth as the files would be hosted off site; the page would load up with very little additional time; the viewer would be able to browse the words etc at the same time as it wouldn't launch anything else; it's free. On the possible neagtive side is that there would be some amount of promotional content on the player possibly; there might be some issues uploading the mp3s if it suspects they are copyright (as I would guess many are even though I'm sure they are used with permission); limited ability to change the look.

I very quickly fiddled a bit with one of your pages as an EXAMPLE if you download it you'll get the idea. Your graphics don't show obviously and the link is to another tune but will give the idea. It may well be too obtrusive.

I use esnips because it's free and offers 5gb of space but there are no doubt lots of other similar things.


17 Jan 09 - 10:13 AM (#2541281)
Subject: RE: Tech: Music on websites
From: Nick

And I don't think it's particularly an improvement to what you have already!


17 Jan 09 - 10:51 AM (#2541318)
Subject: RE: Tech: Music on websites
From: Jerry Rasmussen

I'm just constructing a website and am technology challenged. Any information I get on this thread will be helpful.

Jerry


17 Jan 09 - 12:00 PM (#2541400)
Subject: RE: Tech: Music on websites
From: sharyn

Ditto


17 Jan 09 - 12:54 PM (#2541446)
Subject: RE: Tech: Music on websites
From: Tootler

I simply upload my sound files to the website and link them by a normal hyperlink. They will then play on whatever player is set up on the site visitors browser.

Example here

I make no claims about the quality of the performances linked or of the standard of the recordings <grin>


17 Jan 09 - 03:47 PM (#2541601)
Subject: RE: Tech: Music on websites
From: Stewart

The simplest way is to use M3U playlist files
This allows the mp3 file to start playing
while the mp3 file is downloading
(before the complete file is downloaded)
so you don't have to wait for the whole download.
It's a simple one-line text file with the extension .m3u
and directs the player (winamp, wmp, etc)
to start playing the mp3 file.
You just link the m3u file by a normal hperlink command.
Examples are HERE
You can use a similar format .wvx for .wmv video files

Cheers, S. in Seattle


17 Jan 09 - 04:54 PM (#2541666)
Subject: RE: Tech: Music on websites
From: Ian Hendrie

Many thanks to Nick, Tootler and Stewart for taking the time to offer their help. I tend to agree with you Nick that the eSnips player is a little obtrusive, so I will look for alternatives.
I don't think I need a playlist, Stewart, as my site only plays one tune at a time but I will need some time to investigate m3u files further.
Ian


17 Jan 09 - 05:27 PM (#2541690)
Subject: RE: Tech: Music on websites
From: Stewart

You can use it to play just one song,
that's what I do.
Here is a sample file from the web page I cited above.
filename: LittleOldLogCabin.m3u

http://pnwfolklore.org/audiofiles/LittleOldLogCabin.mp3

I usually put a line return after that text line. I don't know why, but maybe it runs better.

And if you know the directory (URL) of the .mp3 file,
assume it is the same and has the same name as the .m3u file
you can usually download the .mp3 file from a web site
where only the .m3u file is given. A useful trick.

Cheers, S. in Seattle


17 Jan 09 - 09:47 PM (#2541839)
Subject: RE: Tech: Music on websites
From: Artful Codger

If you do a web search for "embed an MP3 player" (or some such variant, using quotes to elimate tons of inapplicable garbage), you should find many tech pages offering advice how to do this. In particular, I suggest that your search include some combination of these words or phrases: HTML, "MP3 player", embed (or embedding), Javascript, Flash.

[Javascript is a web scripting language which supports dynamic actions within a loaded web page. Flash is another web scripting language commonly used for drawing graphics or playing animations or sounds as part of a web page.]

When I did this, I found almost immediately a suggestion for how to start a player for MP3s using a one line HTML <embed> directive, but as this tag is deprecated, I don't present it here. However, with a bit more searching, I'm sure you'll find a supported replacement which is equally simple.

Note that if you want users to be able to easily download the sound files as well, you'll probably have to provide a direct link in addition to the scripting you use to embed a player in your page, since embedded players seldom provide the ability to save the clip being played.


18 Jan 09 - 04:10 AM (#2541965)
Subject: RE: Tech: Music on websites
From: Will Fly

I also use the filename+mp3 suffix as a hyperlink, like Tootler, but I'll also investigate the use of the m3u suffix. My examples are on this page: http://www.mjra.net/WillFly/audiofiles.shtml.

You can actually save the file by clicking on the hyperlink, stopping the playback and clicking one the down triangle (extreme right) of the player. This allows you to "Save as source file" - but the m3u option seems a tad more sophisticated.


18 Jan 09 - 04:11 AM (#2541966)
Subject: RE: Tech: Music on websites
From: Will Fly

Whoops - wrong link. Should be: audiofiles


18 Jan 09 - 05:05 AM (#2541981)
Subject: RE: Tech: Music on websites
From: Ian Hendrie

Thanks Will,
You seem to be using the system I was about to switch to (target="_blank") until I was scared off by these programmers who were arguing so strongly against it. I think I'll stick to that until something better comes along.
I am trying to keep the site simple and keep the HTML code acceptable so I get a little worried when commands are 'deprecated' are used to describe commands and try to avoid these. I seem to recollect avoiding the 'embed' command for this very reason.

As I write this I notice an advertisement for a Flash xmp3mini Player which is 'skinnable', i.e. you can change its appearance (just below this Reply to Thread text entry box). This does cost a small sum of money and I did download a copy last year. Unfortunately I gave up with it when I couldn't customise its appearance to fit in sufficiently with my web-site buttons. It was a neat little thing though and I might have to try playing around with it again.

Ian


18 Jan 09 - 08:16 AM (#2542084)
Subject: RE: Tech: Music on websites
From: Will Fly

Hi Ian - yes, I always use the (target="blank") command - and sod what the programmers say. I've never found it a problem, but (sigh) I'm sure someone will somewhere. Like life, really... :-)


18 Jan 09 - 09:18 AM (#2542131)
Subject: RE: Tech: Music on websites
From: Tootler

It's all very well programmers pontificating about Target+"_blank" and saying don't use it. Do bear in mind it only reflects their prejudices and you should do what seems right.

Some browser plugin players will start the audio playing and the take you back to the calling page, others open a new, blank page and you have to use your browser back button to return to the calling page. If you do this before the file has finished playing, the playback will stop. Apple Quicktime does this - at least on the PC - and the player on my Acer Netbook does it. I find it intensely annoying, so using Target="_blank" sends such players to a new page and you can continue browsing while the file plays.

I have Firefox configured to open a new tab when you use the click mouse button which enables you to avoid this problem. It is also very useful when someone supplies a link to U-tube or similar as you can start the music playing then return to what you were doing.