StreamSwitchSmoothSettings.onSourceEnded property
Called when a source’s streams disappear on a pin (e.g. file ended). This callback blocks context propagation - use it to set up the next source before returning. lastSeenPts (microseconds) is the last PTS this switch’s engine emitted from the ending pin — capture it and feed back as anchorPts on a sibling switch’s releasePreloaded for cross-switch PTS continuity.
Signature:
onSourceEnded?: (pin: Pins, lastSeenPts: number | undefined) => Promise<{
release?: Pins;
} | void>;