View Single Post
Posts: 875 | Thanked: 918 times | Joined on Sep 2010
#571
Originally Posted by caimanjosh View Post
I was thinking about the possible functionality of how the "media player mode" (locked but with hw buttons working) might work, and it occurred to me that the most ideal scenario there would also involve having the screen turn on for maybe 2-3 seconds each time a button is pushed (but stay locked even while on). So, for instance, one might push a hardware key to increase the volume in media player, and at that time, the screen would turn on (though still locked) and one could glance at it and see what the current volume setting is. I don't know how easy this would be, but if it's possible, it'd be perfect. I noticed that now my screen briefly turns on (but stays locked) when headphones are plugged in/unplugged (due to ASUI, I believe?), so however that is done, maybe the same could be done for this?
Maemo turns on the screen for headphones, charger, usb, mmc, etc. It would be quite easy for ASUI to do the same though. I just need to figure out how to control music apps via dbus and how to best handle it. Laziest solution would only control master volume and maybe mute the volume with fullscreen button. Problem with that is some apps use a separate volume (canola) and if its set low you won't be able to hear the music even with master volume at max. And canola likes to randomly change its volume per song.

Another easy option would be to place a blank window over the music app and catch certain keys (home and escape) while letting others pass through to the music app. This approach would require you to set the master volume to max or whatever you want before entering media mode. Problem with this is that ASUI can't turn on the screen for the keys it passes through since it doesn't actually see them. Another problem is that I'd have to catch not only home and escape but any other keys that could change the app in bad ways. Not a big deal for the n800 but I'd rather not have to grab all keys on the n810's keyboard.

The best method would be to have dbus calls for various music apps and ASUI could handle all keys and turn on the screen briefly with a blank window (catches keys) so you can see the music app. The home and escape keys could also be used and keys can be bound to pause the music or skip songs, all user-defined of course. We'd also have to solve the problem of which volume control to change or maybe adjust one of them until it reaches max and then switch to the other. It might also be better to dedicate one of the keys to temporarily turning on the screen instead of doing it on key presses as the battery would last much longer if you were just controlling the volume and current song from your pocket without the screening turning on in there.

I'm busy with some other stuff right now but if someone dug up the dbus calls for the popular music apps then I could quickly add support.