[vlc] JVLC Playlist and Swing integration issues
Javier Gálvez Guerrero
javier.galvez.guerrero at gmail.com
Wed Aug 27 00:53:13 CEST 2008
Hi,
I have written a simple Swing-based JVLC client with the latest 0.9.0-test3
jar library and I have experienced some problems with the Swing integration
and the playlist management.
First, the only way I can have a visible integrated JVLC canvas is adding it
directly to the JFrame container, having this a border layout and adding the
canvas with the center position, while adding button and other panels in
north and south positions. I can't use vertical/horizontal box or flow
layouts because when launching the application I get a "Content must be
displayable" error immediately (even using a flow layout and only adding the
canvas). Is there any solution to this issue? Why can't I treat the JVLC
canvas as any other Swing component?
On the other side, I have tried to use MediaList and MediaListPlayer classes
from the new 0.9.0 JVLC API instead the deprecated Playlist one, but I have
got no success. My simple application just adds video files to a list (add
button) and allows playing and other simple actions (play, stop, next,
mute... buttons). With the deprecated Playlist class I can add and play
different video files with no problem, but when I create a MediaList with
the new API and add some video files, using the play() and next() methods
from the MediaListPlayer class I get an error and the program stops running.
I attach the code of my application and the output messages when trying to
play the "next" item in the MediaList.
Note that, as randgen22 said, I must use the playItem(0) method instead of
play() to start playing the created playlist with MediaList. Is this the way
it should be or play() should work as well?
In addition, it seems that there is no implemented method in MediaListPlayer
to play the previous item in the playlist as it exists in the deprecated
Playlist class. Will it eventually be implemented?
And last but not least, how can I set the full screen mode to a playing
media from a MediaList? The Video class has setFullscreen(MediaPlayer,
boolean) and toggleFullscreen(MediaPlayer) methods to do that, but they need
a MediaPlayer instance, which is only created for a specific file and not
for a MediaList, which needs a MediaListPlayer instead a MediaPlayer, so...
what should I do to toggle the fullscreen option?
Hope somebody can help me with these issues. Your help is much appreciated.
Thank you,
Javi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc/attachments/20080827/1d58883a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GUITest.java
Type: text/x-java
Size: 5895 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc/attachments/20080827/1d58883a/attachment.java>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: jvlc_error.txt
URL: <http://mailman.videolan.org/pipermail/vlc/attachments/20080827/1d58883a/attachment.txt>
More information about the vlc
mailing list