forked from Ivasoft/mattermost-mobile
* move to latest react-native-webrtc release * make this version of rtcpeer as close as possible to Call's version * remove need for destroyCb * upgrade webrtc * continue merge * upgrade webrtc * new linting rules
30 lines
1.1 KiB
TypeScript
30 lines
1.1 KiB
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {EventOnCandidate, EventOnConnectionStateChange, RTCIceCandidate} from 'react-native-webrtc';
|
|
import RTCTrackEvent from 'react-native-webrtc/lib/typescript/RTCTrackEvent';
|
|
|
|
// Only adding the types that are not included in the imported module.
|
|
declare module 'react-native-webrtc' {
|
|
export type RTCIceCredentialType = 'password';
|
|
|
|
export interface RTCIceServer {
|
|
credential?: string;
|
|
credentialType?: RTCIceCredentialType;
|
|
urls: string | string[];
|
|
username?: string;
|
|
}
|
|
|
|
export interface RTCPeerConnectionIceEvent extends Event {
|
|
readonly candidate: RTCIceCandidate | null;
|
|
}
|
|
|
|
export class RTCPeerConnection {
|
|
onconnectionstatechange?: ((event: Event) => void) | null;
|
|
onnegotiationneeded?: (() => void | Promise<void>) | null;
|
|
onicecandidate?: ((event: EventOnCandidate) => void) | null;
|
|
oniceconnectionstatechange?: ((event: EventOnConnectionStateChange) => void) | null;
|
|
ontrack?: ((event: RTCTrackEvent) => void) | null;
|
|
}
|
|
}
|