-
Notifications
You must be signed in to change notification settings - Fork 41
/
rtcstats.d.ts
52 lines (49 loc) · 2.46 KB
/
rtcstats.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
export type ondatachannelArgs = [number | null | string];
export type createDataChannelArgs = [string | RTCDataChannelInit | undefined ];
export type createOfferArgs = RTCOfferOptions | undefined;
export type createAnswerArgs = RTCOfferOptions | undefined;
export type addIceCandidateArgs = RTCIceCandidateInit | RTCIceCandidate
export type RTCStatsDataType = RTCConfiguration | RTCIceCandidate | RTCSignalingState | RTCIceConnectionState | RTCIceGatheringState |
RTCPeerConnectionState | undefined | ondatachannelArgs | string | RTCOfferOptions | undefined | createOfferArgs |
createAnswerArgs | RTCSessionDescriptionInit | addIceCandidateArgs | object;
declare module "rtcstats" {
/**
* Initializes the logging and statistics callback into the trace method for all noted methods
*
* @param trace - the Trace function which will be called for statistics that shall be logged
* @param getStatsIntervalmsec - the interval in which the statistics will be collected
* @param prefixesToWrap - the PeerConnection prefixes, set [""] if using the webrtc adapter
*
* methods - data object type
* create - RTCConfiguration
* onicecandidate - RTCIceCandidate
* onaddstream - string
* ontrack - string
* onremovestream - string
* onsignalingstatechange - RTCSignalingState
* oniceconnectionstatechange - RTCIceConnectionState
* icegatheringstatechange - RTCIceGatheringState
* connectionstatechange - RTCPeerConnectionState
* negotiationneeded - undefined
* ondatachannel - ondatachannelArgs
* getstats - object (browser dependend)
* createDataChannel - createDataChannelArgs
* close - undefined
* addStream - string
* removeStream - string
* addTrack - string
* removeTrack - string
* createOffer - createOfferArgs
* createAnswer - createAnswerArgs
* setLocalDescription - RTCSessionDescriptionInit
* setLocalDescriptionOnSuccess - undefined
* setLocalDescriptionOnFailure - string
* setRemoteDescription - RTCSessionDescriptionInit
* setRemoteDescriptionOnSuccess - undefined
* setRemoteDescriptionOnFailure - string
* addIceCandidate - addIceCandidateArgs
* addIceCandidateOnSuccess - undefined
* addIceCandidateOnFailure - string
*/
export default function anonymous(trace: (method: string, id: string, data: RTCStatsDataType) => void, getStatsIntervalmsec: number, prefixesToWrap: string[]): void;
}