The status changed.
The plugin's progress window closes once the install is over, whatever
the outcome. The listener receives each new status; the terminal ones
are committed, cancelled, failed, failedDegraded and tooLate
(tooLate only answers a cancel of a change that had committed, and
committed may follow it).
change.onChange((status) => {
if (["committed", "cancelled", "failed", "failedDegraded", "tooLate"].includes(status))
void progress.close();
});
Ask to cancel (it may be tooLate).
The install stops if it has not gone too far. cancel asks the player;
the change then ends cancelled. When the change had already committed
the player answers tooLate and done still resolves committed; a
change that is restoring cannot be cancelled and ends failed or
failedDegraded.
await change.cancel();
console.log(await change.done); // "cancelled"; "committed" when it was too late
An install or uninstall in progress. The SDK never submits a change twice: after a lost reply it only queries the same request.
Remarks
An install or uninstall the player carries out in steps (
preparing,activating, possiblyrestoring) until a terminal status. The SDK asks the player for the status about every 400 ms until then;doneresolves with the terminal status and does not reject for a failed change:messagesays why.Example: Report each step of an install
The OSD shows each step of the install and the end result.
onChangeruns for every new status;doneresolves when the change is over.Since
1.0.0