mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
standardized tabs & spaces
This commit is contained in:
Vendored
+127
-127
@@ -21,78 +21,78 @@
|
||||
// https://typescript.codeplex.com/workitem/1364
|
||||
|
||||
interface RTCConfiguration {
|
||||
iceServers: RTCIceServer[];
|
||||
iceServers: RTCIceServer[];
|
||||
}
|
||||
declare var RTCConfiguration: {
|
||||
prototype: RTCConfiguration;
|
||||
new (): RTCConfiguration;
|
||||
prototype: RTCConfiguration;
|
||||
new (): RTCConfiguration;
|
||||
}
|
||||
|
||||
interface RTCIceServer {
|
||||
url: string;
|
||||
credential?: string;
|
||||
url: string;
|
||||
credential?: string;
|
||||
}
|
||||
declare var RTCIceServer: {
|
||||
prototype: RTCIceServer;
|
||||
new (): RTCIceServer;
|
||||
prototype: RTCIceServer;
|
||||
new (): RTCIceServer;
|
||||
}
|
||||
|
||||
// moz (Firefox) specific prefixes.
|
||||
interface mozRTCPeerConnection extends RTCPeerConnection {
|
||||
}
|
||||
declare var mozRTCPeerConnection: {
|
||||
prototype: mozRTCPeerConnection;
|
||||
new (settings: RTCPeerConnectionConfig,
|
||||
constraints?:MediaConstraints): mozRTCPeerConnection;
|
||||
prototype: mozRTCPeerConnection;
|
||||
new (settings: RTCPeerConnectionConfig,
|
||||
constraints?:MediaConstraints): mozRTCPeerConnection;
|
||||
}
|
||||
// webkit (Chrome) specific prefixes.
|
||||
interface webkitRTCPeerConnection extends RTCPeerConnection {
|
||||
}
|
||||
declare var webkitRTCPeerConnection: {
|
||||
prototype: webkitRTCPeerConnection;
|
||||
new (settings: RTCPeerConnectionConfig,
|
||||
constraints?:MediaConstraints): webkitRTCPeerConnection;
|
||||
prototype: webkitRTCPeerConnection;
|
||||
new (settings: RTCPeerConnectionConfig,
|
||||
constraints?:MediaConstraints): webkitRTCPeerConnection;
|
||||
}
|
||||
|
||||
// For Chrome, look at the code here:
|
||||
// https://code.google.com/p/chromium/codesearch#chromium/src/third_party/libjingle/source/talk/app/webrtc/webrtcsession.cc&sq=package:chromium&dr=C&l=63
|
||||
interface OptionalMediaConstraint {
|
||||
// When true, will use DTLS/SCTP data channels
|
||||
DtlsSrtpKeyAgreement?: boolean;
|
||||
// When true will use Rtp-based data channels (depreicated)
|
||||
RtpDataChannels?: boolean;
|
||||
// When true, will use DTLS/SCTP data channels
|
||||
DtlsSrtpKeyAgreement?: boolean;
|
||||
// When true will use Rtp-based data channels (depreicated)
|
||||
RtpDataChannels?: boolean;
|
||||
}
|
||||
|
||||
// ks 12/20/12 - There's more here that doesn't seem to be documented very well yet.
|
||||
// http://www.w3.org/TR/2013/WD-webrtc-20130910/
|
||||
interface MediaConstraints {
|
||||
mandatory?: MediaOfferConstraints;
|
||||
optional?: OptionalMediaConstraint[]
|
||||
mandatory?: MediaOfferConstraints;
|
||||
optional?: OptionalMediaConstraint[]
|
||||
}
|
||||
|
||||
interface MediaOfferConstraints {
|
||||
OfferToReceiveAudio: boolean;
|
||||
OfferToReceiveVideo: boolean;
|
||||
OfferToReceiveAudio: boolean;
|
||||
OfferToReceiveVideo: boolean;
|
||||
}
|
||||
|
||||
interface RTCSessionDescriptionInit {
|
||||
type: string; // RTCSdpType; See TODO(1)
|
||||
sdp: string;
|
||||
type: string; // RTCSdpType; See TODO(1)
|
||||
sdp: string;
|
||||
}
|
||||
|
||||
interface RTCSessionDescription {
|
||||
type?: string; // RTCSdpType; See TODO(1)
|
||||
sdp?: string;
|
||||
type?: string; // RTCSdpType; See TODO(1)
|
||||
sdp?: string;
|
||||
}
|
||||
declare var RTCSessionDescription: {
|
||||
prototype: RTCSessionDescription;
|
||||
new (descriptionInitDict?: RTCSessionDescriptionInit): RTCSessionDescription;
|
||||
// TODO: Add serializer.
|
||||
// See: http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCSdpType)
|
||||
prototype: RTCSessionDescription;
|
||||
new (descriptionInitDict?: RTCSessionDescriptionInit): RTCSessionDescription;
|
||||
// TODO: Add serializer.
|
||||
// See: http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCSdpType)
|
||||
}
|
||||
|
||||
interface RTCDataChannelInit {
|
||||
ordered ?: boolean; // messages must be sent in-order.
|
||||
ordered ?: boolean; // messages must be sent in-order.
|
||||
maxPacketLifeTime ?: number; // unsigned short
|
||||
maxRetransmits ?: number; // unsigned short
|
||||
protocol ?: string; // default = ''
|
||||
@@ -109,89 +109,89 @@ declare enum RTCSdpType {
|
||||
}
|
||||
|
||||
interface RTCMessageEvent {
|
||||
// http://dev.w3.org/2011/webrtc/editor/webrtc.html#event-datachannel-message
|
||||
// At present, this can be an: ArrayBuffer, a string, or a Blob.
|
||||
// See TODO(2)
|
||||
data: any;
|
||||
// http://dev.w3.org/2011/webrtc/editor/webrtc.html#event-datachannel-message
|
||||
// At present, this can be an: ArrayBuffer, a string, or a Blob.
|
||||
// See TODO(2)
|
||||
data: any;
|
||||
}
|
||||
|
||||
// TODO(1)
|
||||
declare enum RTCDataChannelState {
|
||||
// http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCDataChannelState
|
||||
'connecting',
|
||||
'open',
|
||||
'closing',
|
||||
'closed'
|
||||
// http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCDataChannelState
|
||||
'connecting',
|
||||
'open',
|
||||
'closing',
|
||||
'closed'
|
||||
}
|
||||
|
||||
interface RTCDataChannel extends EventTarget {
|
||||
label: string;
|
||||
reliable: boolean;
|
||||
readyState: string; // RTCDataChannelState; see TODO(1)
|
||||
bufferedAmount: number;
|
||||
binaryType: string;
|
||||
label: string;
|
||||
reliable: boolean;
|
||||
readyState: string; // RTCDataChannelState; see TODO(1)
|
||||
bufferedAmount: number;
|
||||
binaryType: string;
|
||||
|
||||
onopen: (event: Event) => void;
|
||||
onerror: (event: Event) => void;
|
||||
onclose: (event: Event) => void;
|
||||
onmessage: (event: RTCMessageEvent) => void;
|
||||
onopen: (event: Event) => void;
|
||||
onerror: (event: Event) => void;
|
||||
onclose: (event: Event) => void;
|
||||
onmessage: (event: RTCMessageEvent) => void;
|
||||
|
||||
close(): void;
|
||||
close(): void;
|
||||
|
||||
send(data: string): void ;
|
||||
send(data: ArrayBuffer): void;
|
||||
send(data: ArrayBufferView): void;
|
||||
send(data: Blob): void;
|
||||
send(data: string): void ;
|
||||
send(data: ArrayBuffer): void;
|
||||
send(data: ArrayBufferView): void;
|
||||
send(data: Blob): void;
|
||||
}
|
||||
declare var RTCDataChannel: {
|
||||
prototype: RTCDataChannel;
|
||||
new (): RTCDataChannel;
|
||||
prototype: RTCDataChannel;
|
||||
new (): RTCDataChannel;
|
||||
}
|
||||
|
||||
interface RTCDataChannelEvent extends Event {
|
||||
channel: RTCDataChannel;
|
||||
channel: RTCDataChannel;
|
||||
}
|
||||
declare var RTCDataChannelEvent: {
|
||||
prototype: RTCDataChannelEvent;
|
||||
new (eventInitDict: RTCDataChannelEventInit): RTCDataChannelEvent;
|
||||
prototype: RTCDataChannelEvent;
|
||||
new (eventInitDict: RTCDataChannelEventInit): RTCDataChannelEvent;
|
||||
}
|
||||
|
||||
interface RTCIceCandidateEvent extends Event {
|
||||
candidate: RTCIceCandidate;
|
||||
candidate: RTCIceCandidate;
|
||||
}
|
||||
|
||||
interface RTCMediaStreamEvent extends Event {
|
||||
stream: MediaStream;
|
||||
stream: MediaStream;
|
||||
}
|
||||
|
||||
interface EventInit {
|
||||
}
|
||||
|
||||
interface RTCDataChannelEventInit extends EventInit {
|
||||
channel: RTCDataChannel;
|
||||
channel: RTCDataChannel;
|
||||
}
|
||||
|
||||
interface RTCVoidCallback {
|
||||
(): void;
|
||||
(): void;
|
||||
}
|
||||
interface RTCSessionDescriptionCallback {
|
||||
(sdp: RTCSessionDescription): void;
|
||||
(sdp: RTCSessionDescription): void;
|
||||
}
|
||||
interface RTCPeerConnectionErrorCallback {
|
||||
(errorInformation: DOMError): void;
|
||||
(errorInformation: DOMError): void;
|
||||
}
|
||||
|
||||
// TODO(1)
|
||||
declare enum RTCIceGatheringState {
|
||||
// http://dev.w3.org/2011/webrtc/editor/webrtc.html#rtcicegatheringstate-enum
|
||||
'new',
|
||||
'gathering',
|
||||
'complete'
|
||||
// http://dev.w3.org/2011/webrtc/editor/webrtc.html#rtcicegatheringstate-enum
|
||||
'new',
|
||||
'gathering',
|
||||
'complete'
|
||||
}
|
||||
|
||||
// TODO(1)
|
||||
declare enum RTCIceConnectionState {
|
||||
// http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCIceConnectionState
|
||||
// http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCIceConnectionState
|
||||
'new',
|
||||
'checking',
|
||||
'connected',
|
||||
@@ -213,84 +213,84 @@ declare enum RTCSignalingState {
|
||||
}
|
||||
|
||||
interface RTCPeerConnection {
|
||||
createOffer(successCallback: RTCSessionDescriptionCallback,
|
||||
failureCallback?: RTCPeerConnectionErrorCallback,
|
||||
constraints?: MediaConstraints): void;
|
||||
createAnswer(successCallback: RTCSessionDescriptionCallback,
|
||||
failureCallback?: RTCPeerConnectionErrorCallback,
|
||||
constraints?: MediaConstraints): void;
|
||||
setLocalDescription(description: RTCSessionDescription,
|
||||
successCallback?: RTCVoidCallback,
|
||||
failureCallback?: RTCPeerConnectionErrorCallback): void;
|
||||
localDescription: RTCSessionDescription;
|
||||
setRemoteDescription(description: RTCSessionDescription,
|
||||
successCallback?: RTCVoidCallback,
|
||||
failureCallback?: RTCPeerConnectionErrorCallback): void;
|
||||
remoteDescription: RTCSessionDescription;
|
||||
signalingState: string; // RTCSignalingState; see TODO(1)
|
||||
updateIce(configuration?: RTCConfiguration,
|
||||
constraints?: MediaConstraints): void;
|
||||
addIceCandidate(candidate: RTCIceCandidate): void;
|
||||
iceGatheringState: string; // RTCIceGatheringState; see TODO(1)
|
||||
iceConnectionState: string; // RTCIceConnectionState; see TODO(1)
|
||||
getLocalStreams(): MediaStream[];
|
||||
getRemoteStreams(): MediaStream[];
|
||||
createDataChannel(label?: string,
|
||||
dataChannelDict?: RTCDataChannelInit): RTCDataChannel;
|
||||
ondatachannel: (event: Event) => void;
|
||||
addStream(stream: MediaStream, constraints?: MediaConstraints): void;
|
||||
removeStream(stream: MediaStream): void;
|
||||
close(): void;
|
||||
onnegotiationneeded: (event: Event) => void;
|
||||
onconnecting: (event: Event) => void;
|
||||
onopen: (event: Event) => void;
|
||||
onaddstream: (event: RTCMediaStreamEvent) => void;
|
||||
onremovestream: (event: RTCMediaStreamEvent) => void;
|
||||
onstatechange: (event: Event) => void;
|
||||
onicechange: (event: Event) => void;
|
||||
onicecandidate: (event: RTCIceCandidateEvent) => void;
|
||||
onidentityresult: (event: Event) => void;
|
||||
onsignalingstatechange: (event: Event) => void;
|
||||
createOffer(successCallback: RTCSessionDescriptionCallback,
|
||||
failureCallback?: RTCPeerConnectionErrorCallback,
|
||||
constraints?: MediaConstraints): void;
|
||||
createAnswer(successCallback: RTCSessionDescriptionCallback,
|
||||
failureCallback?: RTCPeerConnectionErrorCallback,
|
||||
constraints?: MediaConstraints): void;
|
||||
setLocalDescription(description: RTCSessionDescription,
|
||||
successCallback?: RTCVoidCallback,
|
||||
failureCallback?: RTCPeerConnectionErrorCallback): void;
|
||||
localDescription: RTCSessionDescription;
|
||||
setRemoteDescription(description: RTCSessionDescription,
|
||||
successCallback?: RTCVoidCallback,
|
||||
failureCallback?: RTCPeerConnectionErrorCallback): void;
|
||||
remoteDescription: RTCSessionDescription;
|
||||
signalingState: string; // RTCSignalingState; see TODO(1)
|
||||
updateIce(configuration?: RTCConfiguration,
|
||||
constraints?: MediaConstraints): void;
|
||||
addIceCandidate(candidate: RTCIceCandidate): void;
|
||||
iceGatheringState: string; // RTCIceGatheringState; see TODO(1)
|
||||
iceConnectionState: string; // RTCIceConnectionState; see TODO(1)
|
||||
getLocalStreams(): MediaStream[];
|
||||
getRemoteStreams(): MediaStream[];
|
||||
createDataChannel(label?: string,
|
||||
dataChannelDict?: RTCDataChannelInit): RTCDataChannel;
|
||||
ondatachannel: (event: Event) => void;
|
||||
addStream(stream: MediaStream, constraints?: MediaConstraints): void;
|
||||
removeStream(stream: MediaStream): void;
|
||||
close(): void;
|
||||
onnegotiationneeded: (event: Event) => void;
|
||||
onconnecting: (event: Event) => void;
|
||||
onopen: (event: Event) => void;
|
||||
onaddstream: (event: RTCMediaStreamEvent) => void;
|
||||
onremovestream: (event: RTCMediaStreamEvent) => void;
|
||||
onstatechange: (event: Event) => void;
|
||||
onicechange: (event: Event) => void;
|
||||
onicecandidate: (event: RTCIceCandidateEvent) => void;
|
||||
onidentityresult: (event: Event) => void;
|
||||
onsignalingstatechange: (event: Event) => void;
|
||||
}
|
||||
declare var RTCPeerConnection: {
|
||||
prototype: RTCPeerConnection;
|
||||
new (configuration: RTCConfiguration,
|
||||
constraints?: MediaConstraints): RTCPeerConnection;
|
||||
prototype: RTCPeerConnection;
|
||||
new (configuration: RTCConfiguration,
|
||||
constraints?: MediaConstraints): RTCPeerConnection;
|
||||
}
|
||||
|
||||
interface RTCIceCandidate {
|
||||
candidate?: string;
|
||||
sdpMid?: string;
|
||||
sdpMLineIndex?: number;
|
||||
candidate?: string;
|
||||
sdpMid?: string;
|
||||
sdpMLineIndex?: number;
|
||||
}
|
||||
declare var RTCIceCandidate: {
|
||||
prototype: RTCIceCandidate;
|
||||
new (candidateInitDict?: RTCIceCandidate): RTCIceCandidate;
|
||||
prototype: RTCIceCandidate;
|
||||
new (candidateInitDict?: RTCIceCandidate): RTCIceCandidate;
|
||||
}
|
||||
|
||||
interface RTCIceCandidateInit {
|
||||
candidate: string;
|
||||
sdpMid: string;
|
||||
sdpMLineIndex: number;
|
||||
candidate: string;
|
||||
sdpMid: string;
|
||||
sdpMLineIndex: number;
|
||||
}
|
||||
declare var RTCIceCandidateInit:{
|
||||
prototype: RTCIceCandidateInit;
|
||||
new (): RTCIceCandidateInit;
|
||||
prototype: RTCIceCandidateInit;
|
||||
new (): RTCIceCandidateInit;
|
||||
}
|
||||
|
||||
interface PeerConnectionIceEvent {
|
||||
peer: RTCPeerConnection;
|
||||
candidate: RTCIceCandidate;
|
||||
peer: RTCPeerConnection;
|
||||
candidate: RTCIceCandidate;
|
||||
}
|
||||
declare var PeerConnectionIceEvent: {
|
||||
prototype: PeerConnectionIceEvent;
|
||||
new (): PeerConnectionIceEvent;
|
||||
prototype: PeerConnectionIceEvent;
|
||||
new (): PeerConnectionIceEvent;
|
||||
}
|
||||
|
||||
interface RTCPeerConnectionConfig {
|
||||
iceServers: RTCIceServer[];
|
||||
iceServers: RTCIceServer[];
|
||||
}
|
||||
declare var RTCPeerConnectionConfig: {
|
||||
prototype: RTCPeerConnectionConfig;
|
||||
new (): RTCPeerConnectionConfig;
|
||||
prototype: RTCPeerConnectionConfig;
|
||||
new (): RTCPeerConnectionConfig;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user