Skip to main content
Participant
February 19, 2026
Question

UXP for Premiere - findItemsMatchingMediaPath Function

  • February 19, 2026
  • 2 replies
  • 32 views

 

I’m currently migrating a panel built with CEP to UXP, and I’ve run into an issue with a specific function.

In CEP, there is a function called ProjectItem.findItemsMatchingMediaPath().
I used it directly from the root item like this:

var matchedItems = app.project.rootItem.findItemsMatchingMediaPath(path, true); 

This allowed me to search the entire project tree from the root and return all items whose mediaPath matched.

However, in UXP, this function appears to be available only on ClipProjectItem.
I attempted to cast it as follows, but it does not work:

const ppro = require(‘premierepro’);

const activeProject = await ppro.Project.getActiveProject();

const rootItem = await activeProject.getRootItem(); // is FolderItem

const rootProjectItem = await ppro.ProjectItem.cast(rootItem); // is ProjectItem

const rootClipProjectItem = await ppro.ClipProjectItem.cast(rootProjectItem); // is null

Is this behavior intended?

If so, it seems the only option is to traverse the entire root tree manually to find matching items.
In the sample code below, it looks like items are retrieved from the root and searched manually:

https://github.com/AdobeDocs/uxp-premiere-pro-samples/blob/main/sample-panels/premiere-api/html/src/projectPanel.ts#L41

Does this mean we are expected to implement our own version of findItemsMatchingMediaPath in UXP using this approach?

If that’s the case, I’m concerned about performance.
When there are many files, this manual traversal could be significantly slower compared to CEP’s built-in function:

 

var matchedItems = app.project.rootItem.findItemsMatchingMediaPath(path, true);

Is there any way in UXP to process this in a single step similar to CEP, or an alternative API that provides equivalent performance?

    This topic has been closed for replies.

    2 replies

    John T Smith
    Community Expert
    Community Expert
    February 19, 2026

    Moving a message to the correct forum is not working
    This is the USING THE COMMUNITY forum... this is where the forum is discussed
    This is not where you ask program or account questions
    Start here https://community.adobe.com/community and find the correct forum for your question
     

    kglad
    Community Expert
    Community Expert
    February 19, 2026

    post in the adobe premiere forum