Skip to content

Commit 4763068

Browse files
Adding Sequence.createCaptionTrack and CAPTION_FORMAT constants, Sequence.exportAsMediaDirect workAreaType (#124)
* Adding Sequence.createCaptionTrack and CAPTION_FORMAT constants See https://ppro-scripting.docsforadobe.dev/sequence/sequence.html?highlight=createcaptiontrack#sequence-createcaptiontrack Untested yet * Proposing exportAsMediaDirect WorkAreaType enum see docs https://ppro-scripting.docsforadobe.dev/sequence/sequence.html#sequence-exportasmediadirect
1 parent 701727e commit 4763068

File tree

1 file changed

+50
-1
lines changed

1 file changed

+50
-1
lines changed

Premiere/15.0/index.d.ts

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ type SampleRateOption = 48000 | 96000
2121
type BitsPerSampleOption = 16 | 24
2222
type SDKEventType = "warning" | "info" | "error"
2323

24+
declare enum WorkAreaType {
25+
ENCODE_ENTIRE = 0,
26+
ENCODE_IN_TO_OUT = 1,
27+
ENCODE_WORK_AREA = 2
28+
}
29+
2430
declare enum TIME_FORMAT {
2531
TIMEDISPLAY_24Timecode = 100,
2632
TIMEDISPLAY_25Timecode = 101,
@@ -78,6 +84,41 @@ declare class SequenceSettings {
7884
* A sequence.
7985
*/
8086
declare class Sequence {
87+
/**
88+
* Subtitle (Default)
89+
*/
90+
static readonly CAPTION_FORMAT_SUBTITLE: number
91+
92+
/**
93+
* CEA-608
94+
*/
95+
static readonly CAPTION_FORMAT_608: number
96+
97+
/**
98+
* CEA-708
99+
*/
100+
static readonly CAPTION_FORMAT_708: number
101+
102+
/**
103+
* Teletext
104+
*/
105+
static readonly CAPTION_FORMAT_TELETEXT: number
106+
107+
/**
108+
* EBU Subtitle
109+
*/
110+
static readonly CAPTION_FORMAT_OPEN_EBU: number
111+
112+
/**
113+
* OP-42
114+
*/
115+
static readonly CAPTION_FORMAT_OP42: number
116+
117+
/**
118+
* OP-47
119+
*/
120+
static readonly CAPTION_FORMAT_OP47: number
121+
81122
/**
82123
*
83124
*/
@@ -176,6 +217,14 @@ declare class Sequence {
176217
*/
177218
clone(): Sequence
178219

220+
/**
221+
* Creates a caption track in the active sequence using caption data from a project item.
222+
* @param projectItem A captions source clip (e.g. .srt)
223+
* @param startAtTime Offset in seconds from start of sequence
224+
* @param captionsFormat (Optional, defaults to subtitle) Caption format of the new track (see table below).
225+
*/
226+
createCaptionTrack(projectItem: ProjectItem, startAtTime: number, captionFormat: number): Sequence
227+
179228
/**
180229
* Creates a new sequence from the source sequence's in and out points.
181230
* @param ignoreMapping If True the current selection, not track targeting, will determine
@@ -198,7 +247,7 @@ declare class Sequence {
198247
* @param presetPath The .epr file to use.
199248
* @param workAreaType Optional work area specifier.
200249
*/
201-
exportAsMediaDirect(outputFilePath: string, presetPath: string, workAreaType?: number): string
250+
exportAsMediaDirect(outputFilePath: string, presetPath: string, workAreaType?: WorkAreaType): string
202251

203252
/**
204253
* Exports the sequence (and its constituent media) as a new PPro project.

0 commit comments

Comments
 (0)