Building MP3 player in Java
How to build a MP3 player in java using Applet or other interfaces. Is it necessary to include extra classes apart from those in JDK 1.2? Please help me in constructing a MP3 player in Java.
I forgot the URL :
http://www.javazoom.net/javalayer/javalayer.html
An alternative to MP3 could be OggVorbis format.
We've just made an Ogg Vorbis SPI (Service Provider Interface) for Java based on JOrbis library.
What is SPI ? It's the way JAVA (through JavaSound API plays sound, regardless to the format.
In others words we've made a "Vorbis Driver" that could be plugged to ANY Java music player.
http://www.javazoom.net/vorbisspi/vorbisspi.html
Similar Messages
-
I want to write and Mp3 player in Java. For now I just want it to work in the command line and I will add the GUI later. The basic functionality I want is play, pause/stop, fast forward and rewind, volume up/down. I have heard that Java.Sound used to have a built in mp3 player but that they took it out because of copyright issues. Too bad.
I have allready found some nice tutorials on how to play Wav files. I really need to find a good decoder that can convert in real time and use it in my program. Also fast forward and rewind is giving me problems even with a basic wave file.
Any help would be greatly appreciated. Especially if someone can provide some source code for a very basic Mp3 player.Thank you.Hi
I too am interested in writing a Mp3 player but am unsure what is the best programming language to write it in. Java is my prefered language, but it seems that it will not be posssible as their are no mp3 libraries that support mp3 file playing in the current version of java.
I could use javazoom support classes but I prefer to write the programme myself.
So when will Sun re-release java, so it can play mp3 files?
Or what other language would be apporiate for a mp3 player?
Thanks
Ron -
How do I build a simple MP3 player in Flash?
I have recently redesigned my website and need to make
several mp3 files available for playback. I'm a voiceover talent,
and I need to have my demos readily available to those who visit my
website to hear my work.
I built the site using Dreamweaver (there's a little bit of
Flash content there, but the site itself is not a Flash site). I
know just anough about using Flash to be dangerous. :-) At the
present time, I just embedded my 11 demos on a page, with each demo
appearing TWICE -- once with the Windows Media Player embedded and
once with the Quick Time player embedded -- to allow for maximum
compatibility. But with 22 media players embedded in the page,
well, you can pretty much guess what happens -- the page takes a
freakin' eternity to load. No one's going to wait that long.
In a previous version of my website, I had deployed a
third-party app called Wimpy Button to achieve this functionality
(www.wimpyplayer.com). Wimpy button is a very simple little Flash
app that is designed to achieve precisely the functionality I need.
But now when I launch the Wimpy Button Maker (the first step to
creating the player), I get an error message that I think is
telling me that either a .dll file required by the program is not
there on my computer OR that a program I have since installed on my
computer is either using or has overwritten that .dll file. Either
way, the Wimpy solution is not working for me. So naturally, since
Wimpy was doing all this in Flash, I figured the most logical place
to turn was to Flash itself. I'm hoping to create my own little
playback interface that I can place in multiple instances on the
webpage, with each one set to trigger playback of a different .mp3
file.
Here's an example of something similar to what I'd like to
end up with. Visit
http://randybrown.voice123.com.
There, you'll see a series of players down the right-hand side of
the page, and each one triggers playback of a different .mp3 file.
A closer look at the .swf file can be seen at
http://voice123.com/swf/small_player.swf
, so, as you can see, the graphic itself ain't that complicated. I
know I can build the graphics file (or something similar) without
too much difficulty.
But getting it to have the functionality I need to deploy for
this purpose is where I'm lost. I just don't have enough experience
with Flash to have much of a clue.
Can anyone walk me through the steps involved?
Your thoughtful answer would be MUCH appreciated.
RandyThe best MP3 player I ever found for flash uses xspf
playlists and xml - really cool and easy to use/implement. Check it
at
http://musicplayer.sourceforge.net/
This player will go through a playlist you determine, or can jump
from track to track. It takes a little bit of testing to set up,
but is much simpler than writing your own player - and it's free. -
Hi, im working for a simple mp3 player.
I have the music on the server, then on the "NEXT" button i
have:
stop member("songm")
member("songm").url = "
http://website.com/music/"&song_list[x
member("songm").play()
the member songm is a shockwave audio, i change the URL
according with the follow list:
song_list=["son1.mp3","song2.mp3", "song3.mp3"]
i must stop each time the member to get the other song
playing, it works very good, but for some reason make the internet
explorer crash, you can see a demo here:
http://www.idolofthebands.com/main/mp3.htm
it plays very good, but if you click on next or prev it
crash, some idea?
ty in advance.What do you see in the alert box, if you try it with this
line inserted before your stop function?
alert( member("songm") & " state: " &
member("songm").state )
- Ben -
[solved] Can't mount Samsung YP-U3 mp3 player
Hi all,
I have a Samsung YP-U3 mp3 player, which currently I can't use as it won't mount. I've spend a while trying to figure this out, so any help is appreciated!
EDIT: I don't wish to use Amarok etc. Also I've tried mtpfs, but it doesn't show any of the actual files. I'm trying go-mtpfs, but can't install it. I get the following response from yaourt:
==> Starting build()...
github.com/hanwen/go-mtpfs (download)
cd .
git clone https://github.com/hanwen/go-mtpfs /tmp/yaourt-tmp-archimedes/aur-go-mtpfs-git/src/src/github.com/hanwen/go-mtpfs
# cd .; git clone https://github.com/hanwen/go-mtpfs /tmp/yaourt-tmp-archimedes/aur-go-mtpfs-git/src/src/github.com/hanwen/go-mtpfs
package github.com/hanwen/go-mtpfs: exec: "git": executable file not found in $PATH
==> ERROR: A failure occurred in build().
Aborting...
==> ERROR: Makepkg was unable to build go-mtpfs-git.
for this PKGBUILD https://aur.archlinux.org/packages/go/g … t/PKGBUILD
Some info:
Media player says "Connected, Fully charged (or charging)" for ten seconds or so, and then lights go out.
It isn't in /run/media/user/.
It doesn't show up with fdisk, but does with lsusb:
Bus 001 Device 003: ID 04e8:507d Samsung Electronics Co., Ltd YP-U3 (mtp)
This is the result of mtp-detect:
$ mtp-detect
Error: Unable to open ~/.mtpz-data for reading.
libmtp version: 1.1.5
Listing raw device(s)
Device 0 (VID=04e8 and PID=507d) is a Samsung YP-U3.
Found 1 device(s):
Samsung: YP-U3 (04e8:507d) @ bus 1, dev 3
Attempting to connect device(s)
USB low-level info:
Interface has a kernel driver attached.
bcdUSB: 512
bDeviceClass: 0
bDeviceSubClass: 0
bDeviceProtocol: 0
idVendor: 04e8
idProduct: 507d
IN endpoint maxpacket: 512 bytes
OUT endpoint maxpacket: 512 bytes
Raw device info:
Bus location: 1
Device number: 3
Device entry info:
Vendor: Samsung
Vendor id: 0x04e8
Product: YP-U3
Vendor id: 0x507d
Device flags: 0x00000002
And mtp-connect
sudo mtp-connect
Error: Unable to open ~/.mtpz-data for reading.
libmtp version: 1.1.5
Device 0 (VID=04e8 and PID=507d) is a Samsung YP-U3.
Usage: connect <command1> <command2>
Commands: --delete [filename]
--sendfile [source] [destination]
--sendtrack [source] [destination]
--getfile [source] [destination]
--newfolder [foldername]
Finally, I tried this http://lobzang.free.fr/tip005.html but it didn't seem to work.
Cheers!
Last edited by ianhoolihan (2012-10-28 20:16:23)Solved.
Firstly, I didn't have git installed. When I did, I could install go-mtpfs, which does a little better than mtpfs by the looks of things. -
Need help embedding a mp3 player swf with xml playlist
Im a noob to Flash (started tuesday, haha) and so far everything is coming along just fine, but i need to put music in the swf. I have a button set up that slides a swf mp3 player in from the side but i dont know how to make the playlist work with it.
The player is from this site:
http://www.bezzmedia.com/swfspot/samples/flash8/Mp3_Player_with_XML_Playlist
Using the xml playlist with html is simple enough, but im not sure how to use it with Flash Catalyst. Is there an easy way to do this?
My original plan was to have a text list of the songs with a play button next to each one, then when you click on the play button it would set the state of any other songs to Stopped so you can just pick what song to play and if another song was playing it would stop. Im not sure how to do this either (like i said, i started learning this week), so i just tried embedding someone else's (ugly) mp3 player.
Anyway, if anyone knows a relatively easy way to have a playlist in my swf please let me know. Thanks!If I understand you correctly, you've imported a SWF into Catalyst using Import Artwork on the File menu. When your app runs, you want to pass that swf a parameter that tells it what URL to read a data file from. The SWF is not one that you've created, rather, you got it from some web site.
This is not something that you can do in Catalyst. However it should be possible to do in Flash Builder. I found an article discussing several ways to do it, at http://www.actionscript.org/forums/showthread.php3?t=175951. One idea is the following code snippet
<fx:Script>
<![CDATA[
import flash.events.*;
private function setVars(event):void
event.target.content.yyyyyy = "zzzzzz";
]]>
</fx:Script>
<mx:Image source="xxxxx" complete="setVars(event)" />
where "xxxxx" is the path of the SWF (you can put it somewhere in your Flash Builder project, or reference it via an URL), and yyyyy is the name of the parameter that the SWF expects, and zzzzzz is the path to the data file. The <Image> tag is what Catalyst created when you imported the SWF. (btw.the Image and SWFLoader tags are almost identical).
I hope this gives you enough info to make progress. -
I want to write a decent multi-media player in Java so I can run it on both Linux and Windows. As of yet however, I have not come across any support in Java for the mp3 format. It supports .au and .wav files, but I have yet to see mp3 support. Does anyone have any experience of working with mp3's in Java? I'd appreciate greatly any help.
Hi,
type "JMF" in the search field and search for it - its the Java Media Framework, a kind of add-on you can use for that.A Media player is provided too by JMF as example application. Have fun ...
greetings Marsian -
Got a SONY mp3 player for Christmas: How do I sync with iTunes?
OK, here's the deal. I have a MacBook Pro and use iTunes regularly, but now I have a SONY mp3 player from Santa. How do I get my songs from iTunes onto my SONY? Someone help. Thanks!
I have tried this with a SanDisk mp3 player, so I am not sure if it would work with a Sony - don't see why not..
Open your iTunes, build a playlist of songs you want to put in the Walkman.
Connect the Walkman and when the icon mounts on the desktop, open the Finder window to it - if it has a .mp3 folder inside, ('cos the sony devices have multiple folders in some instances), open that. Drag and drop the playlist of songs - (the list not the sidebar icon for it) into the .mp3 folder, and it should copy the files right in. iTunes itself will not likely 'see' the Walkman, but the Finder does, and will treat it like a new storage volume - which it is. You just build the iTunes playlists to tell the Finder what to copy.
Deb. -
Could anyone give me the code for an MP3 player for Flash
CS3?
The back-end actionscript code.
Or could anyone give me a brief tutorial on how to setup an
MP3 Player?I need this as well. are there any decent simple tutorials
for building a simple "play/pause/volume" mp3 players in cs3?
Thanks! -
MP3 player code help.. slight tweaks
http://www.clairmonthumphrey.com/Site/
The flash mp3 player I've done for this site is giving me a
few problems...
The code is attached but this is what happens though...
..In this line...
sa.push(nodes.attributes.url);
when it stays like that the song plays fine but the trackInfo
doesn't come up but when I replace it with this code.. the song
doesn't play but the trackInfo comes up..
sa.push(new Song(nodes.attributes.url,
nodes.attributes.track));
This is what the songs.xml file looks like...
<?xml version="1.0" encoding="UTF-8"?>
<songs>
<song url="AmazingGraceMedley.mp3" track="Amazing Grace
Medley" />
<song url="MidnightCry.mp3" track="Midnight Cry" />
<song url="YouareSoWonderfulRemix.mp3" track="You Are So
Wonderful" />
<song url="TrustIntheLordFirstVersion.mp3" track="Trust In
the Lord" />
</songs>
What am I doing wrong...
A few other quirks need straightening out...
The volume bar only increases the volume the first time..
after subsequent tries it neither increases nor decreases...
The playPause_mc button pauses but doesn't play again when
pressed...
Everything else is under control.. Can anyone help?
See below the action script....Hi
I too am interested in writing a Mp3 player but am unsure what is the best programming language to write it in. Java is my prefered language, but it seems that it will not be posssible as their are no mp3 libraries that support mp3 file playing in the current version of java.
I could use javazoom support classes but I prefer to write the programme myself.
So when will Sun re-release java, so it can play mp3 files?
Or what other language would be apporiate for a mp3 player?
Thanks
Ron -
Where do I begin with the making of an MP3 player?
I would like to create a mp3 player, and have researched and discovered i need JMF, which i have now downloaded and installed. But i do not know where to begin with the coding of the MP3 Player. Any help would be appreciated.
One problem, (I think) Sun had to drop MP3 support from Java because of some legal issues. You may need to head in the direction of JNI.
-
Place an mp3 player on top of an image in image-based website??
Hi everyone!
I am trying to create a website for our company, and have made an image-based website in Photoshop. The whole background is composed of sliced images from a Photoshop file, and I want to add links, drop down menus, a photo slider, and an mp3 player with Dreamweaver. I am having a great deal of trouble as I don't know nearly as much about coding as I would like to!
Right now I am trying to add an mp3 player to the bottom of our website, but I want it to be on top of the bar at the bottom of the page. Since the bar is technically an image, every time I paste the code for the mp3 player into the HTML, it goes above or below the bar rather than on top of it. Is there any way to remedy this?? Advice would be appreciated! ThanksIs there any way we can see your website? Fishing around in the dark is not a good way to give advice.
I should also mention that the "slicing Photoshop files" method of website building is probably not the way we build websites anymore, if I understand where you are coming from.
Generally speaking, if you have an image in the background set up in your style sheet, you should be able to put things on top of that image.
So, let's say we have a div and I'm going to call it "player." We may want to have more than one player on a page, so we'll give it a class:
CSS:
.player {
background-image: url("/path/myimage.jpg");
HTML:
<div class="player">
<audio controls>
<source src="/path/myaudio.ogg" type="audio/ogg">
<source src="/path/myaudio.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
</div>
Now, what I have done here is to create an HTML5 Audio player. The web page with the audio must be HTML5. And you will probably need to edit your .htaccess file to include the following:
AddType audio/ogg .oga
AddType video/ogg .ogv
AddType application/ogg .ogg
AddHandler application-ogg .ogg .ogv .oga
If you don't know how to edit an .htaccsss file, you should be able to add those MIME types in your host's Control Panel.
The way you declare an HTML5 document is to start the document with:
<!DOCTYPE HTML>
<html>
This would be before you start your <head> region.
But I must warn you, I'm offering all of this with a great deal of trepidation. I believe you're putting together a website using tables and inline code for things like backgrounds and such. Modern web design does not use tables to format web pages.
Without looking at what you're doing, there is a very big limit as to how I can advise you.
-Mark -
Hello,
I posted this under AIR but had no luck in finding an answer.
I am working with an artist who is releasing a new CD. Is it possible to create an MP3 Player in Flash and distribute it as an AIR app will all songs (say 7-10 tracks) contained in the app?
I believe I read so in Layers Magazine but wasn't sure of the best way to do so. My thinking was he could email the app as a promotional tool. But, I am new to AIR.
Thanks.Hey Kglad,
Yeah, that is where I am going with this.........my thinking was to create a desktop app for the artist. Users could install it once and we could change hout the tracks. I would have a photo of the artist with some animation, maybe add news, show updates that kind of thing to the app.
I just have no idea how to build that dynamically. Does the code call out to a URL? Would that work.
Also, is your gut that AIR is too much trouble? I thought the intstal/uninstall looked clean in the tests I have done.
There is a newspaper in London that does a great job of doing this. They actually use greenscreen video and a girl gives walks out on your screen and gives you the news updates. Once it's installed, you can click on the icon and get the news updates daily.
Thanks. -
MP3 Player Soundfile:UrlRequest problem
Hello,
I am building an MP3 player in action script 3, and I need to have the player request a random song file from a folder on my server. There are many song files in the folder, but the purpose is to allow users to rate the songs (at which point ill use ajax for rating). The following code is what I have so far, can anyone help me out?
import flash.events.MouseEvent;
btnplay.addEventListener.(MouseEvent.CLICK, playMusic);
function playMusic(evt:MouseEvent):void
var myMusic:Sound = new Sound();
var SoundFile:URLRequest = new URLRequest(----this is where the file would usually go---)
Thanks in advance!if you have 10 mp3 files in your mp3files folder and the names are like:
song1.mp3
song2.mp3
song9.mp3
the random part can be like that:
import flash.events.MouseEvent;
btnplay.addEventListener(MouseEvent.CLICK, playMusic);
function playMusic(evt:MouseEvent):void
var myMusic:Sound = new Sound();
var rnd:int = Math.random() * 10; //0-9
var SoundFile:URLRequest = new URLRequest("mp3files/song" + rnd.toString() + ".mp3"); -
Loading jmf player inside java 3d virtual space
I need help in loading a jmf video player inside java 3d virtual class room.. Please help. I have created a player.. I have done the class room using texture mapping.
I tried to do this using texture mapping itself.. but i failed.. So please help me... I need to do this for my project...I also get a fatal error after installing cf11.
# A fatal error has been detected by the Java Runtime Environment:
# EXCEPTION_IN_PAGE_ERROR (0xc0000006) at pc=0x00000095d4acc035, pid=1636, tid=2996
# JRE version: Java(TM) SE Runtime Environment (8.0_25-b18) (build 1.8.0_25-b18)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.25-b02 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# J 3290 C2 java.nio.MappedByteBuffer.load()Ljava/nio/MappedByteBuffer; (119 bytes) @ 0x00000095d4acc035 [0x00000095d4acbe20+0x215]
This error occurs on every installation attempt. It is the only coldfusion version on the computer. Win 8.1 64bit.
Maybe you are looking for
-
RoboHelp creates a physical folder for images. Why doesn't it prompt you for the name of the folder before creating it? Why can't you see the physical folder in the Project Manager view? How can you tell if and where an image is used in the project?
-
Good Morning This code compiles fine: IF v_status_code = '3' THEN INSERT INTO CRAM_STG (ID, ITEM_NO, CHGNBR, UI, SUPPLYACTIONCODE, QTY, ACCT, RECEIPTDATE, REQUISITIONDATE, PROCESSDATE) VALUES ( to_char(sysdate,'YYMMDDHH24MISS') || test_seq.nextval, n
-
When I insert an easy rotator on 4 of my 5 pages, it shows up like this : I need it to show normally. Anyone know what to do? Thank you.
-
Hi all, I need to create payslip for country grouping Malaysia (molga = 14). As there is no standard SAP payslip hrforms for Malaysia, I need to create a custom payslip from scratch. However, when I want to create the custom metadata using tcode 'hrf
-
Can Premiere Mac 6.5 be upgraed to Mac Intel?
It's time I need to move to Apple Intel Land Mt.Lion from my G5 - Tiger platform. I am still using Premiere 6.5 for Mac OS, but as soon as I move to Mac Mini 2012, I'm out of business since that Apple is Intel. Is there a way I can purchase an upgra