Hello,<br><br>There's something I'm thinking about for a while that could handle the given use cases. I'm talking about a Telepathy interface to handle activities. Activities are related to rich presence information, there can be two types of activities : application activity (the user is listening to music, watching a movie, editing a file...) and verbatim activity (the user is describing his current activity in a verbatim way).
<br><br>The first type of activity described here, combined with priority rules, could be exploited to create the behaviors you're willing (when the user is reading a stream in the web browser, the music player pauses). The second one could be exploited by instant messages applications that allow you to define a personal message, by Twitter and other social networks that give you the opportunity to broadcast your status.
<br><br>I think Telepathy is the right place to implement such an API. Several connection managers could provide that information (for instance, Gabble could implement <a href="http://www.xmpp.org/extensions/xep-0108.html">
http://www.xmpp.org/extensions/xep-0108.html</a>, butterfly could provide the personal message, ...) and a "social network" connection manager could appear and help as well. If that sounds like a good solution to you, I'm very interested in working on the definition of such an interface.
<br><br>Johann<br><br><div class="gmail_quote">On Jan 12, 2008 11:22 PM, Scott Peterson <<a href="mailto:lunchtimemama@gmail.com">lunchtimemama@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Here is the problem:<br>I like listening to music. I listen to music while doing almost<br>anything else - reading, writing, coding, browsing, painting. There<br>are some activities which are at odds with my musical enjoyment -
<br>watching a video, listening to a podcast or audio book, voice-chatting<br>with someone. In the course of my daily web-browsing, I come across<br>perhaps ten or more youtube videos. On each occasions I must pause my<br>
music player (Banshee) before watching the youtube video and resume my<br>music when the video is over. I am doing the machine's job for it.<br><br>What should happen:<br>If I am listening to music and any of the following happens - I play
<br>video or audio in the browser; I open video or audio from the drive; I<br>receive or initiate a VoIP call; I record audio via Audacity or some<br>similar program; I do anything else which requires my aural attention<br>
- the music should pause. When I complete the interstitial task the<br>music should resume.<br><br>How this should happen:<br>The general idea is to have a DBus-based "attention" API. There are<br>several ways such a system could work, but here is one example:
<br>compliant applications report their "attention requirements" through<br>the API. For example, when Banshee plays a song, it would report<br>requiring "passive aural" attention. When Banshee plays a podcast or
<br>any file of the "spoken word" genre, it would report requiring "active<br>aural" attention. When totem opens a video, it would report requiring<br>"active aural" and "active visual" attention. When OpenOffice opens a
<br>text document, it would report requiring "passive visual" attention.<br>And so forth. Some logic then manages attention but culling passive<br>spectacles in the event of active spectacles, and restoring the culled
<br>spectacles when appropriate. This logic could be centralized - when a<br>video plays, it tells Banshee to pause; when a video stops, it tells<br>Banshee to start again - or it could be distributed among the<br>compliant applications - Banshee listens for "active aural" spectacles
<br>and pauses for their duration.<br><br>Other Examples:<br>Aside from the very compelling use-case of music, there are other<br>situations where such an API could be useful.<br>* Presence - Pidgin automatically changes status to "away" depending
<br>on the state of attention. If no windows are visible and no audio is<br>playing, the user is very likely away from the machine and the "away"<br>status is appropriate after a very short period of inactivity. If an
<br>active video is in the foreground, the user is likely at the machine.<br>Perhaps "watching movie" is an appropriate status to automatically<br>adopt.<br>* Screensaver - Similar to presence example, the screensaver should
<br>not activate if a movie is active in the foreground, despite any<br>length of input inactivity.<br>* ? - At the moment, every application is coded under the assumption<br>that it has the user's full attention at all times - every app is
<br>oblivious of every other app. The rise of multi-core processors only<br>means more multitasking, and empowering application developers with<br>attention data will enable new and sophisticated UIs and behaviours<br>never before possible.
<br><br>Road to an API:<br>This is an idea I've had for a while and I've given some thought to a<br>few of the technical details and problems with this idea, but first I<br>would like to gauge the interest of the XDG. If you think this is a
<br>useful idea, please voice your confidence. If you think there are<br>potential problems with this idea, please ask and I'll do my best to<br>make up something. If you think this is a terrible waist of time, lay<br>
it on me! If there's sufficient interest, we can go from there.<br><font color="#888888"><br>-Scott Peterson<br>_______________________________________________<br>xdg mailing list<br><a href="mailto:xdg@lists.freedesktop.org">
xdg@lists.freedesktop.org</a><br><a href="http://lists.freedesktop.org/mailman/listinfo/xdg" target="_blank">http://lists.freedesktop.org/mailman/listinfo/xdg</a><br></font></blockquote></div><br>