[vlc-devel] [PATCH] Added mute button to http interface

Adrien Cunin adri2000 at ubuntu.com
Sat Sep 4 16:25:11 CEST 2010


It lacks an icon for now and doesn't have the "unmute" ability.
---
 share/http/dialogs/main    |    4 ++++
 share/http/js/functions.js |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/share/http/dialogs/main b/share/http/dialogs/main
index ecf038a..244c4d9 100644
--- a/share/http/dialogs/main
+++ b/share/http/dialogs/main
@@ -94,6 +94,10 @@ sout and playlist .
       <img src="images/volume_up.png" alt="Increase Volume" />
       <span class="btn_text">Increase Volume</span>
     </button>
+    <button id="btn_volume_mute" onclick="volume_mute();" onmouseover="button_over(this);" onmouseout="button_out(this);" title="Mute Volume" >
+      <img src="images/volume_mute.png" alt="Mute Volume" />
+      <span class="btn_text">Mute Volume</span>
+    </button>
   </div>
   <div id="status">
     <span id="state">(?)</span>
diff --git a/share/http/js/functions.js b/share/http/js/functions.js
index 9ecce15..c09222c 100644
--- a/share/http/js/functions.js
+++ b/share/http/js/functions.js
@@ -379,6 +379,10 @@ function volume_up()
 {
     loadXMLDoc( 'requests/status.xml?command=volume&val=%2B20', parse_status );
 }
+function volume_mute()
+{
+    loadXMLDoc( 'requests/status.xml?command=volume&val=0', parse_status );
+}
 function seek( pos )
 {
     loadXMLDoc( 'requests/status.xml?command=seek&val='+pos, parse_status );
-- 
1.7.0.4




More information about the vlc-devel mailing list