6

There is currently no keyboard shortcut to play videos in the new Mac Photos application.https://discussions.apple.com/thread/6996731?start=0&tstart=0

Rather than be frustrated in manually clicking the "play" button hundreds of times, I would like to run an Applescript to play/pause with a keyboard shortcut. I tried with no success: tell application "photos" "play" video end tell Any help advice on this would be appreciated. Thanks

NathanOliver
  • 171,901
  • 28
  • 288
  • 402
Elias
  • 91
  • 1
  • 8

4 Answers4

2

Just to update Paul's response, in Photos 2.0 (3150.4.120), you need to hit TAB twice, then spacebar will start playback. Similarly you need to hit TAB twice once you are done playing it, and then (and only then) spacebar will take you back to the grid view of your thumbnails.

  • 1
    In Photos 3.0 (3291.13.210) one must wait until the playback HUD fades out, otherwise the spacebar will exit the video regardless of how many times you've pressed . So the sequence is: space, wait for the HUD to fade out, tab, space to start playback – Tor Arne Sep 19 '18 at 15:13
  • Just to update Tor Arne's update to ... lol.. my own update (I seriously just Googled this again) to Paul's response, in Photos 4.0 (3461.7.140) (which seems unchanged from 3.0, so this will probably work in that version also) -- if you don't feel like waiting for the playback HUD to disappear, try the following sequence. Navigate to a video, then: tab, tab, shift-tab, space to start playback. The 'shift-tab' will put the focus on the HUD's play-pause button (strangely the blue focus ring disappears when that control gets focus). This is on macOS 10.14.6 (18G103). – Krishen Greenwell Apr 24 '20 at 14:29
0

If you do not mind a slightly time-consuming workaround, you can enslave Automator to create a Service that will subsequently respond to a keyboard shortcut. You can find the instructions here.

Craig Smith
  • 1,063
  • 2
  • 11
  • 21
  • I figured out how to move the cursor to the "play/pause" button and left click it with an application called Better Touch Tool. This achieves the desired end result and does the same thing that Automator's "record" function does. The only problem now is that videos recorded in land scape, portrait orientations and different resolutions place the play button in a different location on the screen. Is there a way to call up the graphical button and not its location via scripting? – Elias Jun 05 '15 at 06:26
-1

Since your goal is to use the keyboard, there's a better option for you. After selecting a video with cursor keys or mouse, press space to maximize the video, and then press TAB. Then space will start the video playing, left and right arrows will move frame-by-frame. Hitting TAB again will allow the space bar to return the video to its normal size.

Apparently this changes the focus to the pane with the movie so that space can start it, or perhaps it changes focus to the movie controls? IMHO, whatever it does, it's not very intuitive and badly needs to documented and preferably fixed.

More info at: https://discussions.apple.com/thread/6996731?start=0&

Paul
  • 1,800
  • 2
  • 17
  • 17
  • Thanks for the info about the tab button. Is there any code that can be written to make the space bar a play button like quicktime and every other app? – Elias Aug 28 '16 at 18:58
  • You could try a keyboard macro application, like Keyboard Maestro. This would probably mean you could no longer use the space bar for other functions inside Photos, so I'd recommend picking a slightly different keyboard shotrcut, perhaps ⌘-SPACE. – Paul Jan 13 '17 at 14:05
  • Better Touch Tool might be able to run a keyboard sequence like this. At any rate, I think you now have enough information that you could construct a script to do it. – Paul Jan 13 '17 at 14:07
  • 1
    Yep Better Touch Tool is a favorite of mine. The issue is when mapping a mouse pointer location to jump and click. Videos are in different sizes so the play button is in a different location for each one. – Elias May 30 '17 at 03:46
  • 1
    In Photos 3.0 (3291.13.210) one must wait until the playback HUD fades out, otherwise the spacebar will exit the video regardless of how many times you've pressed . So the sequence is: space, wait for the HUD to fade out, tab, space to start playback – Tor Arne Sep 19 '18 at 15:13
-1

2020 / Photos 6.0:

You can now toggle playback with Option + Space or do it manually via "Image" -> "Start Playback".

Autoplay Script

repeat while application "Photos" is running
    delay 1
    try     
        tell application "System Events"
            tell process "Photos"
                click menu item "Start Playback" of menu "Image" of menu bar 1
            end tell
        end tell
    end try
end repeat

Save it as autoplay.scpt and run it with osascript autoplay.scpt. The script exits when you close the Photos application.

adroste
  • 758
  • 1
  • 7
  • 17