Skip to content

PreparedCrossfadeInput

type PreparedCrossfadeInput = object;

The replacement input returned by CrossfadeOptions.preparePrimaryInput.

inputArgs?: FFmpegArg;

FFmpeg input options of the replacement input. They replace the default input options, which are tuned for http(s) streaming urls.


primaryStartTime?: number;

The media timestamp (in seconds) the fading-out input is trimmed to before the fade begins.

Some sources cannot start their stream at an arbitrary position: they begin at the closest boundary they support (a chunk of the file, for example), so the stream carries audio that was already played. The timestamp is the position of the fade boundary in the media’s own timeline, and the input is trimmed to it, which drops that audio without losing a single frame of the fade window.

It is a media timestamp, not an offset from the beginning of the stream: the input keeps its original timestamps while it is trimmed.


seek?: number;

The initial seek of the replacement input, in seconds relative to it. When omitted, the input is assumed to start exactly at the fade boundary.


url: string;

The replacement input url or path, for example a local playlist file trimmed to start at the fade boundary.