From 7a79ba8b70e8541b6d4413a46061b2c03ecddc9b Mon Sep 17 00:00:00 2001 From: undisclosed Date: Tue, 03 Jan 2023 10:47:17 +0000 Subject: [PATCH] Baustelle: Versuche mit unterschiedlichen Playern --- src/de/uhilger/calypso/handler/VLCPlayer.java | 26 ++++++++++++++++++-------- 1 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/de/uhilger/calypso/handler/VLCPlayer.java b/src/de/uhilger/calypso/handler/VLCPlayer.java index 849babb..1fac570 100644 --- a/src/de/uhilger/calypso/handler/VLCPlayer.java +++ b/src/de/uhilger/calypso/handler/VLCPlayer.java @@ -1,13 +1,10 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ package de.uhilger.calypso.handler; +import com.sun.net.httpserver.HttpExchange; import de.uhilger.calypso.App; import de.uhilger.calypso.MeldeThread; import java.io.IOException; +import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; @@ -19,6 +16,12 @@ private static final Logger logger = Logger.getLogger(VLCPlayer.class.getName()); + public static final String CMD_STOP = "s"; + public static final String DBUS_PREFIX = "dbus-send --type=method_call --dest=org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player."; + public static final String CMD_PAUSE_RESUME = "PlayPause"; + public static final String CMD_SEEK = "Seek"; + public static final String CMD_VOLUME = "Volume"; + @Override public String abspielen(String urlStr, String parameter, String meldeUrlStr, String token) { String antwort;// = null; @@ -28,7 +31,7 @@ if(o != null) { tilgen(); } - StringBuilder kommando = new StringBuilder("vlc --fullscreen "); + StringBuilder kommando = new StringBuilder("vlc --fullscreen -I rc "); /* if(parameter != null) { kommando.append(parameter); @@ -79,9 +82,10 @@ return antwort; } - @Override + + /* public String kommando(String k) { - if(k.equalsIgnoreCase(OMXPlayer.CMD_STOP)) { + if(k.equalsIgnoreCase(VLCPlayer.CMD_STOP)) { Process p = App.getPlayerProcess(); p.destroy(); App.setPlayerProcess(null); @@ -89,6 +93,12 @@ String antwort = "Kommando '" + k + "' ausgefuehrt."; return antwort; } +*/ + + @Override + public StringBuilder buildParams(HttpExchange t, Map m) { + return new StringBuilder(); + } } -- Gitblit v1.9.3