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

How can I access HTTP services via Extendscript from PPro CC

New Here ,
Feb 11, 2014 Feb 11, 2014

Copy link to clipboard

Copied

I attempting to build an HTML5 panel for Premiere Pro that retrieves assets from a third party REST API but there seems to be no support for Socket or XMLHttpRequest objects in this application which there is for others. (I get Error: Socket does not have a constructor)

How would I go about making these requests in Extendscript?

TOPICS
SDK

Views

2.2K

Translate

Translate

Report

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
New Here ,
Feb 13, 2014 Feb 13, 2014

Copy link to clipboard

Copied

When you are building panels using the Eclipse / Builder setup, you have access to jQuery (it's an option you can enable when you're building the app). However, Adobe seems to be following strict javascript cross-domain policies so your only option is to use jsonP which not every rest service provider implements.

Hope this helps.

Kai

Votes

Translate

Translate

Report

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
New Here ,
Feb 14, 2014 Feb 14, 2014

Copy link to clipboard

Copied

Thank KaiPradel,

I did try importing jQuery 1.9.1 but it was throwing an error when run in Premiere. And I would assume jQuery must use Socket, or XMLHttpRequest anyway so I'm not sure how that would work if they aren't supported in Premiere. The cross domain stuff is interesting though.

I've actually got my panel successfully running and making requests in InDesign with a few tweaks so I assume Premiere support is just a little less mature.

Votes

Translate

Translate

Report

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 ,
Jul 04, 2014 Jul 04, 2014

Copy link to clipboard

Copied

Hi schallis,

I am also looking into using sockets (creating a socket server in Premiere) from my HTML5 panel, but am also getting "Socket is not defined" when running it in the context of Premiere.

I think you are mixing up the Javascript engine that is in CEF (Chrome Embedded Framework, which runs the Javascript in your HTML panel), and CEP (Common Extensibility Framework, which runs JSX code). The Socket class in question belongs to the CEP side of things. so the lack of it in CEP doesn't mean that you can't use web sockets (if they were supported) in the CEF side.

I am fairly certain jQuery doesn't do sockets, so it would be an XmlHttpRequest if using jQuery.

Votes

Translate

Translate

Report

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 ,
Jul 22, 2014 Jul 22, 2014

Copy link to clipboard

Copied

LATEST

Since your panels were already in JavaScript before calling into ExtendScript, why not just do the web work from there, instead of from within ExtendScript? You can pass stuff from JavaScript --> ExtendScript, and back again, as needed...

Votes

Translate

Translate

Report

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