Skip to main content
Participant
July 28, 2025
Answered

Issue Accessing Caption Items via CaptionTrack API in Premiere Pro UXP Scripting

  • July 28, 2025
  • 3 replies
  • 380 views

Dear Adobe Premiere Pro Support Team,

I am currently developing a Premiere Pro extension using the UXP scripting API, and I am encountering difficulties when trying to access captions from a sequence’s CaptionTrack.

Specifically, I can successfully retrieve the CaptionTrack object using sequence.getCaptionTrack(), and I can confirm its presence and properties such as id and name. However, when attempting to get caption items using methods like getItems() or getTrackItems(), I consistently receive errors such as:

  • “Not Enough Parameters”

  • “captionTrack.getItems is not a function”

From inspecting the CaptionTrack object, I found that it has a method getTrackItems(), but it appears to require parameters which are not clearly documented.

Below is a simplified snippet of the code I tried:

const captionTrack = await sequence.getCaptionTrack();
if (!captionTrack) {
    alert("No caption track found.");
} else {
    alert(`CaptionTrack found. ID: ${captionTrack.id}, Name: ${captionTrack.name}`);
    // Attempting to get caption items
    try {
        const items = await captionTrack.getTrackItems();
        alert(`Number of captions: ${items.length}`);
    } catch (error) {
        alert(`Error: ${error.message}`);
    }
}

I would greatly appreciate guidance on the correct usage of the CaptionTrack API to access individual caption items (text, timing, etc.) within a CaptionTrack in the UXP environment. If there is sample code or updated documentation addressing this, that would be very helpful.

Thank you very much for your support and assistance.

Best regards,

Muhammadhussein Ammari

Correct answer Cathy37893448nt7f

Hi xmha97, 

 

Unfortunately, Caption API is still under construction, and there is no available API to access and modify caption properties yet. To access trackItems inside of caption track and use available trackItem API, like the documentation website suggested, you will need input parameters: trackItemType and includeEmptyTrackItem for getTrackItems API. A example usage would be like 

const trackItems = await captionTrack.getTrackItems(
          ppro.Constants.TrackItemType.CLIP, 
          false // includeEmptyTrackItems
        );

Caption API is absolutely something planned for future - Apologies for inconvinence, and thanks for trying out UXP!

3 replies

Bruce Bullis
Community Manager
Community Manager
July 30, 2025

Cathy is 100% correct, and...PPro UXP partners are invited to use the PPro UXP CC Developer Forum, to discuss pre-release APIs.

Cathy37893448nt7fCorrect answer
Adobe Employee
July 30, 2025

Hi xmha97, 

 

Unfortunately, Caption API is still under construction, and there is no available API to access and modify caption properties yet. To access trackItems inside of caption track and use available trackItem API, like the documentation website suggested, you will need input parameters: trackItemType and includeEmptyTrackItem for getTrackItems API. A example usage would be like 

const trackItems = await captionTrack.getTrackItems(
          ppro.Constants.TrackItemType.CLIP, 
          false // includeEmptyTrackItems
        );

Caption API is absolutely something planned for future - Apologies for inconvinence, and thanks for trying out UXP!

Kevin J. Monahan Jr.
Community Manager
Community Manager
July 30, 2025

Hi,

Thanks for your question. I changed the tag of the post to SDK. That way, the right developers will come by to help you. Good luck!

 

Thanks,
Kevin

 

Kevin Monahan - Sr. Community and Engagement Strategist – Adobe Pro Video and Audio