General Question

Zaku's avatar

What ways can a web developer stream audio to a web user (without Windows Media Player or Flash)?

Asked by Zaku (11744 points ) July 12th, 2010

I’ve developed web browser applications that play sound and video before but I’ve always used the Windows Media Player ActiveX control or Flash, and either non-streamed content, or the Windows Multimedia server. Now I’m researching an audio project which would like to work on Linux, Macs and iPhones, which I believe excludes using WMP or Flash.
Do IE/Firefox/Opera support playing audio streams via JavaScript calls these days? Or is a plugin/control needed?
Is QuickTime the way to go? Are there other solutions that come to mind?
Thanks!

Observing members: 0 Composing members: 0

10 Answers

jrpowell's avatar

You might want to look into the HTML5 <audio> element

I have a feeling this might help you out a lot.

Zaku's avatar

Thanks John! Very useful starting places!

ETpro's avatar

@Zaku I’m running the new FF 4.0 Beta 1, and it supports HTML5 as do all Webkit based browsers. But keep an eye on major browser support before going that route.

Zaku's avatar

Thanks ETpro. I notice that the HTML 5 <audio> tag does exist in Firefox 3.6.6, though the spec is limited by having no code access to the volume.

wgallios's avatar

There are always media players written in Java. Although like flash they would need to have Java installed on their machine.

But why is it you are searching for an alternative method? trying to reduce bandwidth?

Zaku's avatar

@wgalios I’m looking for a method other than WMP or Flash because the client wants to target iPhones and Macs without requiring a download/install, and iPhones currently refuse to work with Flash.

The second link johnpowell provided is to jPlayer, which is a jQuery (javascript library) add on (more js) which will either use Flash or Quicktime (or I think HTML 5 if neither are present) and the total size is like 31K with no installation required, so that looks like the way I’ll go.

wgallios's avatar

@Zaku ah i see. Well ya I would assume in that case perhaps quicktime may be the way to go. Although I’m not 100% sure what the iPhone supports.

Zaku's avatar

@wgallios Apparently Quicktime (and jPlayer’s wrapper of it) work on the iPhone. But if I implemented straight to Quicktime only, then other (e.g. Windows and Linux) users would need to have or go get Quicktime. jPlayer seems to include a few tasks I’d need to handle, while exposing enough features that I want (i.e. volume control).

wgallios's avatar

@Zaku Well if that is your target audience, then perhaps it may be the way to go. You can however, with a bit of programming, determine the users browser (Firefox, IE, iPhone etc) and maybe load a different video depending on their browser.

So if I visit your site on my iPhone, the Quicktime movie comes up, but for desktop viewers it plays a flash version.

I know languages like PHP can do that easily, but I think javascript as well can do that.. maybe, you’de have to look into browser detection with it.

Zaku's avatar

@wgallios Good point. That sort of logic is something that jPlayer already contains code for, apparently, so by using jPlayer, I expect I won’t have to write (nor test) that code. I just include jPlayer and write to it, and its wrapper code includes checking for what players are available and using one that is available.

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther