Transcode Tasks
Learn how to add, run, stop and delete transcodes.
Get One Transcode
const transcode = library.query.transcodes.one(uuid).fetch();
Run Transcode
const uuid = "<transcode_uuid>";
const callback = (progress) =>{
console.log(progress);
}
const cancelToken = { cancel : false }
await library.query.transcodes.one(uuid).run(callback, cancelToken);
Stop a Transcode
To stop a transcode you need to set the cancel flag to true. The process will exit at the next possible opportunity.
cancelToken.cancel = true;
Delete One Transcode
const uuid = "<transcode_uuid>";
library.query.transcodes.one(uuid).delete();
Last updated
Was this helpful?