Dear users, Please note that, from Monday, August 16, 2019, RSA keys shorter than 2048bit will no longer be accepted for security reasons. Please update your keys as needed before this date. If you need assistance with regard to this process, please contact sia@list.lu

Thank you for your understanding.

Commit 125b8855 authored by Nico Mack's avatar Nico Mack

Audio playback is started in a new Thread

parent d012f19c
......@@ -97,6 +97,7 @@ public class AudioDelegate extends MediaDelegate implements Playable {
MediaLocator locator = new MediaLocator(mediaUrl);
this.player = Manager.createPlayer(locator);
this.player.realize();
this.player.prefetch();
} catch (NoPlayerException | IOException e) {
LOGGER.error("Failed to prepare media {} in {}!", this.media, this.baseUrl, e); //$NON-NLS-1$
}
......@@ -109,7 +110,14 @@ public class AudioDelegate extends MediaDelegate implements Playable {
@Override
public boolean handle(Interaction action) {
this.play();
Runnable play = () -> {
play();
};
Thread playThread = new Thread(play);
playThread.start();
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment