@Override
protected void onAfter(Integer result) {
mediaPlayer.stop();
}
};
parsedCondition.await();
// This is functionally equivalent to the simpler synchronous version:
/*
mediaPlayer.startMedia(mrl); // "start" waits until the media is playing before returning
mediaPlayer.parseMedia(); // synchronous invocation