From 392dc977ae7d13188f07db1d6d865a964bb96858 Mon Sep 17 00:00:00 2001
From: ulrich
Date: Wed, 11 May 2022 08:29:19 +0000
Subject: [PATCH] Lautstaerkeregelung hinzugefuegt

---
 src/de/uhilger/tango/api/MediaSteuerung.java |    8 ++++++++
 www/font/pikto.ttf                           |    0 
 www/js/app.js                                |    9 ++++++++-
 www/app.css                                  |   30 +++++++++++++++++-------------
 www/data/tpl/ctrl.txt                        |    2 ++
 5 files changed, 35 insertions(+), 14 deletions(-)

diff --git a/src/de/uhilger/tango/api/MediaSteuerung.java b/src/de/uhilger/tango/api/MediaSteuerung.java
index 2e5e9dc..7d3fda7 100644
--- a/src/de/uhilger/tango/api/MediaSteuerung.java
+++ b/src/de/uhilger/tango/api/MediaSteuerung.java
@@ -71,9 +71,13 @@
   public static final String PL_API_STRG = "api/strg/"; 
   public static final String PL_CMD_ENDE = "ende";
   public static final String PL_CMD_STOP = "stop";
+  public static final String PL_CMD_VOLDN = "voldn";
+  public static final String PL_CMD_VOLUP = "volup";
   public static final String PL_CMD_PAUSE = "pause";
   public static final String PL_CMD_PLAYON = "weiter";
   public static final String PL_CMD_CALYPSO_STOP = "stop";
+  public static final String PL_CMD_CALYPSO_VOL_INC = "vol-inc";
+  public static final String PL_CMD_CALYPSO_VOL_DEC = "vol-dec";
   public static final String PL_CMD_CALYPSO_PAUSE = "pause";
   public static final String PL_CMD_CALYPSO_PLAYON = "playon";
   public static final String DEFAULT_HOST = "http://localhost:9090";
@@ -106,6 +110,10 @@
         } else if(elems[5].equalsIgnoreCase(PL_CMD_STOP)) {
           spielt.remove(elems[4]);
           response = kommandoSenden(fs, elems[4], PL_CMD_CALYPSO_STOP);
+        } else if(elems[5].equalsIgnoreCase(PL_CMD_VOLDN)) {
+          response = kommandoSenden(fs, elems[4], PL_CMD_CALYPSO_VOL_DEC);
+        } else if(elems[5].equalsIgnoreCase(PL_CMD_VOLUP)) {
+          response = kommandoSenden(fs, elems[4], PL_CMD_CALYPSO_VOL_INC);
         } else if(elems[5].equalsIgnoreCase(PL_CMD_PAUSE)) {
           response = kommandoSenden(fs, elems[4], PL_CMD_CALYPSO_PAUSE);
         //} else if(elems[5].equalsIgnoreCase(PL_CMD_PLAYON)) {
diff --git a/www/app.css b/www/app.css
index 4d2a00f..fee7c6e 100644
--- a/www/app.css
+++ b/www/app.css
@@ -468,7 +468,7 @@
 
 @font-face {
   font-family: 'pikto';
-  src: url('font/pikto.ttf?68902687') format('truetype');
+  src: url('font/pikto.ttf?73409988') format('truetype');
   font-weight: normal;
   font-style: normal;
 }
@@ -478,46 +478,45 @@
 @media screen and (-webkit-min-device-pixel-ratio:0) {
   @font-face {
     font-family: 'pikto';
-    src: url('../font/pikto.svg?49751252#pikto') format('svg');
+    src: url('../font/pikto.svg?73409988#pikto') format('svg');
   }
 }
 */
- 
- [class^="icon-"]:before, [class*=" icon-"]:before {
+[class^="icon-"]:before, [class*=" icon-"]:before {
   font-family: "pikto";
   font-style: normal;
   font-weight: normal;
   speak: never;
- 
+
   display: inline-block;
   text-decoration: inherit;
   width: 1em;
   margin-right: .2em;
   text-align: center;
   /* opacity: .8; */
- 
+
   /* For safety - reset parent styles, that can break glyph codes*/
   font-variant: normal;
   text-transform: none;
- 
+
   /* fix buttons height, for twitter bootstrap */
   line-height: 1em;
- 
+
   /* Animation center compensation - margins should be symmetric */
   /* remove if not needed */
-  /* margin-left: .2em; */
- 
+  margin-left: .2em;
+
   /* you can be more comfortable with increased icons size */
   /* font-size: 120%; */
- 
+
   /* Font smoothing. That was taken from TWBS */
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale;
- 
+
   /* Uncomment for 3D effect */
   /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
 }
- 
+
 .icon-cancel:before { content: '\e800'; } /* '' */
 .icon-th-large:before { content: '\e801'; } /* '' */
 .icon-th-list:before { content: '\e802'; } /* '' */
@@ -548,6 +547,8 @@
 .icon-cog-alt:before { content: '\e81b'; } /* '' */
 .icon-wrench:before { content: '\e81c'; } /* '' */
 .icon-flash:before { content: '\e81d'; } /* '' */
+.icon-volume-down:before { content: '\e81e'; } /* '' */
+.icon-volume-up:before { content: '\e81f'; } /* '' */
 .icon-rss:before { content: '\f09e'; } /* '' */
 .icon-docs:before { content: '\f0c5'; } /* '' */
 .icon-menu:before { content: '\f0c9'; } /* '' */
@@ -570,6 +571,9 @@
 .icon-toggle-on:before { content: '\f205'; } /* '' */
 .icon-podcast:before { content: '\f2ce'; } /* '' */
 
+
+
+
 /* Dropdown Menu */
 
 /* Style The Dropdown Button */
diff --git a/www/data/tpl/ctrl.txt b/www/data/tpl/ctrl.txt
index 2fc9c51..5591ce8 100644
--- a/www/data/tpl/ctrl.txt
+++ b/www/data/tpl/ctrl.txt
@@ -31,5 +31,7 @@
     <button class="ctrl-btn ctrl-item" id="live-btn" title="Live"><i class="icon-podcast"></i></button>
     <button class="ctrl-btn ctrl-item" id="switch-btn" title="Ein/Aus"><i class="icon-flash"></i></button>
     <!-- <button class="ctrl-btn ctrl-item" id="" title="Einstellungen"><i class="icon-tablet"></i></button> -->
+    <button class="ctrl-btn ctrl-item" id="voldn-btn" title="leiser"><i class="icon-volume-down"></i></button>
+    <button class="ctrl-btn ctrl-item" id="volup-btn" title="lauter"><i class="icon-volume-up"></i></button>
   </div>
 </div>
diff --git a/www/font/pikto.ttf b/www/font/pikto.ttf
index 42e2857..b4d748b 100644
--- a/www/font/pikto.ttf
+++ b/www/font/pikto.ttf
Binary files differ
diff --git a/www/js/app.js b/www/js/app.js
index 38da416..5b3e7b3 100644
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -374,7 +374,14 @@
       self.addEvtListener('#plst-btn', 'click', self.titel_liste);
       self.addEvtListener('#live-btn', 'click', self.livestream_selection);
       self.addEvtListener('#switch-btn', 'click', self.geraet_schalt_liste);
-    
+
+      self.addEvtListener('#voldn-btn', 'click', function() {
+        self.kommando('voldn');
+      });
+      self.addEvtListener('#volup-btn', 'click', function() {
+        self.kommando('volup');
+      });
+      
       self.media_liste();
     });
   };

--
Gitblit v1.9.3