mediasfu-angular
Version:
mediasfu-angular - Angular 17/18/19 WebRTC SDK for video conferencing, webinars, broadcasts, live streaming, chat, recording, whiteboard, and AI agents. Prebuilt rooms and fully custom UIs.
36 lines (35 loc) • 1.6 kB
TypeScript
import { Stream, Participant } from '../@types/types';
import * as i0 from "@angular/core";
export interface MixStreamsOptions {
alVideoStreams: (Stream | Participant)[];
non_alVideoStreams: Participant[];
ref_participants: (Stream | Participant)[];
}
export type MixStreamsType = (options: MixStreamsOptions) => Promise<(Stream | Participant)[]>;
/**
* Mixes video and audio streams and participants based on specified parameters.
*
* @param {MixStreamsOptions} options - The options for mixing streams.
* @param {Array<Stream | Participant>} options.alVideoStreams - The list of audio and video streams to mix.
* @param {Array<Participant>} options.non_alVideoStreams - The list of non-audio and video streams to mix.
* @param {Array<Stream | Participant>} options.ref_participants - The list of reference participants to mix.
* @returns {Promise<Array<Stream | Participant>>} A promise that resolves with the mixed streams.
*
* @throws Will throw an error if there is an issue mixing the streams.
*
* @example
* ```typescript
* const mixedStreams = await mixStreams({
* alVideoStreams: [stream1, stream2],
* non_alVideoStreams: [participant1, participant2],
* ref_participants: [participant1, participant2],
* });
*
* console.log('Mixed streams:', mixedStreams);
* ```
*/
export declare class MixStreams {
mixStreams({ alVideoStreams, non_alVideoStreams, ref_participants, }: MixStreamsOptions): Promise<(Stream | Participant)[]>;
static ɵfac: i0.ɵɵFactoryDeclaration<MixStreams, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<MixStreams>;
}