• Processes consumer transports by pausing and resuming them based on certain conditions.

    Parameters

    Returns Promise<JSX.Element[] | void>

    • A promise that resolves when the processing is complete.
    • Throws an error if there is an issue processing consumer transports.

    The function performs the following steps:

    1. Destructures and updates the parameters.
    2. Defines a helper function to check if a producerId is valid in given stream arrays.
    3. Filters consumer transports to resume based on certain conditions.
    4. Filters consumer transports to pause based on certain conditions.
    5. Pauses consumer transports after a short delay.
    6. Emits consumer-pause event for each filtered transport (not audio).
    7. Emits consumer-resume event for each filtered transport (not audio).
    await processConsumerTransports({
    consumerTransports: [transport1, transport2],
    lStreams_: [stream1, stream2],
    parameters: {
    remoteScreenStream: [],
    oldAllStreams: [],
    newLimitedStreams: [],
    sleep: sleepFunction,
    getUpdatedAllParams: () => parameters,
    },
    });