mirror of
https://github.com/sigmasternchen/Dionysus
synced 2025-03-15 08:08:55 +00:00
migrate to neon
This commit is contained in:
parent
6b33b9f51d
commit
5832f5cf2d
36 changed files with 402 additions and 108 deletions
24
src/main/java/net/persei/dionysus/Data.java
Normal file
24
src/main/java/net/persei/dionysus/Data.java
Normal file
|
@ -0,0 +1,24 @@
|
|||
package net.persei.dionysus;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class Data implements Serializable {
|
||||
private static final long serialVersionUID = 825230953015875521L;
|
||||
private Map<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
public Data(Data input) {
|
||||
super();
|
||||
this.map = new HashMap<String, Object>(input.map);
|
||||
}
|
||||
public Data() {
|
||||
super();
|
||||
}
|
||||
public Object getEntry(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
public Object setEntry(String key, Object obj) {
|
||||
return map.put(key, obj);
|
||||
}
|
||||
}
|
|
@ -1,23 +1,39 @@
|
|||
package net.persei.dionysus;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import net.persei.dionysus.exceptions.LibrariesNotFoundException;
|
||||
import net.persei.dionysus.exceptions.LoaderException;
|
||||
import net.persei.dionysus.files.FileManager;
|
||||
import uk.co.caprica.vlcj.binding.LibVlc;
|
||||
import uk.co.caprica.vlcj.discovery.NativeDiscovery;
|
||||
|
||||
public class Main {
|
||||
|
||||
public static final String TITLE = "Dionysus";
|
||||
private static PlayerGUI playerGUI;
|
||||
|
||||
/**
|
||||
* @throws ClassNotFoundException
|
||||
* @param args
|
||||
* @throws LibrariesNotFoundException
|
||||
* @throws IOException
|
||||
* @throws LoaderException
|
||||
* @throws
|
||||
*/
|
||||
public static void main(String[] args) throws LibrariesNotFoundException {
|
||||
public static void main(String[] args) throws LibrariesNotFoundException, IOException, LoaderException, ClassNotFoundException {
|
||||
if (!findLibs())
|
||||
throw new LibrariesNotFoundException();
|
||||
|
||||
System.out.println(LibVlc.INSTANCE.libvlc_get_version());
|
||||
|
||||
Setup setup = new Setup();
|
||||
setup.getData().setEntry("test", "bla");
|
||||
|
||||
FileManager manager = new FileManager();
|
||||
manager.saveSetup("test.dio", setup);
|
||||
setup = null;
|
||||
setup = manager.loadSetup("test.dio");
|
||||
|
||||
System.out.println(setup.getData().getEntry("test"));
|
||||
}
|
||||
|
||||
private static boolean findLibs() {
|
||||
|
|
|
@ -1,18 +1,25 @@
|
|||
package net.persei.dionysus;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import net.persei.dionysus.blocks.InitialBlock;
|
||||
import net.persei.dionysus.players.Player;
|
||||
|
||||
public class Setup {
|
||||
public class Setup implements Serializable {
|
||||
private static final long serialVersionUID = -5974881686360496618L;
|
||||
private List<InitialBlock> initBlocks = new LinkedList<InitialBlock>();
|
||||
private List<Player> players = new LinkedList<Player>();
|
||||
|
||||
private Data data = new Data();
|
||||
|
||||
// ugly, but necessary for flexible states
|
||||
private List<String> states = new LinkedList<String>(){{
|
||||
push("none");
|
||||
}};
|
||||
private List<String> states = new LinkedList<String>(){
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
push("none");
|
||||
}
|
||||
};
|
||||
private int state = 0;
|
||||
|
||||
public List<InitialBlock> getInitBlocks() {
|
||||
|
@ -34,4 +41,7 @@ public class Setup {
|
|||
public List<String> getStates() {
|
||||
return states;
|
||||
}
|
||||
public Data getData() {
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
package net.persei.dionysus.blocks;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import net.persei.dionysus.exceptions.UnexpectedDataTypeException;
|
||||
import net.persei.dionysus.Data;
|
||||
|
||||
public abstract class Block {
|
||||
public abstract class Block implements Serializable {
|
||||
private static final long serialVersionUID = 2452582891824176260L;
|
||||
protected String name;
|
||||
protected BlockType type;
|
||||
protected List<Lane> lanes = new LinkedList<Lane>();
|
||||
|
|
|
@ -2,6 +2,7 @@ package net.persei.dionysus.blocks;
|
|||
|
||||
import java.util.Map;
|
||||
|
||||
import net.persei.dionysus.Data;
|
||||
import net.persei.dionysus.Setup;
|
||||
import net.persei.dionysus.exceptions.DataValueNotAvailableException;
|
||||
import net.persei.dionysus.exceptions.MalformedBlockConditionException;
|
||||
|
|
|
@ -3,6 +3,7 @@ package net.persei.dionysus.blocks;
|
|||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import net.persei.dionysus.Data;
|
||||
import net.persei.dionysus.exceptions.UnexpectedDataTypeException;
|
||||
|
||||
public class BlockHelper {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
package net.persei.dionysus.blocks;
|
||||
|
||||
public abstract class ConditionalBlock extends Block {
|
||||
private static final long serialVersionUID = 8895574016577951453L;
|
||||
}
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
package net.persei.dionysus.blocks;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class Data {
|
||||
private Map<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
public Object getEntry(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
public Object setEntry(String key, Object obj) {
|
||||
return map.put(key, obj);
|
||||
}
|
||||
}
|
|
@ -1,6 +1,9 @@
|
|||
package net.persei.dionysus.blocks;
|
||||
|
||||
import net.persei.dionysus.Data;
|
||||
|
||||
public class DelayBlock extends Block {
|
||||
private static final long serialVersionUID = -3892822705334086078L;
|
||||
private long sleepTime = 1000;
|
||||
|
||||
public long getSleepTime() {
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package net.persei.dionysus.blocks;
|
||||
|
||||
import net.persei.dionysus.Data;
|
||||
|
||||
public class IfElseBlock extends ConditionalBlock {
|
||||
|
||||
private static final long serialVersionUID = 851005550879292074L;
|
||||
private BlockCondition condition;
|
||||
|
||||
public IfElseBlock(BlockCondition condition) {
|
||||
|
|
|
@ -3,11 +3,13 @@ package net.persei.dionysus.blocks;
|
|||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import net.persei.dionysus.Data;
|
||||
import net.persei.dionysus.MidiTrigger;
|
||||
import net.persei.dionysus.Setup;
|
||||
import net.persei.dionysus.exceptions.UnexpectedDataTypeException;
|
||||
|
||||
public abstract class InitialBlock extends Block {
|
||||
private static final long serialVersionUID = 7065582566195305774L;
|
||||
protected List<MidiTrigger> triggers = new LinkedList<MidiTrigger>();
|
||||
|
||||
public List<MidiTrigger> getTriggers() {
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
package net.persei.dionysus.blocks;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import net.persei.dionysus.exceptions.UnexpectedDataTypeException;
|
||||
import net.persei.dionysus.Data;
|
||||
|
||||
public class Lane {
|
||||
public class Lane implements Serializable {
|
||||
private static final long serialVersionUID = -317193861413134584L;
|
||||
private List<Block> attachedBlocks = new LinkedList<Block>();
|
||||
static private int count = 1;
|
||||
final private int id;
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
package net.persei.dionysus.blocks;
|
||||
|
||||
import net.persei.dionysus.Data;
|
||||
|
||||
public class MultiThreadBlock extends Block {
|
||||
private static final long serialVersionUID = -7687603755832903813L;
|
||||
|
||||
public MultiThreadBlock(int n) {
|
||||
super();
|
||||
for (int i = 0; i < n; i++) {
|
||||
this.lanes.add(new Lane("thread lane " + i));
|
||||
}
|
||||
this.name = "MultiThreadBlock";
|
||||
this.type = BlockType.MultiplexingBlock;
|
||||
}
|
||||
|
||||
private class LaneThread extends Thread {
|
||||
private Lane lane;
|
||||
private Data input;
|
||||
private Block parent;
|
||||
|
||||
public LaneThread (Data input, Lane lane, Block parent) {
|
||||
this.input = input;
|
||||
this.lane = lane;
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
public void run() {
|
||||
try {
|
||||
lane.invoke(input);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean magic(Data input, Lane lane) throws Exception {
|
||||
for (Lane l : lanes) {
|
||||
new LaneThread(input, l, this).start();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -3,8 +3,10 @@ package net.persei.dionysus.blocks;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.persei.dionysus.Data;
|
||||
|
||||
public class SetDataBlock extends Block {
|
||||
|
||||
private static final long serialVersionUID = 1007781353625719636L;
|
||||
private String data;
|
||||
private String key;
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
package net.persei.dionysus.blocks;
|
||||
|
||||
import net.persei.dionysus.Data;
|
||||
import net.persei.dionysus.Setup;
|
||||
|
||||
public class SetStateBlock extends Block {
|
||||
|
||||
private static final long serialVersionUID = -6111464916913814484L;
|
||||
private String state;
|
||||
|
||||
public SetStateBlock(String status) {
|
||||
|
|
|
@ -1,63 +0,0 @@
|
|||
package net.persei.dionysus.blocks;
|
||||
|
||||
import net.persei.dionysus.Setup;
|
||||
import net.persei.dionysus.exceptions.MalformedSetupFileException;
|
||||
import net.persei.dionysus.exceptions.WhatTheFuckException;
|
||||
|
||||
public class SetupParser {
|
||||
private enum Mode {
|
||||
none, players, triggers, blocks
|
||||
}
|
||||
static public Setup parse(String file) throws MalformedSetupFileException, WhatTheFuckException {
|
||||
String lines[] = file.split("\n");
|
||||
|
||||
Mode mode = Mode.none;
|
||||
|
||||
for (int i = 0; i < lines.length; i++) {
|
||||
String line = lines[i];
|
||||
if (line.length() == 0)
|
||||
continue;
|
||||
String tokens[] = line.split(" ");
|
||||
for (int j = 0; j < tokens.length; j++) {
|
||||
String token = tokens[j];
|
||||
if (token.length() == 0)
|
||||
continue;
|
||||
|
||||
// comment line
|
||||
if (token.substring(0, 1).equals("#"))
|
||||
break;
|
||||
|
||||
// mode selection
|
||||
if (token.equals("*players")) {
|
||||
mode = Mode.players;
|
||||
break;
|
||||
}
|
||||
if (token.equals("*triggers")) {
|
||||
mode = Mode.triggers;
|
||||
break;
|
||||
}
|
||||
if (token.equals("*blocks")) {
|
||||
mode = Mode.blocks;
|
||||
break;
|
||||
}
|
||||
|
||||
// TODO
|
||||
switch(mode) {
|
||||
case blocks:
|
||||
break;
|
||||
case players:
|
||||
break;
|
||||
case triggers:
|
||||
break;
|
||||
case none:
|
||||
throw new MalformedSetupFileException();
|
||||
default:
|
||||
throw new WhatTheFuckException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -1,6 +1,9 @@
|
|||
package net.persei.dionysus.blocks;
|
||||
|
||||
import net.persei.dionysus.Data;
|
||||
|
||||
public class SplitterBlock extends Block {
|
||||
private static final long serialVersionUID = -5591009739089256605L;
|
||||
|
||||
public SplitterBlock(int n) {
|
||||
super();
|
||||
|
@ -15,7 +18,7 @@ public class SplitterBlock extends Block {
|
|||
public boolean magic(Data input, Lane lane) throws Exception {
|
||||
boolean res = true;
|
||||
for (Lane l : lanes) {
|
||||
res = l.invoke(input) && res;
|
||||
res = l.invoke(new Data(input)) && res;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
package net.persei.dionysus.controlroom;
|
||||
|
||||
import java.awt.Event;
|
||||
|
||||
public interface Clickable {
|
||||
void click(Position relativePosition);
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package net.persei.dionysus.controlroom;
|
||||
|
||||
import java.awt.Graphics;
|
||||
|
||||
public interface ControlPanelBlock extends ControlPanelComponent, Clickable {
|
||||
default void draw(Graphics graphics) {
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package net.persei.dionysus.controlroom;
|
||||
|
||||
import java.awt.Dimension;
|
||||
|
||||
public interface ControlPanelComponent extends Drawable {
|
||||
public Dimension getDimension();
|
||||
public void setPosition(Position position);
|
||||
public Position getPosition();
|
||||
}
|
|
@ -44,10 +44,6 @@ public class ControlRoom extends JFrame {
|
|||
super.paintComponents(g);
|
||||
g.setColor(Color.BLACK);
|
||||
List<InitialBlock> initBlocks = setup.getInitBlocks();
|
||||
|
||||
for (int i = 0; i < initBlocks.size(); i++) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
package net.persei.dionysus.controlroom;
|
||||
|
||||
import java.awt.Graphics;
|
||||
|
||||
public interface Drawable {
|
||||
void draw(Graphics graphics);
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package net.persei.dionysus.controlroom;
|
||||
|
||||
import java.awt.Point;
|
||||
|
||||
public class Position extends Point {
|
||||
private static final long serialVersionUID = -3324245757186935151L;
|
||||
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
package net.persei.dionysus.exceptions;
|
||||
|
||||
public class LoaderException extends Exception {
|
||||
private static final long serialVersionUID = -1701002807913867876L;
|
||||
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
package net.persei.dionysus.exceptions;
|
||||
|
||||
public class MalformedSetupFileException extends Exception {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -2464874594169642335L;
|
||||
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package net.persei.dionysus.exceptions;
|
||||
|
||||
|
||||
public class NoVersionInformationException extends LoaderException {
|
||||
private static final long serialVersionUID = -4262574113425711478L;
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package net.persei.dionysus.exceptions;
|
||||
|
||||
|
||||
public class WrongVersionException extends LoaderException {
|
||||
public final int version;
|
||||
|
||||
public WrongVersionException(int version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = -7423226308772215937L;
|
||||
|
||||
}
|
38
src/main/java/net/persei/dionysus/files/FileManager.java
Normal file
38
src/main/java/net/persei/dionysus/files/FileManager.java
Normal file
|
@ -0,0 +1,38 @@
|
|||
package net.persei.dionysus.files;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
|
||||
import net.persei.dionysus.Setup;
|
||||
import net.persei.dionysus.exceptions.LoaderException;
|
||||
|
||||
public class FileManager {
|
||||
public Setup loadSetup(String file) throws IOException, ClassNotFoundException, LoaderException {
|
||||
FileInputStream fStream = new FileInputStream(file);
|
||||
ObjectInputStream oStream = new ObjectInputStream(fStream);
|
||||
Object obj = oStream.readObject();
|
||||
oStream.close();
|
||||
fStream.close();
|
||||
|
||||
if (!(obj instanceof SetupFileHelper))
|
||||
throw new NoSetupObjectException();
|
||||
|
||||
SetupFileHelper helper = (SetupFileHelper) obj;
|
||||
|
||||
return helper.getSetup();
|
||||
}
|
||||
|
||||
public void saveSetup(String file, Setup setup) throws IOException {
|
||||
SetupFileHelper holder = new SetupFileHelper();
|
||||
holder.setSetup(setup);
|
||||
|
||||
FileOutputStream fStream = new FileOutputStream(file);
|
||||
ObjectOutputStream oStream = new ObjectOutputStream(fStream);
|
||||
oStream.writeObject(holder);
|
||||
oStream.close();
|
||||
fStream.close();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package net.persei.dionysus.files;
|
||||
|
||||
import net.persei.dionysus.exceptions.LoaderException;
|
||||
|
||||
public class NoSetupObjectException extends LoaderException {
|
||||
private static final long serialVersionUID = -1038208370780426596L;
|
||||
|
||||
}
|
20
src/main/java/net/persei/dionysus/files/SetupFileHelper.java
Normal file
20
src/main/java/net/persei/dionysus/files/SetupFileHelper.java
Normal file
|
@ -0,0 +1,20 @@
|
|||
package net.persei.dionysus.files;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import net.persei.dionysus.Setup;
|
||||
|
||||
public class SetupFileHelper implements Serializable {
|
||||
private static final long serialVersionUID = 223487487950538107L;
|
||||
|
||||
private Setup setup;
|
||||
|
||||
public Setup getSetup() {
|
||||
return setup;
|
||||
}
|
||||
|
||||
public void setSetup(Setup setup) {
|
||||
this.setup = setup;
|
||||
}
|
||||
|
||||
}
|
45
src/main/java/net/persei/dionysus/players/AudioPlayer.java
Normal file
45
src/main/java/net/persei/dionysus/players/AudioPlayer.java
Normal file
|
@ -0,0 +1,45 @@
|
|||
package net.persei.dionysus.players;
|
||||
|
||||
import uk.co.caprica.vlcj.component.AudioMediaPlayerComponent;
|
||||
import uk.co.caprica.vlcj.player.MediaPlayer;
|
||||
|
||||
public class AudioPlayer implements Player {
|
||||
|
||||
private AudioMediaPlayerComponent player;
|
||||
private boolean loop = false;
|
||||
private String name;
|
||||
|
||||
public AudioPlayer(String name) {
|
||||
this.name = name;
|
||||
player = new AudioMediaPlayerComponent();
|
||||
}
|
||||
|
||||
public boolean isLoop() {
|
||||
return loop;
|
||||
}
|
||||
|
||||
public void playFile(String file) {
|
||||
getMediaPlayer().playMedia(file);
|
||||
}
|
||||
|
||||
public void play() {
|
||||
getMediaPlayer().play();
|
||||
}
|
||||
|
||||
public void pause() {
|
||||
getMediaPlayer().pause();
|
||||
}
|
||||
|
||||
public void setLoop(boolean loop) {
|
||||
this.loop = loop;
|
||||
getMediaPlayer().setRepeat(loop);
|
||||
}
|
||||
|
||||
public MediaPlayer getMediaPlayer() {
|
||||
return player.getMediaPlayer();
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
13
src/main/java/net/persei/dionysus/players/Player.java
Normal file
13
src/main/java/net/persei/dionysus/players/Player.java
Normal file
|
@ -0,0 +1,13 @@
|
|||
package net.persei.dionysus.players;
|
||||
|
||||
import uk.co.caprica.vlcj.player.MediaPlayer;
|
||||
|
||||
public interface Player {
|
||||
boolean isLoop();
|
||||
void playFile(String file);
|
||||
void play();
|
||||
void pause();
|
||||
void setLoop(boolean loop);
|
||||
MediaPlayer getMediaPlayer();
|
||||
String getName();
|
||||
}
|
81
src/main/java/net/persei/dionysus/players/VideoPlayer.java
Normal file
81
src/main/java/net/persei/dionysus/players/VideoPlayer.java
Normal file
|
@ -0,0 +1,81 @@
|
|||
package net.persei.dionysus.players;
|
||||
|
||||
import java.awt.HeadlessException;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
|
||||
import javax.swing.JFrame;
|
||||
|
||||
import net.persei.dionysus.Main;
|
||||
|
||||
import uk.co.caprica.vlcj.component.EmbeddedMediaPlayerComponent;
|
||||
import uk.co.caprica.vlcj.player.embedded.EmbeddedMediaPlayer;
|
||||
|
||||
public class VideoPlayer extends JFrame implements Player {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 6068058949441154348L;
|
||||
|
||||
private EmbeddedMediaPlayerComponent player = new EmbeddedMediaPlayerComponent();
|
||||
|
||||
private boolean loop = false;
|
||||
private boolean fullscreen = false;
|
||||
|
||||
public boolean isFullscreen() {
|
||||
return fullscreen;
|
||||
}
|
||||
|
||||
public VideoPlayer(boolean fullscreen) throws HeadlessException {
|
||||
this();
|
||||
dispose();
|
||||
if (fullscreen) {
|
||||
setExtendedState(JFrame.MAXIMIZED_BOTH);
|
||||
setUndecorated(true);
|
||||
}
|
||||
setVisible(true);
|
||||
}
|
||||
public VideoPlayer() throws HeadlessException {
|
||||
super(Main.TITLE);
|
||||
setBounds(100, 100, 600, 400);
|
||||
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
|
||||
setVisible(true);
|
||||
|
||||
setContentPane(player);
|
||||
|
||||
addWindowListener(new WindowAdapter() {
|
||||
@Override
|
||||
public void windowClosing(WindowEvent e) {
|
||||
player.release();
|
||||
System.out.println("release");
|
||||
System.exit(0);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public boolean isLoop() {
|
||||
return loop;
|
||||
}
|
||||
|
||||
public void setLoop(boolean loop) {
|
||||
this.loop = loop;
|
||||
getMediaPlayer().setRepeat(loop);
|
||||
}
|
||||
|
||||
public void playFile(String file) {
|
||||
getMediaPlayer().playMedia(file);
|
||||
}
|
||||
|
||||
public void play() {
|
||||
getMediaPlayer().play();
|
||||
}
|
||||
|
||||
public void pause() {
|
||||
getMediaPlayer().pause();
|
||||
}
|
||||
|
||||
public EmbeddedMediaPlayer getMediaPlayer() {
|
||||
return player.getMediaPlayer();
|
||||
}
|
||||
}
|
0
src/main/resources/keep
Normal file
0
src/main/resources/keep
Normal file
0
src/test/java/keep
Normal file
0
src/test/java/keep
Normal file
0
src/test/resources/keep
Normal file
0
src/test/resources/keep
Normal file
Loading…
Reference in a new issue