JVLC issue, playlist and mediainstance
Posted: 25 Feb 2009 06:38
MediaPlayer mediaPlayer = playlist.getMediaInstance();
long oldTime = mediaPlayer.getTime(); // Assume it's 10 secs here.
System.out.println("oldTime: " + mediaPlayer.getTime());
mediaPlayer.setTime(oldTime - (5 * 1000)); // rewind by 5 secs.
// Let it run for a couple of seconds.
System.out.println("newTime: " + mediaPlayer.getTime());
// newTime is NOT 7 secs, but 10 secs instead.
newTime will be 10 secs until the media is played past the 10 secs point. Only then will getTime() return the correct time.
What's wrong? Can I help to debug this asap?
long oldTime = mediaPlayer.getTime(); // Assume it's 10 secs here.
System.out.println("oldTime: " + mediaPlayer.getTime());
mediaPlayer.setTime(oldTime - (5 * 1000)); // rewind by 5 secs.
// Let it run for a couple of seconds.
System.out.println("newTime: " + mediaPlayer.getTime());
// newTime is NOT 7 secs, but 10 secs instead.
newTime will be 10 secs until the media is played past the 10 secs point. Only then will getTime() return the correct time.
What's wrong? Can I help to debug this asap?