Render Queue Instance

The Media Encoder Queue Instance API is the used for up to date methods on the Render Queue.

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.

getStatus

Provides the current status of the rendering queue, represented as an enumeration.

The possible states are: Stopped = 0, Paused = 1, Running = 2, Stopping = 3, InvalidState = 4

Compare the returned status against the RENDER_QUEUE_* constants on RenderQueue, for example app.RenderQueue.RENDER_QUEUE_RUNNING.

Since: 27.0

Parameters

none

Returns

Name
Type
Description
status
int
Stopped = 0, Paused = 1, Running = 2, Stopping = 3, InvalidState = 4
const app = require("mediaencoder");
const status = app.RenderQueue.getInstance().getStatus();
status; // 0 | 1 | 2 | 3 | 4

subscribeToEvent

Registers a subscription to a specific application event on a render queue instance object.

Note: addEventLister() is required after a subscribeToEvent() call in order to actually react to an event

Since: 27.0

Parameters

Name
Type
Description
eventId
string
The event ID to subscribe to. Can include RENDER_QUEUE_STATUS_CHANGED, AUDIO_PREPROGRESS_VALUE_CHANGED, WATCH_FOLDER_ENCODER_STATUS_CHANGED

Returns

Name
Type
Description
success
boolean
Returns true if subscription was successful
const app = require("mediaencoder");
const instance = app.RenderQueue.getInstance();
const event = app.RenderQueue.AUDIO_PREPROGRESS_VALUE_CHANGED;
// First Subscribe to the Event
instance.subscribeToEvent(event); // true
const callback = (value) => {
  console.log("Audio Preprogress Value Changed", value);
};
// Then Add an Event Listener to the Event
instance.addEventListener(event, callback, false);

addEventListener

Listens for an application-level events and triggers a callback.

Note: subscribeToEvent() is required at least once for each event time before running addEventListener()

Since: 27.0

Parameters

Name
Type
Description
eventId
string
The event ID to subscribe to. Can include: RENDER_QUEUE_STATUS_CHANGED, AUDIO_PREPROGRESS_VALUE_CHANGED, WATCH_FOLDER_ENCODER_STATUS_CHANGED
callback
function
A function to be triggered on when the specified event occurs
unkown
boolean
TODO

Returns

none

const app = require("mediaencoder");
const instance = app.RenderQueue.getInstance();
const event = app.RenderQueue.AUDIO_PREPROGRESS_VALUE_CHANGED;
// First Subscribe to the Event
instance.subscribeToEvent(event); // true
const callback = (value) => {
  console.log("Audio Preprogress Value Changed", value);
};
// Then Add an Event Listener to the Event
instance.addEventListener(event, callback, false);

removeEventListener

Removes an event listener from an application-level event.

Since: 27.0

Parameters

Name
Type
Description
eventId
string
The event ID to subscribe to. Can include RENDER_QUEUE_STATUS_CHANGED, AUDIO_PREPROGRESS_VALUE_CHANGED, WATCH_FOLDER_ENCODER_STATUS_CHANGED
callback
function
A function to be removed from the event listener

Returns

none

const app = require("mediaencoder");
const instance = app.RenderQueue.getInstance();
const event = app.RenderQueue.AUDIO_PREPROGRESS_VALUE_CHANGED;
// First Subscribe to the Event
instance.subscribeToEvent(event); // true
const callback = (value) => {
  console.log("Audio Preprogress Value Changed", value);
};
// Then Add an Event Listener to the Event
instance.addEventListener(event, callback, false);
// Finally Remove the Event Listener
instance.removeEventListener(event, callback);