Skip to content

Commit 18b38c7

Browse files
author
John Riordan
committed
SessionDescriptionHander documentation
1 parent 83fa78a commit 18b38c7

File tree

61 files changed

+1637
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1637
-1
lines changed

docs/api/sip.js.sessiondelegate.md

+1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ export interface SessionDelegate
2222
| [onMessage(message)](./sip.js.sessiondelegate.onmessage.md) | Called upon receiving an incoming in dialog MESSAGE request. |
2323
| [onNotify(notification)](./sip.js.sessiondelegate.onnotify.md) | Called upon receiving an incoming in dialog NOTIFY request. |
2424
| [onRefer(referral)](./sip.js.sessiondelegate.onrefer.md) | Called upon receiving an incoming in dialog REFER request. |
25+
| [onSessionDescriptionHandler(sessionDescriptionHandler, provisional)](./sip.js.sessiondelegate.onsessiondescriptionhandler.md) | Called upon creating a SessionDescriptionHandler. |
2526

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [sip.js](./sip.js.md) &gt; [SessionDelegate](./sip.js.sessiondelegate.md) &gt; [onSessionDescriptionHandler](./sip.js.sessiondelegate.onsessiondescriptionhandler.md)
4+
5+
## SessionDelegate.onSessionDescriptionHandler() method
6+
7+
Called upon creating a SessionDescriptionHandler.
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
onSessionDescriptionHandler?(sessionDescriptionHandler: SessionDescriptionHandler, provisional: boolean): void;
13+
```
14+
15+
## Parameters
16+
17+
| Parameter | Type | Description |
18+
| --- | --- | --- |
19+
| sessionDescriptionHandler | <code>SessionDescriptionHandler</code> | The handler. |
20+
| provisional | <code>boolean</code> | True if created provisionally. |
21+
22+
<b>Returns:</b>
23+
24+
`void`
25+
26+
## Remarks
27+
28+
It's recommended that the SessionDescriptionHandler be accessed via the `Session.sessionDescriptionHandler` property. However there are use cases where one needs access immediately after it is constructed and before it is utilized. Thus this callback.
29+
30+
In most scenarios a single SessionDescriptionHandler will be created per Session in which case this callback will be called at most once and `provisional` will be `false`<!-- -->.
31+
32+
However if reliable provisional responses are being supported and an INVITE is sent without SDP, one or more session description handlers will be created if remote offers are received in reliable provisional responses. When remote offers are received in reliable provisional responses, the `provisional` parameter will be `true`<!-- -->. When the `provisional` paramter is `true`<!-- -->, this callback may (or may not) be called again. If the session is ultimately established using a SessionDescriptionHandler which was not created provisionally, this callback will be called again and the `provisional` parameter will be `false`<!-- -->. If the session is ultimately established using a SessionDescriptionHandler which was created provisionally, this callback will not be called again. Note that if the session is ultimately established using a SessionDescriptionHandler which was created provisionally, the provisional SessionDescriptionHandler being utilized will be available via the `Session.sessionDescriptionHandler` property.
33+
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md)
4+
5+
## API Reference
6+
7+
## Packages
8+
9+
| Package | Description |
10+
| --- | --- |
11+
| [sip.js](./sip.js.md) | A SessionDescriptionHandler for web browsers. |
12+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [sip.js](./sip.js.md) &gt; [defaultMediaStreamFactory](./sip.js.defaultmediastreamfactory.md)
4+
5+
## defaultMediaStreamFactory() function
6+
7+
Function which returns a MediaStreamFactory.
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
export declare function defaultMediaStreamFactory(): MediaStreamFactory;
13+
```
14+
<b>Returns:</b>
15+
16+
`MediaStreamFactory`
17+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [sip.js](./sip.js.md) &gt; [defaultPeerConnectionConfiguration](./sip.js.defaultpeerconnectionconfiguration.md)
4+
5+
## defaultPeerConnectionConfiguration() function
6+
7+
Function which returns an RTCConfiguration.
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
export declare function defaultPeerConnectionConfiguration(): RTCConfiguration;
13+
```
14+
<b>Returns:</b>
15+
16+
`RTCConfiguration`
17+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [sip.js](./sip.js.md) &gt; [defaultSessionDescriptionHandlerFactory](./sip.js.defaultsessiondescriptionhandlerfactory.md)
4+
5+
## defaultSessionDescriptionHandlerFactory() function
6+
7+
Function which returns a SessionDescriptionHandlerFactory.
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
export declare function defaultSessionDescriptionHandlerFactory(mediaStreamFactory?: (constraints: MediaStreamConstraints, sessionDescriptionHandler: SessionDescriptionHandler) => Promise<MediaStream>): SessionDescriptionHandlerFactory;
13+
```
14+
15+
## Parameters
16+
17+
| Parameter | Type | Description |
18+
| --- | --- | --- |
19+
| mediaStreamFactory | <code>(constraints: MediaStreamConstraints, sessionDescriptionHandler: SessionDescriptionHandler) =&gt; Promise&lt;MediaStream&gt;</code> | MediaStream factory. |
20+
21+
<b>Returns:</b>
22+
23+
`SessionDescriptionHandlerFactory`
24+
25+
## Remarks
26+
27+
See [defaultPeerConnectionConfiguration()](./sip.js.defaultpeerconnectionconfiguration.md) for the default peer connection configuration. The ICE gathering timeout defaults to 5000ms.
28+
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [sip.js](./sip.js.md)
4+
5+
## sip.js package
6+
7+
A SessionDescriptionHandler for web browsers.
8+
9+
## Classes
10+
11+
| Class | Description |
12+
| --- | --- |
13+
| [SessionDescriptionHandler](./sip.js.sessiondescriptionhandler.md) | A base class implementing a WebRTC session description handler for sip.js. |
14+
15+
## Functions
16+
17+
| Function | Description |
18+
| --- | --- |
19+
| [defaultMediaStreamFactory()](./sip.js.defaultmediastreamfactory.md) | Function which returns a MediaStreamFactory. |
20+
| [defaultPeerConnectionConfiguration()](./sip.js.defaultpeerconnectionconfiguration.md) | Function which returns an RTCConfiguration. |
21+
| [defaultSessionDescriptionHandlerFactory(mediaStreamFactory)](./sip.js.defaultsessiondescriptionhandlerfactory.md) | Function which returns a SessionDescriptionHandlerFactory. |
22+
23+
## Interfaces
24+
25+
| Interface | Description |
26+
| --- | --- |
27+
| [PeerConnectionDelegate](./sip.js.peerconnectiondelegate.md) | Delegate to handle PeerConnection state changes. |
28+
| [SessionDescriptionHandlerConfiguration](./sip.js.sessiondescriptionhandlerconfiguration.md) | Configuration for SessionDescriptionHandler. |
29+
| [SessionDescriptionHandlerFactory](./sip.js.sessiondescriptionhandlerfactory.md) | Factory for [SessionDescriptionHandler](./sip.js.sessiondescriptionhandler.md)<!-- -->. |
30+
| [SessionDescriptionHandlerOptions](./sip.js.sessiondescriptionhandleroptions.md) | Options for [SessionDescriptionHandler](./sip.js.sessiondescriptionhandler.md)<!-- -->. |
31+
32+
## Type Aliases
33+
34+
| Type Alias | Description |
35+
| --- | --- |
36+
| [MediaStreamFactory](./sip.js.mediastreamfactory.md) | Interface of factory function which produces a MediaStream. |
37+
| [SessionDescriptionHandlerFactoryOptions](./sip.js.sessiondescriptionhandlerfactoryoptions.md) | Options for SessionDescriptionHandlerFactory. |
38+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [sip.js](./sip.js.md) &gt; [MediaStreamFactory](./sip.js.mediastreamfactory.md)
4+
5+
## MediaStreamFactory type
6+
7+
Interface of factory function which produces a MediaStream.
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
export declare type MediaStreamFactory = (constraints: MediaStreamConstraints, sessionDescriptionHandler: SessionDescriptionHandler) => Promise<MediaStream>;
13+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [sip.js](./sip.js.md) &gt; [PeerConnectionDelegate](./sip.js.peerconnectiondelegate.md)
4+
5+
## PeerConnectionDelegate interface
6+
7+
Delegate to handle PeerConnection state changes.
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
export interface PeerConnectionDelegate
13+
```
14+
15+
## Methods
16+
17+
| Method | Description |
18+
| --- | --- |
19+
| [onconnectionstatechange(event)](./sip.js.peerconnectiondelegate.onconnectionstatechange.md) | This happens whenever the aggregate state of the connection changes. The aggregate state is a combination of the states of all of the individual network transports being used by the connection. |
20+
| [ondatachannel(event)](./sip.js.peerconnectiondelegate.ondatachannel.md) | Triggered when an RTCDataChannel is added to the connection by the remote peer calling createDataChannel(). |
21+
| [onicecandidate(event)](./sip.js.peerconnectiondelegate.onicecandidate.md) | Triggered when a new ICE candidate has been found. |
22+
| [onicecandidateerror(event)](./sip.js.peerconnectiondelegate.onicecandidateerror.md) | Triggered when an error occurred during ICE candidate gathering. |
23+
| [oniceconnectionstatechange(event)](./sip.js.peerconnectiondelegate.oniceconnectionstatechange.md) | This happens whenever the local ICE agent needs to deliver a message to the other peer through the signaling server. This lets the ICE agent perform negotiation with the remote peer without the browser itself needing to know any specifics about the technology being used for signalingTriggered when the IceConnectionState changes. |
24+
| [onicegatheringstatechange(event)](./sip.js.peerconnectiondelegate.onicegatheringstatechange.md) | Triggered when the ICE gathering state changes. |
25+
| [onnegotiationneeded(event)](./sip.js.peerconnectiondelegate.onnegotiationneeded.md) | Triggered when renegotiation is necessary. |
26+
| [onsignalingstatechange(event)](./sip.js.peerconnectiondelegate.onsignalingstatechange.md) | Triggered when the SignalingState changes. |
27+
| [onstatsended(event)](./sip.js.peerconnectiondelegate.onstatsended.md) | Triggered when when a statistics object being monitored is deleted. |
28+
| [ontrack(event)](./sip.js.peerconnectiondelegate.ontrack.md) | Triggered when a new track is signaled by the remote peer, as a result of setRemoteDescription. |
29+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [sip.js](./sip.js.md) &gt; [PeerConnectionDelegate](./sip.js.peerconnectiondelegate.md) &gt; [onconnectionstatechange](./sip.js.peerconnectiondelegate.onconnectionstatechange.md)
4+
5+
## PeerConnectionDelegate.onconnectionstatechange() method
6+
7+
This happens whenever the aggregate state of the connection changes. The aggregate state is a combination of the states of all of the individual network transports being used by the connection.
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
onconnectionstatechange?(event: Event): void;
13+
```
14+
15+
## Parameters
16+
17+
| Parameter | Type | Description |
18+
| --- | --- | --- |
19+
| event | <code>Event</code> | Event. |
20+
21+
<b>Returns:</b>
22+
23+
`void`
24+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [sip.js](./sip.js.md) &gt; [PeerConnectionDelegate](./sip.js.peerconnectiondelegate.md) &gt; [ondatachannel](./sip.js.peerconnectiondelegate.ondatachannel.md)
4+
5+
## PeerConnectionDelegate.ondatachannel() method
6+
7+
Triggered when an RTCDataChannel is added to the connection by the remote peer calling createDataChannel().
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
ondatachannel?(event: RTCDataChannelEvent): void;
13+
```
14+
15+
## Parameters
16+
17+
| Parameter | Type | Description |
18+
| --- | --- | --- |
19+
| event | <code>RTCDataChannelEvent</code> | RTCDataChannelEvent. |
20+
21+
<b>Returns:</b>
22+
23+
`void`
24+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [sip.js](./sip.js.md) &gt; [PeerConnectionDelegate](./sip.js.peerconnectiondelegate.md) &gt; [onicecandidate](./sip.js.peerconnectiondelegate.onicecandidate.md)
4+
5+
## PeerConnectionDelegate.onicecandidate() method
6+
7+
Triggered when a new ICE candidate has been found.
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
onicecandidate?(event: RTCPeerConnectionIceEvent): void;
13+
```
14+
15+
## Parameters
16+
17+
| Parameter | Type | Description |
18+
| --- | --- | --- |
19+
| event | <code>RTCPeerConnectionIceEvent</code> | RTCPeerConnectionIceEvent. |
20+
21+
<b>Returns:</b>
22+
23+
`void`
24+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [sip.js](./sip.js.md) &gt; [PeerConnectionDelegate](./sip.js.peerconnectiondelegate.md) &gt; [onicecandidateerror](./sip.js.peerconnectiondelegate.onicecandidateerror.md)
4+
5+
## PeerConnectionDelegate.onicecandidateerror() method
6+
7+
Triggered when an error occurred during ICE candidate gathering.
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
onicecandidateerror?(event: RTCPeerConnectionIceErrorEvent): void;
13+
```
14+
15+
## Parameters
16+
17+
| Parameter | Type | Description |
18+
| --- | --- | --- |
19+
| event | <code>RTCPeerConnectionIceErrorEvent</code> | RTCPeerConnectionIceErrorEvent. |
20+
21+
<b>Returns:</b>
22+
23+
`void`
24+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [sip.js](./sip.js.md) &gt; [PeerConnectionDelegate](./sip.js.peerconnectiondelegate.md) &gt; [oniceconnectionstatechange](./sip.js.peerconnectiondelegate.oniceconnectionstatechange.md)
4+
5+
## PeerConnectionDelegate.oniceconnectionstatechange() method
6+
7+
This happens whenever the local ICE agent needs to deliver a message to the other peer through the signaling server. This lets the ICE agent perform negotiation with the remote peer without the browser itself needing to know any specifics about the technology being used for signalingTriggered when the IceConnectionState changes.
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
oniceconnectionstatechange?(event: Event): void;
13+
```
14+
15+
## Parameters
16+
17+
| Parameter | Type | Description |
18+
| --- | --- | --- |
19+
| event | <code>Event</code> | Event. |
20+
21+
<b>Returns:</b>
22+
23+
`void`
24+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [sip.js](./sip.js.md) &gt; [PeerConnectionDelegate](./sip.js.peerconnectiondelegate.md) &gt; [onicegatheringstatechange](./sip.js.peerconnectiondelegate.onicegatheringstatechange.md)
4+
5+
## PeerConnectionDelegate.onicegatheringstatechange() method
6+
7+
Triggered when the ICE gathering state changes.
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
onicegatheringstatechange?(event: Event): void;
13+
```
14+
15+
## Parameters
16+
17+
| Parameter | Type | Description |
18+
| --- | --- | --- |
19+
| event | <code>Event</code> | Event. |
20+
21+
<b>Returns:</b>
22+
23+
`void`
24+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [sip.js](./sip.js.md) &gt; [PeerConnectionDelegate](./sip.js.peerconnectiondelegate.md) &gt; [onnegotiationneeded](./sip.js.peerconnectiondelegate.onnegotiationneeded.md)
4+
5+
## PeerConnectionDelegate.onnegotiationneeded() method
6+
7+
Triggered when renegotiation is necessary.
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
onnegotiationneeded?(event: Event): void;
13+
```
14+
15+
## Parameters
16+
17+
| Parameter | Type | Description |
18+
| --- | --- | --- |
19+
| event | <code>Event</code> | Event. |
20+
21+
<b>Returns:</b>
22+
23+
`void`
24+

0 commit comments

Comments
 (0)