Skip to content

Events

Smelter is using WebSocket connection to send events to the connected clients. Supported events are listed below.

VIDEO_INPUT_DELIVERED

type Event = {
type: "VIDEO_INPUT_DELIVERED";
input_id: string;
}

The Smelter received the input, and the first frames of that input are ready to be used. If you want to ensure that some inputs are ready before you send the start request, you can wait for those events for specific inputs.

VIDEO_INPUT_PLAYING

type Event = {
type: "VIDEO_INPUT_PLAYING";
input_id: string;
}

The Smelter received the input and is using the first frame for rendering. This event will not be sent before the start request.

This event is usually sent at the same time as VIDEO_INPUT_DELIVERED except for 2 cases:

  • Before start request.
  • If input has the offset_ms field defined.

VIDEO_INPUT_PAUSED

type Event = {
type: "VIDEO_INPUT_PAUSED";
input_id: string;
}

The input stream stopped delivering frames and the rendering on that input was paused. Smelter will keep rendering the last frame until the input resumes or is unregistered. After the stream resumes, a new VIDEO_INPUT_PLAYING event will be emitted.

VIDEO_INPUT_EOS

type Event = {
type: "VIDEO_INPUT_EOS";
input_id: string;
}

The input stream has ended and all the frames were already processed. It’s not emitted on input unregister.

AUDIO_INPUT_DELIVERED

type Event = {
type: "AUDIO_INPUT_DELIVERED";
input_id: string;
}

The Smelter received the input, and the first samples on that input are ready to be used. If you want to ensure that some inputs are ready before you send the start request, you can wait for those events for specific inputs.

AUDIO_INPUT_PLAYING

type Event = {
type: "AUDIO_INPUT_PLAYING";
input_id: string;
}

The Smelter received the input and is using the first samples for rendering. This event will not be sent before the start request.

This event is usually sent at the same time as AUDIO_INPUT_DELIVERED except for 2 cases:

  • Before start request.
  • If input has the offset_ms field defined.

AUDIO_INPUT_PAUSED

type Event = {
type: "AUDIO_INPUT_PAUSED";
input_id: string;
}

The input stream stopped delivering audio samples and the mixing of that input was paused. After the stream resumes, a new AUDIO_INPUT_PLAYING event will be emitted.

AUDIO_INPUT_EOS

type Event = {
type: "AUDIO_INPUT_EOS";
input_id: string;
}

The input stream has ended and all the audio samples were already processed. It’s not emitted on input unregister.

OUTPUT_DONE

type Event = {
type: "OUTPUT_DONE",
output_id: string
}

The output has ended. All video frames and audio samples were sent/written.

OUTPUT_ERROR

type Event = {
type: "OUTPUT_ERROR",
output_id: string,
severity: "critical" | "transient" | "warning",
err: string,
stack: string,
}

A runtime error occurred on an output.

  • severity: "critical" - unrecoverable failure; the output has fully stopped or disconnected.
  • severity: "transient" - a user-facing issue (e.g. artifacts or dropped frames) from which the output is expected to recover automatically.
  • severity: "warning" - incorrect behavior that should be investigated but did not cause any user-facing effects.