|
-
May 1st, 2002, 05:25 PM
#1
Thread Starter
Frenzied Member
NewB Question - Playing an MP3 as soon as a page loads
Can someone give me some code to play a certain MP3 as soon as the page loads? And where would i put such code?
-Thanks
You just proved that sig advertisements work.
-
May 1st, 2002, 08:41 PM
#2
I suppose you want an applet ? Cause if it's just javasscript I think you in the wrong forums
-
May 2nd, 2002, 12:34 AM
#3
Dazed Member
Im not too sure if java is able to handle mp3 formats but here are the formats that i know it can definetly handle. WAV,MIDI, AU,AIFF
Audio clips are handled by an interface called AudioClip which all audio clips implement. You can use these methods on the audio clip which are found in the interface once the clip is retrieved.
void loop()
void play()
void stop()
Im assuming that you are using these in an applet so you would want to use the getAudioClip() methods for retrieving sound files specified by a given URL
AudioClip getAudioClip(URL url)
AudioClip getAudioClip(URL url, String filename)
There are also to overloaded play methods that can retrieve an play the audio clip.
void play(URL url)
void play(URL url,String filename)
-
May 6th, 2002, 05:19 AM
#4
Fanatic Member
i am pretty sure that you need a codec to play the mp3, and Java is the worst thing to do this, as it plays the mp3 so slowly.
Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
[ Galahtech.com] | [ My Site] | [ Fishsponge] | [ UnixForum.co.uk]
-
Jun 1st, 2002, 05:12 AM
#5
New Member
y dont u just convert the mp3 file to a wav file useing something like music match jukebox and play the file as a wav in da background in da body tag or ur page
-
Jun 2nd, 2002, 04:10 PM
#6
Originally posted by Strawberrys
y dont u just convert the mp3 file to a wav file useing something like music match jukebox and play the file as a wav in da background in da body tag or ur page
Because a mp3 is about 4 megs and a wav about 40megs
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|