Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JFrames

 
Yasser Shaikh
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to play audio files on JFrames or JPanels.
How to play video files on JFrames or JPanels.
I am trying hard to figure it out.....but all my efforts are in vain..

So Experts please help.
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No expert in this, but if I were wanting to do this, I'd first spend a lot of time with Google. What has it told you so far? What avenues have you explored?

Good luck
 
Milan Agrawal
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,me Milan,a new member to this site.

I think that you need to have link with the dll files to make a audio player.

otherwise you can also search in google for the code.

thank you.
 
Campbell Ritchie
Sheriff
Posts: 48440
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to JavaRanch, Milan
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are a number of libraries for playing back audio and video - JMF, QuickTime for Java, jVLC, ... The http://faq.javaranch.com/java/OtherOpenSourceProjectsFaq page links to those.

Simple audio playback can be done using the javax.sound package. See http://www.exampledepot.com/egs/javax.sound.sampled/pkg.html for examples.

In the future, please give your posts better subject lines - "JFrames" is rather misleading if you ask about audio/video playback.
[ October 04, 2008: Message edited by: Ulf Dittmer ]
 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JMF also has some support for user interfaces.

javax.media.Player has methods getControlPanelComponent and getVisualComponent for controlling and showing media files. I've been able to play a small movie in Java this way.

I do think that these controls are heavyweight controls, so mixing it with Swing (lightweight controls) may lead to some unexpected results.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic