/** * Mock {@link TraceablePeerConnection} - add things as needed, but only things useful for all tests. */ export class MockPeerConnection { /** * Constructor. * * @param {string} id RTC id * @param {boolean} usesUnifiedPlan */ constructor(id: string, usesUnifiedPlan: boolean); id: string; _usesUnifiedPlan: boolean; peerconnection: MockRTCPeerConnection; /** * {@link TraceablePeerConnection.localDescription}. * * @returns {Object} */ get localDescription(): any; /** * {@link TraceablePeerConnection.remoteDescription}. * * @returns {Object} */ get remoteDescription(): any; /** * {@link TraceablePeerConnection.createAnswer}. * * @returns {Promise} */ createAnswer(): Promise; /** * Returns the list of the codecs negotiated. * @returns {Array} */ getConfiguredVideoCodecs(): Array; /** * {@link TraceablePeerConnection.processLocalSdpForTransceiverInfo}. * * @returns {void} */ processLocalSdpForTransceiverInfo(): void; /** * {@link TraceablePeerConnection.setLocalDescription}. * * @returns {Promise} */ setLocalDescription(): Promise; /** * {@link TraceablePeerConnection.setRemoteDescription}. * * @returns {Promise} */ setRemoteDescription(): Promise; /** * {@link TraceablePeerConnection.setSenderVideoConstraints}. */ setSenderVideoConstraints(): void; /** * {@link TraceablePeerConnection.setVideoTransferActive}. */ setVideoTransferActive(): boolean; /** * {@link TraceablePeerConnection.usesUnifiedPlan}. */ usesUnifiedPlan(): boolean; /** * {@link TraceablePeerConnection.getLocalVideoTracks}. */ getLocalVideoTracks(): any[]; } /** * Mock {@link RTC} - add things as needed, but only things useful for all tests. */ export class MockRTC { /** * {@link RTC.createPeerConnection}. * * @returns {MockPeerConnection} */ createPeerConnection(): MockPeerConnection; pc: MockPeerConnection; } /** * MockSignalingLayerImpl */ export class MockSignalingLayerImpl { _remoteSourceState: {}; /** * Returns the muted state, videoType and codec info received in presence. * @param {string} endpointId * @returns Object */ getPeerMediaInfo(endpointId: string): any; /** * Updates the media info for peer on join/leave. * @param {boolean} isJoin - whether endpoint is joining or leaving the call * @param {string} endpointId - endpoint id * @param {Array} codecList - new codec list published in presence * @param {string} codecType - legacy codec setting published in presence */ setPeerMediaInfo(isJoin: boolean, endpointId: string, codecList: Array, codecType: string): void; } /** * MockRTCPeerConnection that return the local description sdp. */ declare class MockRTCPeerConnection { /** * local description SDP. */ get localDescription(): { sdp: string; }; } export {};