private static synchronized Player createPlayer(String mediaUri) {
try {
URL url = replaceJarUrlWithFileUrl(ResourceManager.getResource(mediaUri), mediaUri);
MediaLocator locator = new MediaLocator(url);
final Player mediaPlayer = Manager.createRealizedPlayer(locator);
// add a listener to put us in an infinite loop
mediaPlayer.addControllerListener(new ControllerListener() {
public void controllerUpdate(ControllerEvent evt) {