Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Playback from CEP panel

Explorer ,
Jun 01, 2023 Jun 01, 2023

I've written a CEP panel that needs to retain focus.  I'd like a way to start/stop playback of the active sequence without having to select the timeline or program windows (causing the CEP panel to lose focus).

 

I thought I would be able to find a command in ExtendScript to start or stop playback, but I can't find anything.  Does such a command exist?

TOPICS
SDK , User interface or workspaces
623
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 12, 2023 Jun 12, 2023

Not in the offical API, but in the undocumented QE Dom you can.

app.enableQE();
qe.startPlayback();
qe.stopPlayback();

Some more info here: https://github.com/aenhancers/types-for-adobe-extras/blob/3bc960265b61830b07193b27d4e48304e9352542/Premiere/12.0/qeDom.d.ts#L43

Translate
Adobe Employee ,
Jun 08, 2023 Jun 08, 2023

There is nothing in PPro's ExtendScript API to control Program monitor playback; just Source monitor.

 

Please explain more about "needs to retain focus"; from a user's perspective, what's the workflow you're trying to support?

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 13, 2023 Jun 13, 2023

Sorry, Bruce.  Just noticed your question.  The reason the panel needs to retain focus is that it utilizes key bindings to perform some actions (so if I press "a", my script does something; if I press "b", it does something else, etc.).  Those key bindings only work if the panel has focus.  If I can't control playback from my panel, I have to switch back and forth between the timeline and my panel - which is annoying.  The spacebar key to start/stop play works from within the panel, but I normally want the sequence to play at double speed so I can quickly work through the entire sequence.  To do that, I have to click on timeline, start it at doublespeed, then quickly switch back to my panel before any keys need to be pressed.  Make sense?

 

The solution I found below works great.  I just added some additional key binds to emulate the J, K, and L key actions (backward, stop, forward, etc.).  Now I never have to leave my panel and my custom key binds always work.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 14, 2023 Jun 14, 2023
LATEST

Yes, makes sense; glad you found a solution that works for you.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 12, 2023 Jun 12, 2023

Not in the offical API, but in the undocumented QE Dom you can.

app.enableQE();
qe.startPlayback();
qe.stopPlayback();

Some more info here: https://github.com/aenhancers/types-for-adobe-extras/blob/3bc960265b61830b07193b27d4e48304e9352542/P...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 13, 2023 Jun 13, 2023

Thanks, Justin.  I assumed it was in QE somewhere.

 

startPlayback and stopPlayback currently do the same thing - toggle playback.  Basically, it's like pressing the spacebar.

 

I found something that works a bit better, at least for my purposes:

 

qe.project.getActiveSequence.player.play(1)

 

This is exactly what I was looking for.  You can set the playback speed using the single parameter:

1 = normal speed

0.5 = half speed

-1 = reverse

0 = stop

 

There's also a stop() method that does the same thing as play(0).

 

Posting all this for any future visitors.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 13, 2023 Jun 13, 2023

Great find!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines