Tutorial :How do you play music with javascript? [closed]



Question:

On the new Palm Pre everything is done via javascript etc. you can even use the camera and as I have heard play music. Is the second part also true for the desktop or is it a special webos/mojo feature?


Solution:1

You could use the HTML5 audio tag - not sure about browser support, but I bet that's how it's done on the pre.

http://www.w3schools.com/tags/html5_audio.asp has more info.


Solution:2

Historically there have been some ways to do it in the browser. A common way now is to use Flash There are ways for JavaScript to communicate with Flash). I'm not sure what Palm is doing for the Pre, but obviously they can set that up any way they like.


Solution:3

In a web browser, you can embed a music player using OBJECT tags. You can then control that music player using its DOM interface (which differs for each player; Windows Media Player; QuickTime player; Flash; etc). An alternative is to "start a new song" by using DHTML to re-write the music player element to reference a new piece of music.


Solution:4

jPlayer is a jQuery-based inline audio player: http://www.happyworm.com/jquery/jplayer/0.2.5/demos.htm


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »