mediasfu-reactnative-expo
Version:
mediasfu-reactnative-expo – Expo-managed React Native WebRTC SDK for video conferencing, webinars, live streaming, broadcast, screen sharing, whiteboard, chat, recording, live subtitles, translation, and AI agent rooms on iOS, Android, and web. Prebuilt r
28 lines (27 loc) • 1.29 kB
TypeScript
import { Stream, Participant } from '../@types/types';
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} options.alVideoStreams - The list of audio and video streams to mix.
* @param {Array} options.non_alVideoStreams - The list of non-audio and video streams to mix.
* @param {Array} options.ref_participants - The list of reference participants to mix.
* @returns {Promise<Array>} 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 function mixStreams(options: MixStreamsOptions): Promise<(Stream | Participant)[]>;