Copy link to clipboard
Copied
Hello,
Is there any way at all to get any information about what current media is opened in source monitor, such as the file path? I know we can open a project item or raw file paths in source monitor:
app.sourceMonitor.openProjectItem(someProjectItem)
app.sourceMonitor.openFilePath(someFilePath)
If there is no straight forward way to just get the path of whatever is opened in source monitor e.g. via the SourceMonitor object, is it simply impossible via any other method (event callbacks, inspecting project metadata etc)?
I have seen this thread and other that hints at such functionality being added soon, almost a decade ago: https://community.adobe.com/t5/premiere-pro-discussions/get-info-for-clip-loaded-in-source-monitor-u...
Where we see this comment from @Bruce Bullis :
Partial workaround = get the path from the Source monitor, then use app.project.findItemsMatchingMediaPath() to find related projectItems.
Reading that it sounds like there must be a way to actually "get the path from Source monitor". But how?? 🙂
Kind regard
There's no supported API that lets you obtain the path of the currently open media, from the Source monitor.
This should work:
app.sourceMonitor.getProjectItem().getMediaPath()
Ivan's right, if there is a projectItem corresponding to the media open in the Source monitor. 🙂
And, yes, that's a documentation bug; we'll add getProjectItem().
Copy link to clipboard
Copied
There's no supported API that lets you obtain the path of the currently open media, from the Source monitor.
Copy link to clipboard
Copied
No unsupported API:s (i.e. QE) either I suppose?
Copy link to clipboard
Copied
Nothing an Adobe employee would recommend, on a public forum, no. 🙂
Copy link to clipboard
Copied
Understood. Back to the drawing board it is!
Copy link to clipboard
Copied
This should work:
app.sourceMonitor.getProjectItem().getMediaPath()
Copy link to clipboard
Copied
Wow.. it actually seems like it does. That call does not seem to be documented anywhere for the SourceMonitor object as far as I can see. How did you figure that/where did you find it?
Copy link to clipboard
Copied
Ivan's right, if there is a projectItem corresponding to the media open in the Source monitor. 🙂
And, yes, that's a documentation bug; we'll add getProjectItem().
Copy link to clipboard
Copied
I use this tool: https://exchange.adobe.com/apps/cc/1170/property-explorer
Copy link to clipboard
Copied
Ah I did not know about that, very nice thank you!