An input type that allows Smelter to consume HLS playlists.
Usage
hlsInputExample.tsx
import Smelter from"@swmansion/smelter-node";
asyncfunctionrun() {
const smelter = newSmelter();
await smelter.init();
await smelter.registerInput("example", {
type: "hls",
url: "https://example.com/playlist.m3u8"
});
}
voidrun();
Reference
Type definitions
type RegisterHlsInput = {
type:"hls";
url:string;
required?:bool;
offsetMs?:number;
decoderMap?:DecoderMap;
}
Parameters for registering an HLS input.
Properties
url
URL of the HLS playlist.
Type: string
required
Determines if the input stream is essential for output frame production. If set to true and the stream is delayed, Smelter will postpone output frames until the stream is received.
Type: boolean
Default value: false
offsetMs
Offset in milliseconds relative to the pipeline start (start request). If unspecified, the stream synchronizes based on the delivery time of the initial frames.
Type: number
decoderMap
Assigns which decoder should be used for media encoded with a specific codec.