Author: fmueller
Date: Fri Jan 21 02:27:10 2011
New Revision: 9294

URL: http://svn.slimdevices.com/jive?rev=9294&view=rev
Log:
Bug: 15826 
Description: 
- Add hasIRBlasterCapability() function
- Catch volume up/down button events on NP screen
- Catch volume up/down IR events 

Modified:
    
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
    7.6/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/Volume.lua
    7.6/trunk/squeezeplay/src/squeezeplay/share/jive/System.lua

Modified: 
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
URL: 
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua?rev=9294&r1=9293&r2=9294&view=diff
==============================================================================
--- 
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
 (original)
+++ 
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
 Fri Jan 21 02:27:10 2011
@@ -10,6 +10,7 @@
 local Font             = require("jive.ui.Font")
 local Event            = require("jive.ui.Event")
 local Framework        = require("jive.ui.Framework")
+local System           = require("jive.System")
 local Icon             = require("jive.ui.Icon")
 local Button           = require("jive.ui.Button")
 local Choice           = require("jive.ui.Choice")
@@ -27,6 +28,7 @@
 local SnapshotWindow   = require("jive.ui.SnapshotWindow")
 local Tile             = require("jive.ui.Tile")
 local Timer            = require("jive.ui.Timer")
+local Player           = require("jive.slim.Player")
 
 local VUMeter          = require("jive.audio.VUMeter")
 local SpectrumMeter    = require("jive.audio.SpectrumMeter")
@@ -1625,6 +1627,14 @@
                        volDown  = Button(
                                Icon('volDown'),
                                function()
+                                       -- Bug 15826: Allow volume events to be 
sent even if volume is fixed
+                                       --  at 100% to allow IR Blaster (a 
server side extra) to work properly.
+                                       -- Catch volume down button in NP 
screen on Fab4
+                                       if self.fixedVolumeSet and 
System:hasIRBlasterCapability() then
+                                               -- Send command directly to 
server w/o updating local volume
+                                               Player.volume(self.player, 99, 
true)
+                                       end
+
                                        local e = Event:new(EVENT_SCROLL, -3)
                                        Framework:dispatchEvent(self.volSlider, 
e)
                                        return EVENT_CONSUME
@@ -1633,6 +1643,14 @@
                        volUp  = Button(
                                Icon('volUp'),
                                function() 
+                                       -- Bug 15826: Allow volume events to be 
sent even if volume is fixed
+                                       --  at 100% to allow IR Blaster (a 
server side extra) to work properly.
+                                       -- Catch volume up button in NP screen 
on Fab4
+                                       if self.fixedVolumeSet and 
System:hasIRBlasterCapability() then
+                                               -- Send command directly to 
server w/o updating local volume
+                                               Player.volume(self.player, 101, 
true);
+                                       end
+
                                        local e = Event:new(EVENT_SCROLL, 3)
                                        Framework:dispatchEvent(self.volSlider, 
e)
                                        return EVENT_CONSUME

Modified: 
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/Volume.lua
URL: 
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/Volume.lua?rev=9294&r1=9293&r2=9294&view=diff
==============================================================================
--- 7.6/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/Volume.lua 
(original)
+++ 7.6/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/Volume.lua 
Fri Jan 21 02:27:10 2011
@@ -168,6 +168,15 @@
 
 
 function _updateVolume(self, mute, directSet, noAccel, minAccelDelta)
+
+       -- Bug 15826: Allow volume events to be sent even if volume is fixed
+       --  at 100% to allow IR Blaster (a server side extra) to work properly.
+       -- Catch volume IR commands received by Fab4
+       if self.player and (self.player:getDigitalVolumeControl() == 0) and 
System:hasIRBlasterCapability() then
+               -- Send command directly to server w/o updating local volume
+               Player.volume(self.player, 100 + self.delta, true)
+       end
+
        if not self.popup then
                self.timer:stop()
                return

Modified: 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/System.lua
URL: 
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/jive/System.lua?rev=9294&r1=9293&r2=9294&view=diff
==============================================================================
--- 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/System.lua (original)
+++ 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/System.lua Fri Jan 21 
02:27:10 2011
@@ -70,6 +70,7 @@
        ["batteryCapable"] = 1,
        ["hasDigitalOut"] = 1,
        ["hasTinySC"] = 1,
+       ["IRBlasterCapable"] = 1,
 }
 
 local _capabilities = {} -- of form string, 1 so
@@ -172,6 +173,10 @@
        return _capabilities["batteryCapable"] ~= nil
 end
 
+function hasIRBlasterCapability(self)
+       return _capabilities["IRBlasterCapable"] ~= nil
+end
+
 -- rest is C implementation
 
 

_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins

Reply via email to