import { Buffer } from 'buffer'; import { EventEmitter } from '@angular/core'; import { PromiseEmitter } from './PromiseEmitter'; import { CallServiceInstance } from '../../services/call.service'; import { MultiScaleMediaStream } from './VideoWebStream'; import { ConsoleService } from '../../services/console.service'; export interface PeerStream { stream: MediaStream | null; } export interface PeerDataChannel { peerConn: RTCPeerConnection; channels: { [key: string]: RTCDataChannel; }; streams: { audio: PeerStream; video: Array; }; } export interface PeerOutputElements { audio?: HTMLAudioElement; video?: HTMLVideoElement; } export interface StreamActiveData { type: string; socketId: string; stream: MediaStream; id?: number; } export declare class RTCCom { static peers: { [key: string]: PeerDataChannel; }; static peersElements: { [key: string]: PeerOutputElements; }; static callServiceInstance: CallServiceInstance; static rtcConfig: PromiseEmitter; static dataChannelEvents: EventEmitter; static mustUpdate: EventEmitter; static mediaStreams: MultiScaleMediaStream | null; static callMadeConfigured: EventEmitter; static streamActive: EventEmitter; static consoleSrv: ConsoleService; static setConsoleSrv(consoleSrv: ConsoleService): void; static init(callServiceInstance: CallServiceInstance, config?: { [key: string]: any; }): Promise; static unregisterAudioVideoElement(socketId: string): void; static getPeerHtmlElements(socketId: string): PeerOutputElements; static registerAudioElement(socketId: string, audioElement: HTMLAudioElement): void; static registerVideoElement(socketId: string, videoElement: HTMLVideoElement): void; static hasConnectionWith(socketId: string): boolean; static onDataChannel(callback: Function): import("rxjs").Subscription; static disconnectAll(): Promise; static closeChannelWith(remoteSocketId: string): Promise; static isHealthyConnection(remoteSocketId: string): boolean; static openChannelWith(remoteSocketId: string, channelLabels?: Array): Promise; static oneTimeConfiguration(): void; static onStatusChange(updateFun: Function): import("rxjs").Subscription; static handleDisconnection(socketId: string): Promise; static setOnlineStatus(status: string): void; static sendBuffer(dataChannel: RTCDataChannel, buffer: Buffer): void; static send(socketId: string, label: string, message: string | Buffer): void; static logError(err: any): void; static onDataChannelCreated(channel: RTCDataChannel, remoteSocketId: string): void; static receiveDataChromeFactory(callback: Function): (event: any) => void; static receiveDataFirefoxFactory(callback: Function): (event: any) => void; static setMediaStream(mediaStreams: MultiScaleMediaStream | null): Promise; static removeAllTracks(remoteSocketId: string): void; static getPeerStream(remoteSocketId: string): PeerDataChannel; static publishMyLocalMediaStream(remoteSocketId: string): Promise; static commonConfiguration(peerConn: RTCPeerConnection, remoteSocketId: string): Promise; static isMobile(): boolean; static assignSrc(htmlElement: any, mediaStream: any): void; static removeMuteAudio(audioElement: any): void; static audioHtmlConnectFun: Function | null; static setAudioHtmlConnectHook(external: Function): void; static connectStreamToHtmlElement(remoteSocketId: string, videoId?: number): void; static printMediaStream(stream: MediaStream | null): string; }