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

How to require javascript library in plugin?

Community Beginner ,
Jul 08, 2020 Jul 08, 2020

Copy link to clipboard

Copied

A little bit of background: I have a plugin where I need to gather the system's hardware specs and ideally I would use something like node-wmi (https://www.npmjs.com/package/node-wmi) to directly access WMI to gather things like the CPU, GPU, RAM, etc. However, I can't figure out how to get external libraries included in a Premiere Pro Plugin. I know you can include Node.js and some others in the manifest file inside "<CEFCommandLine>", but I don't believe that works for custom libraries like this. It also doesn't look like CEP doesn't have a require function - it is mentioned in the CEP 9 cookbook, but anytime I try to use it it breaks the script.

 

Right now, I am using "window.cep.process" to run "wmic get" commands and it works most of the time, but seemlingly randomly it doesn't return properly - hence why I would prefer to use a library like node-wmi.

 

Any recommendations?

TOPICS
SDK

Views

213

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 09, 2020 Jul 09, 2020

Copy link to clipboard

Copied

LATEST

Not sure (I support PPro's ExtendScript API), but...is this of any use?

https://medium.com/adobetech/how-to-build-a-node-js-server-in-a-panel-ba1d63ea67e2


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