import UserType from '../enums/UserType'; import { ExternalParticipant, ExternalParticipantListMarker } from '../types/ExternalId'; import { CompositeUserId, OkUserId, Participant, ParticipantId, ParticipantStateMapped } from '../types/Participant'; import SignalingMessage from '../types/SignalingMessage'; import VideoSettings from '../types/VideoSettings'; export declare const PARAMETERS_SEPARATOR = ":"; export declare const DEVICE_IDX_PARAMETER = "d"; /** @hidden */ declare namespace Utils { function patchLocalSDP(sdp: string, preferH264: boolean, brokenH264Decoder: boolean, preferVP9: boolean, isAudioNack?: boolean): string; function patchRemoteSDP(sdp: string, oldDataChannelDescription: boolean, preferH264: boolean, brokenH264: boolean, preferVP9: boolean, brokenVP9Encoder: boolean, brokenVP9Decoder: boolean): string; function getPeerIdString(peerId: SignalingMessage.PeerId): string; function comparePeerId(peerId1: SignalingMessage.PeerId, peerId2: SignalingMessage.PeerId): boolean; function getPeerConnectionHostInfo(pc: RTCPeerConnection): Promise<{ local: any; remote: any; }>; function composeUserId(id: CompositeUserId | OkUserId, type?: UserType): CompositeUserId; function composeParticipantId(id: CompositeUserId | OkUserId, type: UserType, deviceIdx?: number): ParticipantId; function compose(compositeId: CompositeUserId, deviceIdx?: number): ParticipantId; function composeId(participant: SignalingMessage.Participant): ParticipantId; function composeDecorativeId(participant: SignalingMessage.Participant): ParticipantId | undefined; function composeMessageId(message: SignalingMessage): ParticipantId; function extractOkId(id: OkUserId | CompositeUserId | ParticipantId): OkUserId; function decomposeId(compositeId: CompositeUserId | OkUserId): { id: OkUserId; type: UserType; }; function decomposeParticipantId(participantId: ParticipantId): { compositeUserId: CompositeUserId; deviceIdx: number; }; function uuid(): string; function debounce) => ReturnType>(func: F, ms: number): (this: any, ..._args: Parameters) => void; function sdpFingerprint(sdp: string): bigint | null; function delay(time: number, { signal }?: { signal?: AbortSignal; }): Promise; function applySettings(pc: RTCPeerConnection, videoSettings: VideoSettings, prevSettings: any): any; function applyVideoTrackSettings(videoSettings: VideoSettings, s: RTCRtpSender, track: MediaStreamTrack | null, prevSettings: any, retSettings: any): void; /** * Проверяет, есть ли в первом массиве хотя бы один элемент из второго массива * @param arr Где ищем * @param search Что ищем */ function includesOneOf(arr: string[], search: string | string[]): boolean; /** * Маппер клиентского состояния участника звонка * @param participant список участников звонка * @hidden */ function mapParticipantState(participant: Pick): ParticipantStateMapped; /** * мапает данные `participants` перед передачей клиенту * @hidden */ function mapSharedParticipants(participants: Participant[]): ExternalParticipant[]; /** * сравнивает `participantState` */ function isEqualParticipantState(prev: ParticipantStateMapped, next: ParticipantStateMapped): boolean; function isObjectsEquals(obj1: { [key in T]?: K; }, obj2: { [key in T]?: K; }, deep?: boolean): boolean; function isArraysEquals(arr1: T[], arr2: T[]): boolean; function isEmptyObject(obj: object): boolean; /** * @see https://wiki.odkl.ru/pages/viewpage.action?spaceKey=VIDEO&title=Signaling+API#SignalingAPI-Постраничныйвыводпартисипантов * https://stash.odkl.ru/projects/ODKL/repos/odnoklassniki-webrtc/browse/src/main/java/one/webrtc/domain/conversation/ParticipantIndex.java#67-78 */ function participantMarkerCompare(marker1: ExternalParticipantListMarker | undefined, marker2: ExternalParticipantListMarker | undefined): number; /** убирает все ключи со значением `V` на 1 уровне */ function objectFilterOutValues, V = unknown>(obj: T, value?: unknown | unknown[]): Partial; function objectReduce(obj: T, callback: (acc: R, value: T[keyof T], key: keyof T) => R, initialValue: R): R; const setImmediate: (fn: VoidFunction) => VoidFunction; function isObject(obj: unknown): obj is object; function patchSimulcastAnswerSdp(sdp: string, trans: RTCRtpTransceiver, width: number, height: number): string; } export default Utils;