Allow multiple player processes at once
This commit is contained in:
parent
f485d3255d
commit
c64359d455
|
@ -5,6 +5,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class Settings {
|
public class Settings {
|
||||||
|
public boolean singlePlayer = true;
|
||||||
public boolean localRecording = true;
|
public boolean localRecording = true;
|
||||||
public int httpPort = 8080;
|
public int httpPort = 8080;
|
||||||
public int httpTimeout = 10;
|
public int httpTimeout = 10;
|
||||||
|
@ -21,5 +22,6 @@ public class Settings {
|
||||||
public boolean determineResolution = false;
|
public boolean determineResolution = false;
|
||||||
public boolean requireAuthentication = false;
|
public boolean requireAuthentication = false;
|
||||||
public boolean chooseStreamQuality = false;
|
public boolean chooseStreamQuality = false;
|
||||||
|
public boolean recordFollowed = false;
|
||||||
public byte[] key = null;
|
public byte[] key = null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,8 +17,9 @@ public class Player {
|
||||||
private static PlayerThread playerThread;
|
private static PlayerThread playerThread;
|
||||||
|
|
||||||
public static void play(String url) {
|
public static void play(String url) {
|
||||||
|
boolean singlePlayer = Config.getInstance().getSettings().singlePlayer;
|
||||||
try {
|
try {
|
||||||
if (playerThread != null && playerThread.isRunning()) {
|
if (singlePlayer && playerThread != null && playerThread.isRunning()) {
|
||||||
playerThread.stopThread();
|
playerThread.stopThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,8 +30,9 @@ public class Player {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void play(Recording rec) {
|
public static void play(Recording rec) {
|
||||||
|
boolean singlePlayer = Config.getInstance().getSettings().singlePlayer;
|
||||||
try {
|
try {
|
||||||
if (playerThread != null && playerThread.isRunning()) {
|
if (singlePlayer && playerThread != null && playerThread.isRunning()) {
|
||||||
playerThread.stopThread();
|
playerThread.stopThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue