if (filePath.startsWith("http")){
mediaPlayer.setPlaySubItems(true); // if it's a stream.
mediaPlayer.playMedia(filePath, ":sout=#udp{dst=127.0.0.1:"+ port +"}");
currentMedia = MEDIAPLAYING.HTTP;
}else{
MediaList playlist = factory.newMediaList();
playlist.addMedia(filePath, ":sout=#udp{dst=127.0.0.1:"+ port +"}");
mlp.setMediaList(playlist);
mlp.setMode(MediaListPlayerMode.LOOP);
mlp.play();
currentMedia = MEDIAPLAYING.FILE;
}