| | |
| | | /* |
| | | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license |
| | | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template |
| | | */ |
| | | package de.uhilger.calypso.handler; |
| | | |
| | | import com.sun.net.httpserver.HttpExchange; |
| | |
| | | import java.util.logging.Logger; |
| | | |
| | | /** |
| | | * dbus-send --type=method_call --dest=org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Seek int64:-5000000 |
| | | * |
| | | * dbus-send --type=method_call --dest=org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 |
| | | * org.mpris.MediaPlayer2.Player.Seek int64:-5000000 |
| | | * |
| | | * @author Ulrich Hilger |
| | | */ |
| | | public class VLCSeekHandler extends CmdHandler { |
| | | |
| | | |
| | | private static final Logger logger = Logger.getLogger(VLCSeekHandler.class.getName()); |
| | | |
| | | |
| | | public VLCSeekHandler(String cmd) { |
| | | super(cmd); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | protected String process(HttpExchange t, String params) { |
| | | String antwort;// = null; |
| | | String antwort;// = null; |
| | | try { |
| | | StringBuilder kommando = new StringBuilder(); |
| | | kommando.append(VLCPlayer.DBUS_PREFIX); |
| | |
| | | } |
| | | return antwort; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | protected StringBuilder buildParams(HttpExchange t) { |
| | | Player player = App.getPlayer(); |
| | | StringBuilder params = super.buildParams(t); |
| | | |
| | | if(player instanceof VLCPlayer) { |
| | | |
| | | if (player instanceof VLCPlayer) { |
| | | String pos = player.getParam(map, "pos"); |
| | | if(!pos.isEmpty()) { |
| | | if (!pos.isEmpty()) { |
| | | params.append(" "); |
| | | params.append("int64:"); |
| | | params.append(pos); |
| | | params.append("000000"); // Mikrosekunden |
| | | } |
| | | } |
| | | |
| | | |
| | | logger.log(Level.FINER, "params: " + params.toString()); |
| | | return params; |
| | | } |
| | | } |
| | | } |