Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions api-outline.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ interface RtcManualIceController {
undefined gatherHostCandidates();

// Gathers srflx candidates.
Promise<undefined> gatherSrflxCandidates(IceServer iceServer);
Promise<undefined> gatherSrflxCandidates(IceServerInit iceServer);
// Sends a STUN ping to the IceServer used to discover this candidate, used
// to keep the candidate (NAT binding) alive. Returns a boolean indicating
// whether a successful STUN response was received or not.
Expand All @@ -99,13 +99,13 @@ interface RtcManualIceController {
Promise<boolean> refreshSrflxCandidate(LocalIceCandidate localCandidate);

// Gathers relay candidates.
Promise<undefined> gatherRelayCandidates(IceServer server, unsigned long requestedLifetimeInSeconds);
Promise<undefined> gatherRelayCandidates(IceServerInit server, unsigned long requestedLifetimeInSeconds);
// Sends a STUN packet with a LIFETIME attribute included, used to extend the
// TURN allocation. Returns the actual lifetime granted by the server.
Promise<unsigned long> refreshRelayCandidate(LocalIceCandidate relayCandidate, unsigned long requestedLifetimeInSeconds);

// Creates an IceCandidatePair that represents a possible network route.
IceCandidatePair createCandidatePair(LocalIceCandidate local, RemoteIceCandidate remote);
IceCandidatePair createCandidatePair(LocalIceCandidate local, RemoteIceCandidateInit remote);

// Probes the candidate pair to check if it's (still) viable and what the RTT is.
Promise<IceProbeResult> probeCandidatePair(IceCandidatePair candidatePair);
Expand Down Expand Up @@ -136,7 +136,7 @@ An automatic ICE controller API
interface RtcAutomaticIceController {
undefined gatherCandidates(sequence<IceServer> servers);

undefined AddRemoteCandidate(RemoteIceCandidate remoteCandidate);
undefined AddRemoteCandidate(RemoteIceCandidateInit remoteCandidate);

// Triggers when a local candidate has been found (IceCandidateGatheredEvent).
attribute EventHandler oncandidategathered;
Expand Down Expand Up @@ -214,12 +214,19 @@ dictionary RtcPacketReceived {
Various ICE related helper types

```javascript
dictionary IceServer {
dictionary IceServerInit {
required DOMString url;
required DOMString username;
required DOMString credentials;
};

[Exposed=Window,Worker]
interface IceServer {
readonly attribute DOMString url;
readonly attribute DOMString username;
readonly attribute DOMString password;
};

enum IceCandidateType {
"host",
"srflx",
Expand All @@ -237,7 +244,17 @@ interface LocalIceCandidate {
readonly attribute unsigned short networkCost;
};

dictionary RemoteIceCandidate {
[Exposed=Window,Worker]
interface RemoteIceCandidate {
readonly attribute DOMString ufrag;
readonly attribute DOMString pwd;
readonly attribute DOMString address;
readonly attribute unsigned short port;
readonly attribute IceCandidateType type;
readonly attribute unsigned short networkCost;
};

dictionary RemoteIceCandidateInit {
required DOMString ufrag;
required DOMString pwd;
required DOMString address;
Expand Down
77 changes: 63 additions & 14 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,11 @@ Issue: Should there be any validation of the fingerprints? Is there a particular
[Exposed=(Window,Worker)]
interface RtcManualIceController {
undefined gatherHostCandidates();
Promise&lt;undefined&gt; gatherSrflxCandidates(IceServer iceServer);
Promise&lt;undefined&gt; gatherSrflxCandidates(IceServerInit iceServer);
Promise&lt;boolean&gt; refreshSrflxCandidate(LocalIceCandidate localCandidate);
Promise&lt;undefined&gt; gatherRelayCandidates(IceServer server, unsigned long requestedLifetimeInSeconds);
Promise&lt;undefined&gt; gatherRelayCandidates(IceServerInit server, unsigned long requestedLifetimeInSeconds);
Promise&lt;unsigned long&gt; refreshRelayCandidate(LocalIceCandidate relayCandidate, unsigned long requestedLifetimeInSeconds);
IceCandidatePair createCandidatePair(LocalIceCandidate local, RemoteIceCandidate remote);
IceCandidatePair createCandidatePair(LocalIceCandidate local, RemoteIceCandidateInit remote);
Promise&lt;IceProbeResult&gt; probeCandidatePair(IceCandidatePair candidatePair);
attribute EventHandler oncandidategathered;
attribute EventHandler oncandidateremoved;
Expand Down Expand Up @@ -862,19 +862,36 @@ dictionary RtcPacketReceived {

## IceServer ## {#iceserver}
<pre class="idl">
dictionary IceServer {
dictionary IceServerInit {
required DOMString url;
DOMString username;
DOMString credentials;
};
</pre>
: <dfn for="IceServer" dict-member>url</dfn>
: <dfn for="IceServerInit" dict-member>url</dfn>
:: The URL of the ICE server.

: <dfn for="IceServer" dict-member>username</dfn>
: <dfn for="IceServerInit" dict-member>username</dfn>
:: The username used for credential verification.

: <dfn for="IceServer" dict-member>credentials</dfn>
: <dfn for="IceServerInit" dict-member>credentials</dfn>
:: The credentials for authentication.

<pre class="idl">
[Exposed=(Window,Worker)]
interface IceServer {
readonly attribute DOMString url;
readonly attribute DOMString username;
readonly attribute DOMString credentials;
};
</pre>
: <dfn for="IceServer" attribute>url</dfn>
:: The URL of the ICE server.

: <dfn for="IceServer" attribute>username</dfn>
:: The username used for credential verification.

: <dfn for="IceServer" attribute>credentials</dfn>
:: The credentials for authentication.

## IceCandidateType ## {#icecandidatetype}
Expand Down Expand Up @@ -971,7 +988,37 @@ When a new {{LocalIceCandidate}} object is created, the user agent MUST run the

## RemoteIceCandidate ## {#remoteicecandidate}
<pre class="idl">
dictionary RemoteIceCandidate {
[Exposed=(Window,Worker)]
interface RemoteIceCandidate {
readonly attribute DOMString ufrag;
readonly attribute DOMString pwd;
readonly attribute DOMString address;
readonly attribute unsigned short port;
readonly attribute IceCandidateType type;
readonly attribute unsigned short networkCost;
};
</pre>
: <dfn for="RemoteIceCandidate" attribute>ufrag</dfn>
:: Remote ICE user fragment.

: <dfn for="RemoteIceCandidate" attribute>pwd</dfn>
:: Remote ICE password.

: <dfn for="RemoteIceCandidate" attribute>address</dfn>
:: Remote IP Address of the candidate.

: <dfn for="RemoteIceCandidate" attribute>port</dfn>
:: Remote Port of the candidate.

: <dfn for="RemoteIceCandidate" attribute>type</dfn>
:: The remote candidate type.

: <dfn for="RemoteIceCandidate" attribute>networkCost</dfn>
:: The remote costs associated with network route utilization.

<pre class="idl">
[Exposed=(Window,Worker)]
dictionary RemoteIceCandidateInit {
required DOMString ufrag;
required DOMString pwd;
required DOMString address;
Expand All @@ -980,22 +1027,24 @@ dictionary RemoteIceCandidate {
unsigned short networkCost;
};
</pre>
: <dfn for="RemoteIceCandidate" dict-member>ufrag</dfn>


: <dfn for="RemoteIceCandidateInit" dict-member>ufrag</dfn>
:: Remote ICE user fragment.

: <dfn for="RemoteIceCandidate" dict-member>pwd</dfn>
: <dfn for="RemoteIceCandidateInit" dict-member>pwd</dfn>
:: Remote ICE password.

: <dfn for="RemoteIceCandidate" dict-member>address</dfn>
: <dfn for="RemoteIceCandidateInit" dict-member>address</dfn>
:: Remote IP Address of the candidate.

: <dfn for="RemoteIceCandidate" dict-member>port</dfn>
: <dfn for="RemoteIceCandidateInit" dict-member>port</dfn>
:: Remote Port of the candidate.

: <dfn for="RemoteIceCandidate" dict-member>type</dfn>
: <dfn for="RemoteIceCandidateInit" dict-member>type</dfn>
:: The remote candidate type.

: <dfn for="RemoteIceCandidate" dict-member>networkCost</dfn>
: <dfn for="RemoteIceCandidateInit" dict-member>networkCost</dfn>
:: The remote costs associated with network route utilization.

## IceCandidatePair ## {#icecandidatepair-section}
Expand Down
Loading