UNPKG

mediasfu-reactjs

Version:

MediaSFU Prebuilt ReactJS SDK - Compatible with React 18 & 19, TypeScript & JavaScript

41 lines 2.03 kB
import { Settings } from "../../@types/types"; export interface UpdateMediaSettingsOptions { settings: Settings; updateAudioSetting: (value: string) => void; updateVideoSetting: (value: string) => void; updateScreenshareSetting: (value: string) => void; updateChatSetting: (value: string) => void; } export type UpdateMediaSettingsType = (options: UpdateMediaSettingsOptions) => void; /** * Updates media settings by calling the respective update functions for each setting type. * * @param {UpdateMediaSettingsOptions} options - The options for updating media settings. * @param {Settings} options.settings - The settings array containing values for audio, video, screenshare, and chat. * @param {Function} options.updateAudioSetting - Function to update the audio setting. * @param {Function} options.updateVideoSetting - Function to update the video setting. * @param {Function} options.updateScreenshareSetting - Function to update the screenshare setting. * @param {Function} options.updateChatSetting - Function to update the chat setting. * * @returns {void} Does not return a value, as it directly updates each setting via provided functions. * * @example * ```typescript * const options = { * settings: ["enabled", "enabled", "disabled", "enabled"], * updateAudioSetting: (value) => console.log("Audio setting:", value), * updateVideoSetting: (value) => console.log("Video setting:", value), * updateScreenshareSetting: (value) => console.log("Screenshare setting:", value), * updateChatSetting: (value) => console.log("Chat setting:", value), * }; * * updateMediaSettings(options); * // Logs: * // "Audio setting: enabled" * // "Video setting: enabled" * // "Screenshare setting: disabled" * // "Chat setting: enabled" * ``` */ export declare const updateMediaSettings: ({ settings, updateAudioSetting, updateVideoSetting, updateScreenshareSetting, updateChatSetting, }: UpdateMediaSettingsOptions) => void; //# sourceMappingURL=updateMediaSettings.d.ts.map