#1676 View video tags in external flash projector

This commit is contained in:
Jindra Petřík
2021-04-02 21:34:58 +02:00
parent 7fad7ef046
commit 1a52709bd5
20 changed files with 578 additions and 241 deletions

View File

@@ -467,6 +467,28 @@ public class Main {
}
}
public static void runAsync(File swfFile) {
String playerLocation = Configuration.playerLocation.get();
if (playerLocation.isEmpty() || (!new File(playerLocation).exists())) {
ViewMessages.showMessageDialog(getDefaultMessagesComponent(), AppStrings.translate("message.playerpath.notset"), AppStrings.translate("error"), JOptionPane.ERROR_MESSAGE);
advancedSettings("paths");
return;
}
try {
final Process process = Runtime.getRuntime().exec(new String[]{playerLocation, swfFile.getAbsolutePath()});
Runtime.getRuntime().addShutdownHook(new Thread() {
@Override
public void run() {
if (process.isAlive()) {
process.destroyForcibly();
}
}
});
} catch (IOException ex) {
logger.log(Level.SEVERE, null, ex);
}
}
public static void run(SWF swf) {
String flashVars = "";//key=val&key2=val2
String playerLocation = Configuration.playerLocation.get();