Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm just starting to get into setting up a server. I've set up a basic Apache server to access some songs and movies. When I click one of the songs though, nothing happens. When I click one of the movies, sometimes it will open a new web page and act as though it is going to start playing, but never does. I know Apache is HTTP, not FTP and read somewhere that that could be a problem, but I'm uncertain of the differences. Anyway, is it possible to click on one of the songs and have it start streaming using, for example, Windows Media Player? If so, might someone either explain how to do so or direct me to where I can find it? Any information on retrieving media from an Apache server at this point would be most appreciated.

-Edit- I don't know if it matters, but I'm using Windows 7 and Google Chrome

share|improve this question

migrated from serverfault.com Dec 13 '12 at 21:50

This question came from our site for professional system and network administrators.

add comment

1 Answer 1

up vote 1 down vote accepted

To do what you want to do you need to ensure that you're using the correct protocols and setting the correct content types, but the majority of it depends on the settings on the client.

For example, if I have a stream to an MP3 I want to play, and I link it to http://example.com/mycooltune.mp3, it's up to the clients browser to decide what to do. They could be on Windows, OSX, Linux, iPhone, Android, whatever. You can't expect all of these devices to play the same.

However, if I have also got Flash Media Server installed, I might link to rtmp://example.com/mycooltune. In this case iOS will load it into Quicktime, and desktop browsers will open it in whatever is registered for handling that protocol.

The other thing to look at is your content-disposition content headers. If you have Content-Disposition:attachment; filename=mycooltune.mp3 then the browser should always offer it as a download. Other browsers are a bit smarter and will detect Content-Type: audio/mpeg and open it in a streamer.

It all entirely depends on the client really, but if you make sure you remove Content-Disposition headers, then you might have better luck.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.