useInputStreams
useInputStreams
returns an object representing registered streams and their current state.
Reference
Type definitions
Returns
Object that maps ids of registered input streams to info about their state.
- Type:
Record<string, InputStreamInfo>
where (InputStreamInfo
)
InputStreamInfo
Type definitions
Properties
inputId
ID of an input. It identifies a stream registered using a Smelter.registerInput method.
- Type:
string
videoState
Current state of a video track in the specific input.
- Type:
"ready" | "playing" | "finished"
audioState
Current state of an audio track in the specific input.
- Type:
"ready" | "playing" | "finished"
videoDurationMs
Length of a video track if available. Only supported for some inputs e.g. mp4.
- Type:
number
audioDurationMs
Length of an audio track if available. Only supported for some inputs e.g. mp4.
- Type:
number
offsetMs
Timestamp (relative to the queue start) representing time when input was added.
- Type:
number