ProgressCategory
data-variant=info
data-slots=text
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
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
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
const app = require("mediaencoder");
const items = category.getProgressItems();
getProgressItemFromReferenceID
Retrieves a progress item by its reference ID.
Since: 27.0
Parameters
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
const app = require("mediaencoder");
const overall = category.getOverallProgressItem();
getTitle
Gets the title of the progress category.
Since: 27.0
Parameters
none
Returns
const app = require("mediaencoder");
category.getTitle();
getTotalJobs
Counts all progress items registered in this category.
Since: 27.0
Parameters
none
Returns
const app = require("mediaencoder");
category.getTotalJobs();
getValue
Gets the cumulative progress value of the progress category.
Since: 27.0
Parameters
none
Returns
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
const app = require("mediaencoder");
category.getIcon();
hasPendingJobs
Checks if the progress category has any pending jobs.
Since: 27.0
Parameters
none
Returns
true if there are pending jobsconst app = require("mediaencoder");
category.hasPendingJobs();
hasDoneJobs
Checks if the progress category has any completed progress items.
Since: 27.0
Parameters
none
Returns
true if there are completed jobsconst 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
true if all jobs report unknown progressconst app = require("mediaencoder");
category.isIndeterminateProgress();
supportsCancellation
Checks if the progress category can be cancelled.
Since: 27.0
Parameters
none
Returns
true if the category supports cancellationconst app = require("mediaencoder");
category.supportsCancellation();
cancelProgress
Cancels all jobs being reported under this progress category.
Since: 27.0
Parameters
none
Returns
true on successconst app = require("mediaencoder");
await category.cancelProgress();
removeDoneJobs
Removes the completed progress items from the progress category.
Since: 27.0
Parameters
none
Returns
true on successconst app = require("mediaencoder");
category.removeDoneJobs();
removeCancelledJobs
Removes the cancelled and failed progress items from the progress category.
Since: 27.0
Parameters
none
Returns
true on successconst app = require("mediaencoder");
category.removeCancelledJobs();
removeProgressItem
Removes the specified progress item from the progress category.
Since: 27.0
Parameters
Returns
true if the item was removedconst app = require("mediaencoder");
category.removeProgressItem(item);
showOnlyStatusColumn
Indicates that this progress category will only show the status column.
Since: 27.0
Parameters
none
Returns
true if the category is configured to show only the status columnconst 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
true if the category is shown in the header barconst app = require("mediaencoder");
category.showInHeaderBar();