View previous topic :: View next topic |
Author |
Message |
pluby The Architect
Joined: Jun 16, 2003 Posts: 11949
|
Posted: Wed Jul 16, 2008 11:44 am Post subject: Slideshow remote control support in Impress |
|
In his very limited spare time over the last month or so, Ed has been working in adding the ability to start, stop, and move through a slide show in Impress using the remote control device that Apple ships with newer Macs.
Special thanks go to Martin Kahr who developed the Remote Control Wrapper. By providing this open source framework, Ed could focus on the tedious and fussy work of integrating Martin Kahr's code into the OpenOffice.org code.
Here is how the remote control support works. When an Impress window is the active window in NeoOffice, pressing the Start/Pause (>||) key will start a slideshow. When in the slideslow, the following actions are available:
1. Pressing the Track Forward (>>|) key will move forward a slide
2. Pressing the Track Backward (|<<) key will move back a slide
3. Pressing the Start/Pause (>||) key will end the slideshow
You can test the remote control support support by installing the following test patch:
PowerPC:
http://jane.neooffice.org/test/NeoOffice-2.2.4-Patch-2-Test-3-PowerPC.dmg
Intel:
http://jane.neooffice.org/test/NeoOffice-2.2.4-Patch-2-Test-3-Intel.dmg
Patrick
Last edited by pluby on Wed Jul 16, 2008 6:19 pm; edited 1 time in total |
|
Back to top |
|
|
ovvldc Captain Naiobi
Joined: Sep 13, 2004 Posts: 2352 Location: Zürich, CH
|
Posted: Wed Jul 16, 2008 1:34 pm Post subject: |
|
Sweet!
-Oz |
|
Back to top |
|
|
OPENSTEP The One
Joined: May 25, 2003 Posts: 4752 Location: Santa Barbara, CA
|
Posted: Wed Jul 16, 2008 9:04 pm Post subject: |
|
Also note that this will also work with the Keyspan Front Row Remote for computers that do not have the Apple remote built-in. Martin Kahr added support for that in his wrapper, and that's primarily what I used to develop and test.
The primary thing I'd like people to keep an eye out for is starting presentations with the Play button...in earlier versions of my code, if I pressed Play many times quickly Neo would freeze. I think I got rid of that problem, but have primarily tested on PowerPC.
ed |
|
Back to top |
|
|
ovvldc Captain Naiobi
Joined: Sep 13, 2004 Posts: 2352 Location: Zürich, CH
|
Posted: Thu Jul 17, 2008 1:17 am Post subject: |
|
Not to be impatient, but will it work with an iPhone?
Best wishes,
Oscar _________________ "What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi |
|
Back to top |
|
|
RO33 Blue Pill
Joined: Jul 18, 2008 Posts: 1
|
Posted: Fri Jul 18, 2008 9:08 am Post subject: |
|
After having read about this cool FrontRow feature I got the patch and it works great for me. Thank you very much! |
|
Back to top |
|
|
rpatrick Councilperson
Joined: Aug 29, 2007 Posts: 108
|
Posted: Fri Jul 18, 2008 12:58 pm Post subject: |
|
I've tested fairly thoroughly and it works flawlessly for me! Great stuff. |
|
Back to top |
|
|
amayze The Merovingian
Joined: Oct 24, 2005 Posts: 561 Location: Edinburgh, Scotland
|
Posted: Mon Jul 28, 2008 6:43 am Post subject: |
|
I haven't tested the remote support much within Neo, but what I have done works fine. However I have one issue.
I use iTunes a lot to listen to podcasts. Normally once I've started listening to a podcast I can start and stop it with the remote whichever application is foremost.
However, with Test Patch 3 installed, when I run NeoOffice, the remote stops working in iTunes even if it is the front most app. Also the Menu button no longer calls up FrontRow.
Further if I open a presentation, and then bring iTunes to the front, when I press Play the presentation starts in the background. Further button presses do nothing, neither advancing or stopping the presentation or having an effect on iTunes.
Normal functioning of the remote returns as soon as I quit NeoOffice.
Personally, I am never going to use the remote with Impress, my job doesn't involve giving presentations. However if I have to quit NeoOffice every time I sit at my workbench rather than my computer desk so I can stop whatever is playing in iTunes (usually the Archers) when a customer comes in, it will become a little tiresome.
Is what I've described a bug, or is it just the way that the remote works when two apps want to use it? If the latter could we have an option to turn off the remote support?
Cheers,
Andy. |
|
Back to top |
|
|
pluby The Architect
Joined: Jun 16, 2003 Posts: 11949
|
Posted: Mon Jul 28, 2008 8:20 am Post subject: |
|
It sounds like the Mac OS X remote control driver is delivering remote control actions to all applications and not just the active application.
What type of remote control do you have? The Apple remote control that your machine shipped with or a third party remote?
Also, what happens if you quit NeoOffice and open a movie in the QuickTime Player application? Do you get the same issues?
Patrick |
|
Back to top |
|
|
OPENSTEP The One
Joined: May 25, 2003 Posts: 4752 Location: Santa Barbara, CA
|
Posted: Mon Jul 28, 2008 9:29 am Post subject: |
|
I believe the current implementation may block the remote from being used by other apps. The Remote Control framework looks like it's going through IOKit and grabbing exclusive access to the remote USB device whenever it's listening, which will block it from being used by other applications while we're attached to it (which, right now, is whenever Neo is running).
I'll look into getting Neo to release/unrelease the remote when its not the foreground app. I'm not sure if I can install a delegate on NSApp though.
ed |
|
Back to top |
|
|
pluby The Architect
Joined: Jun 16, 2003 Posts: 11949
|
Posted: Mon Jul 28, 2008 9:30 am Post subject: |
|
So I just took a quick look at the Remote Control Wrapper open source framework that we use and it seems that it registers itself for remote control actions by sending an event a "mac.remotecontrols.RequestForRemoteControl" to the NSDistributedNotificationCenter.
I don't see any matching release events so maybe the problem is that the Remote Control Wrapper is getting exclusive access to the remote control dispatching service and is never releasing its control.
Patrick |
|
Back to top |
|
|
pluby The Architect
Joined: Jun 16, 2003 Posts: 11949
|
Posted: Mon Jul 28, 2008 11:55 am Post subject: |
|
We found the documentation for releasing control of the remote control dispatching service when NeoOffice stops being the active application and Ed is implementing the minor changes that are needed to do this.
When Ed checks in the changes (probably in the next day or so), I will respin another test patch that you can try.
Patrick |
|
Back to top |
|
|
OPENSTEP The One
Joined: May 25, 2003 Posts: 4752 Location: Santa Barbara, CA
|
Posted: Mon Jul 28, 2008 7:43 pm Post subject: |
|
Patrick's code works OK. As a result, the remote will only be grabbed when NeoOffice is the frontmost running application.
Of course, this doesn't solve the case of wanting to use the remote control to control iTunes while Neo is the front app. To do this I added an additional preference check. Note that right now it cannot be set via the Neo user interface, but you can do it with a Terminal
To disable the remote control in Neo completely, open a terminal and do the following:
Code: |
defaults write -app NeoOffice remoteEnabled -bool NO
|
If you've done the above, to re-enable do the following. Note that if you do nothing, this step below is not needed; the remote is enabled by default:
Code: |
defaults write -app NeoOffice remoteEnabled -bool YES
|
This switch will be in the next test patch. After changing the setting using defaults, Neo will need to be quit and restarted for the new setting to take effect. This defaults value is stored in ~/Library/Preferences/org.neooffice.NeoOffice.plist and should be retained across installations of new patches and versions automatically since it's not in the OOo preferences system.
ed |
|
Back to top |
|
|
sardisson Town Crier
Joined: Feb 01, 2004 Posts: 4588
|
Posted: Mon Jul 28, 2008 9:03 pm Post subject: |
|
OPENSTEP wrote: | This switch will be in the next test patch. |
This test patch is coming before Patch-3? I.e., we should go ahead and add this info to the wiki?
Smokey _________________ "[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki |
|
Back to top |
|
|
pluby The Architect
Joined: Jun 16, 2003 Posts: 11949
|
Posted: Mon Jul 28, 2008 11:05 pm Post subject: |
|
sardisson wrote: | OPENSTEP wrote: | This switch will be in the next test patch. |
This test patch is coming before Patch-3? I.e., we should go ahead and add this info to the wiki?
Smokey |
Yes. Since I have not released Patch 3 so I pulled it and I will merely respin it if the test patch works and wait until all of the mirrors have the respun Patch 3. So, no changes will be needed to the NeoWiki.
Patrick |
|
Back to top |
|
|
pluby The Architect
Joined: Jun 16, 2003 Posts: 11949
|
|
Back to top |
|
|
|