UNPKG

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.

48 lines (47 loc) 2.05 kB
import { Transport, CloseAndResizeParameters, CloseAndResizeType } from '../../@types/types'; import * as i0 from "@angular/core"; export interface ProducerClosedParameters extends CloseAndResizeParameters { consumerTransports: Transport[]; screenId?: string; updateConsumerTransports: (transports: Transport[]) => void; closeAndResize: CloseAndResizeType; getUpdatedAllParams: () => ProducerClosedParameters; [key: string]: any; } export interface ProducerClosedOptions { remoteProducerId: string; parameters: ProducerClosedParameters; } export type ProducerClosedType = (options: ProducerClosedOptions) => Promise<void>; /** * @service ProducerClosed * @description Service to manage the closing of a producer, including resizing video elements and updating consumer transports. * * @method producerClosed * Closes a specific producer by its ID, adjusts any associated video elements, and updates the list of consumer transports. * * @param {ProducerClosedOptions} options - Options for closing the specified producer. * @param {string} options.remoteProducerId - Unique ID for the producer to close. * @param {ProducerClosedParameters} options.parameters - Parameters to configure the producer closure and related updates. * * @returns {Promise<void>} A promise that resolves when the producer has been closed and relevant updates have been made. * * @example * ```typescript * await producerClosedService.producerClosed({ * remoteProducerId: 'producer123', * parameters: { * consumerTransports: currentTransports, * screenId: 'screen123', * updateConsumerTransports: updateTransportList, * closeAndResize: closeAndResizeFunction, * getUpdatedAllParams: getUpdatedParamsFunction, * } * }); * ``` */ export declare class ProducerClosed { producerClosed({ remoteProducerId, parameters, }: ProducerClosedOptions): Promise<void>; static ɵfac: i0.ɵɵFactoryDeclaration<ProducerClosed, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ProducerClosed>; }