ProgressCategory

data-variant=info
data-slots=text
UXP for Adobe Media Encoder is in public beta. This reference is being written, and the supported API surface may change before general availability.

Since: 27.0

A ProgressCategory represents a category of progress items, such as the global render progress category. ProgressCategory instances are not constructed directly; obtain one from ProgressCategoryContainer.getOrCreateProgressCategory or getAllProgressCategories.

const app = require("mediaencoder");
const container = app.ProgressCategoryContainer.getContainer();
const category = container.getOrCreateProgressCategory(
  app.RenderQueue.PROGRESS_CATEGORY_ID,
  "My Category",
);

Properties

id

The unique category ID.

Type: string (readonly)

Since: 27.0

Methods

createProgressItem

Creates a new ProgressItem with the given title.

Since: 27.0

Parameters

Name
Type
Description
title
string
The title for the new progress item

Returns

ProgressItem, or null if the category is no longer valid.

const app = require("mediaencoder");
const item = category.createProgressItem("Encoding job 1");

createProgressItemWithReferenceId

Creates a new ProgressItem with the given title and reference ID, so it can be looked up later via getProgressItemFromReferenceID.

Since: 27.0

Parameters

Name
Type
Description
title
string
The title for the new progress item
referenceId
object
A GUID object used to look the item up later

Returns

ProgressItem, or null if the category is no longer valid.

const app = require("mediaencoder");
const item = category.createProgressItemWithReferenceId(
  "Encoding job 1",
  referenceGuid,
);

getProgressItems

Gets all the progress items in this progress category.

Since: 27.0

Parameters

none

Returns

Name
Type
Description
items
object[]
Array of ProgressItem objects
const app = require("mediaencoder");
const items = category.getProgressItems();

getProgressItemFromReferenceID

Retrieves a progress item by its reference ID.

Since: 27.0

Parameters

Name
Type
Description
referenceGuid
object
The reference GUID the item was created with

Returns

ProgressItem, or null if there is no progress item under this reference ID.

const app = require("mediaencoder");
const item = category.getProgressItemFromReferenceID(referenceGuid);

getOverallProgressItem

Gets a progress item that represents all the progress in this category, encapsulated as a single item.

Since: 27.0

Parameters

none

Returns

ProgressItem

const app = require("mediaencoder");
const overall = category.getOverallProgressItem();

getTitle

Gets the title of the progress category.

Since: 27.0

Parameters

none

Returns

Name
Type
Description
title
string
The category title, or an empty string if the category is no longer valid
const app = require("mediaencoder");
category.getTitle();

getTotalJobs

Counts all progress items registered in this category.

Since: 27.0

Parameters

none

Returns

Name
Type
Description
total
number
The total number of progress items
const app = require("mediaencoder");
category.getTotalJobs();

getValue

Gets the cumulative progress value of the progress category.

Since: 27.0

Parameters

none

Returns

Name
Type
Description
value
number
The cumulative progress value
const app = require("mediaencoder");
category.getValue();

getIcon

Gets the icon of the progress category as a base64-encoded SVG.

Since: 27.0

Parameters

none

Returns

Name
Type
Description
icon
string
The base64-encoded SVG string, or an empty string if none
const app = require("mediaencoder");
category.getIcon();

hasPendingJobs

Checks if the progress category has any pending jobs.

Since: 27.0

Parameters

none

Returns

Name
Type
Description
result
boolean
true if there are pending jobs
const app = require("mediaencoder");
category.hasPendingJobs();

hasDoneJobs

Checks if the progress category has any completed progress items.

Since: 27.0

Parameters

none

Returns

Name
Type
Description
result
boolean
true if there are completed jobs
const app = require("mediaencoder");
category.hasDoneJobs();

isIndeterminateProgress

Checks whether the progress category has a progress item that has been configured as unknown (indeterminate) progress.

Since: 27.0

Parameters

none

Returns

Name
Type
Description
result
boolean
true if all jobs report unknown progress
const app = require("mediaencoder");
category.isIndeterminateProgress();

supportsCancellation

Checks if the progress category can be cancelled.

Since: 27.0

Parameters

none

Returns

Name
Type
Description
result
boolean
true if the category supports cancellation
const app = require("mediaencoder");
category.supportsCancellation();

cancelProgress

Cancels all jobs being reported under this progress category.

Since: 27.0

Parameters

none

Returns

Name
Type
Description
result
boolean
true on success
const app = require("mediaencoder");
await category.cancelProgress();

removeDoneJobs

Removes the completed progress items from the progress category.

Since: 27.0

Parameters

none

Returns

Name
Type
Description
result
boolean
true on success
const app = require("mediaencoder");
category.removeDoneJobs();

removeCancelledJobs

Removes the cancelled and failed progress items from the progress category.

Since: 27.0

Parameters

none

Returns

Name
Type
Description
result
boolean
true on success
const app = require("mediaencoder");
category.removeCancelledJobs();

removeProgressItem

Removes the specified progress item from the progress category.

Since: 27.0

Parameters

Name
Type
Description
inProgressItem
object
The ProgressItem to remove

Returns

Name
Type
Description
result
boolean
true if the item was removed
const app = require("mediaencoder");
category.removeProgressItem(item);

showOnlyStatusColumn

Indicates that this progress category will only show the status column.

Since: 27.0

Parameters

none

Returns

Name
Type
Description
result
boolean
true if the category is configured to show only the status column
const app = require("mediaencoder");
category.showOnlyStatusColumn();

showInHeaderBar

Indicates that this progress category will be shown in the header bar progress panel.

Since: 27.0

Parameters

none

Returns

Name
Type
Description
result
boolean
true if the category is shown in the header bar
const app = require("mediaencoder");
category.showInHeaderBar();