Skip to content

CrossfadeStreamOptions

Options describing a crossfade transition stream

duration: number;

The fade duration in seconds.


inCurve?: string;

The FFmpeg acrossfade fade curve of the second (fading in) input.

"qsin"

outCurve?: string;

The FFmpeg acrossfade fade curve of the first (fading out) input.

"qsin"

primaryInputArgs?: FFmpegArg;

FFmpeg input options of the first (fading out) input. When set, they replace the default input options, which are tuned for http(s) streaming urls. Use it for inputs that need different flags — a local playlist file, for example, requires the protocol_whitelist option and no reconnect flags.


primarySeek: number;

The initial seek of the first (fading out) input, in seconds. It must be the position where the fade window begins (song duration - duration).


primaryStartTime?: number;

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

A source that cannot start its stream at an arbitrary position begins at the closest boundary it supports, so its stream carries audio that was already played. The input is trimmed to this timestamp, which drops that audio and keeps the fade window intact.

The timestamp belongs to the media’s own timeline: the input keeps its original timestamps (-copyts) while it is trimmed.


secondaryUrl: string;

The stream URL of the second (fading in) input.