import { Livepeer } from "livepeer";
const livepeer = new Livepeer({
apiKey: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await livepeer.stream.terminate("<id>");
// Handle the result
console.log(result);
}
run();{
"errors": [
[
"id not provided",
"Account not found"
]
]
}DELETE /stream/{id}/terminate can be used to terminate an ongoing
session on a live stream. Unlike suspending the stream, it allows the
streamer to restart streaming even immediately, but it will force
terminate the current session and stop the recording.
A 204 No Content status response indicates the stream was successfully
terminated.
import { Livepeer } from "livepeer";
const livepeer = new Livepeer({
apiKey: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await livepeer.stream.terminate("<id>");
// Handle the result
console.log(result);
}
run();{
"errors": [
[
"id not provided",
"Account not found"
]
]
}Was this page helpful?