Determine audio or video upon import
I'm coding a Premiere plugin using the SDK provided by Adobe. I want my function to be able to be sensitive to whether the media is audio only or video (with or without audio), e.g. whether it's a .wav or a .mp4. I want this to happen before any clips are on any timelines, so I can't use the track.mediaType attribute.
I am trying to do this when the media is a project item but am not finding anything in the documentation (https://premiere-scripting-guide.readthedocs.io/4%20-%20Project%20Item%20object/projectItem.html?highlight=mediaType)
For now, this is what I'm doing:
GetProjectItemType: function (projectItem){ if (projectItem.name.includes("wav") || projectItem.name.includes("mp3") || projectItem.name.includes("AIFF") ) return "Audio"; else return "Video"; }
Is there a way to accomplish this? Thanks!
