SourceSubscriptionError type

Errors found while subscribing to a particular source, separated out by reason:

  • internal: An opaque internal error

  • unknownSourceId: The media node does not exist (maybe it crashed)

  • unknownSourceStream: The media node exists, but does not have the stream key

  • noSubscriberPin: The media node is not set up to receive data on this pin (which may be auto-detected)

  • unsupportedConversion: Norsk does not support conversion from the media types of the source to the media types accepted by the subscriber

Signature:

export declare type SourceSubscriptionError = {
    info: string;
    reason: "internal";
} | {
    mediaNodeId: MediaNodeId;
    reason: "unknownSourceId";
} | {
    mediaNodeId: MediaNodeId;
    streamKey: StreamKey;
    reason: "unknownSourceStream";
} | {
    mediaNodeId: MediaNodeId;
    streamKey: StreamKey;
    pin: string;
    subscriberPins: string[];
    reason: "noSubscriberPin";
} | {
    mediaNodeId: MediaNodeId;
    streamKey: StreamKey;
    sourceTypes: string[];
    subscriberTypes: string[];
    reason: "unsupportedConversion";
};

References: MediaNodeId, StreamKey