recursal/MDN huggingface dataset:
RTCRemoteOutboundRtpStreamStats: id property
============================================

The **`id`** property of the `RTCRemoteOutboundRtpStreamStats` dictionary is a string that uniquely identifies the object for which this object provides statistics.

Using the `id`, you can correlate this statistics object with others, in order to monitor statistics over time for a given WebRTC object, such as an `RTCPeerConnection`, or an `RTCDataChannel`.

Value
-----

A string that uniquely identifies the object for which this `RTCRemoteOutboundRtpStreamStats` object provides statistics.

The format of the ID string is not defined by the specification, so you cannot reliably make any assumptions about the contents of the string, or assume that the format of the string will remain unchanged for a given object type.

Specifications
--------------

| Specification |
| --- |
| Identifiers for WebRTC's Statistics API # dom-rtcstats-id |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
RTCRemoteOutboundRtpStreamStats: remoteTimestamp property
=========================================================

 The `RTCRemoteOutboundRtpStreamStats` property **`remoteTimestamp`** indicates the timestamp on the remote peer at which these statistics were sent.
 This differs from `timestamp`, which indicates the time at which the statistics were generated or received locally.

Value
-----

 A `DOMHighResTimeStamp` value indicating the timestamp on the remote peer at which it sent these statistics.
 This is different from the value `timestamp`, which gives the time at which the statistics were generated or received by the local peer.

 If this property is present, it comes from the RTCP Sender Report (SR) block, which reflects the clock on the remote peer at the time the message was sent.
 Keep in mind that this means the clock may not be synchronized with the local clock, and that both the current time and the pace at which the clock runs may differ to some extent.

Specifications
--------------

| Specification |
| --- |
| Identifiers for WebRTC's Statistics API # dom-rtcremoteoutboundrtpstreamstats-remotetimestamp |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
RTCRemoteOutboundRtpStreamStats: ssrc property
==============================================

The **`ssrc`** property of the `RTCRemoteOutboundRtpStreamStats` dictionary provides the Synchronization Source (SSRC), an integer which uniquely identifies the source of the RTP packets whose statistics are covered by the `RTCStatsReport` that includes this `RTCRemoteOutboundRtpStreamStats` dictionary.

Value
-----

The Synchronization Source (SSRC) is a 32-bit integer uniquely identifying the source of the RTP packets whose statistics are covered by the `RTCStatsReport` object of which this `RTCRtpStreamStats` object is a component.

 The manner in which these values are generated is not mandated by the specification, although it does make recommendations.
 You should not make any assumptions based on the value of `ssrc` other than that any two objects with the same `ssrc` value refer to the same source.
 See RFC 3550, section 8 for additional information about `ssrc`.


**Note:** The specification includes an example that generates values for `ssrc` using MD5.
 While not part of the standard, exactly, it is a good mechanism that may be used by some browsers; others may use other methods, such as random number generators.
 *Do not* rely upon these values meaning anything other than "these objects are associated with the same source."


Specifications
--------------

| Specification |
| --- |
| Identifiers for WebRTC's Statistics API # dom-rtcrtpstreamstats-ssrc |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
RTCRemoteOutboundRtpStreamStats: kind property
==============================================

The **`kind`** property of the `RTCRemoteOutboundRtpStreamStats` dictionary is a string indicating whether the described RTP stream contains audio or video media.

Value
-----

The kinds is always one of:

`"audio"`

The track contains audio media.

`"video"`

The track contains video media.


 This string will always be the same as the one provided by the associated `MediaStreamTrack` object's `kind` property.
 It will also match the statistics object's `RTCCodecStats.codec` property's media type.

Specifications
--------------

| Specification |
| --- |
| Identifiers for WebRTC's Statistics API # dom-rtcrtpstreamstats-kind |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
SVGRect: x property
===================

The x property describes the horizontal coordinate of the position of the element.

Usage context
-------------

| Name | x |
| --- | --- |
| Value | <length> | <percentage> |
| Initial | 0 |
| Applies to | `<mask>`, 'svg', 'rect', 'image', 'foreignObject' |
| Inherited | no |
| Percentages | refer to the size of the current viewport (see Units) |
| Media | visual |
| Computed value | absolute length or percentage |
| Animatable | yes |

Simple usage
------------

A <coordinate> is a length in the user coordinate system that is the given distance from the origin of the user coordinate system along the relevant axis (the x-axis for X coordinates, the y-axis for Y coordinates). Its syntax is the same as that for <length>.


```html
<svg width="100" height="50" xmlns="http://www.w3.org/2000/svg">
  <rect x="10" y="0" width="40" height="40" fill="blue"></rect>
</svg>

<svg width="100" height="50" xmlns="http://www.w3.org/2000/svg">
  <rect x="40" y="0" width="40" height="40" fill="green"></rect>
</svg>
```
PictureInPictureWindow: width property
======================================

The read-only **`width`** property of the `PictureInPictureWindow` inbterface returns the width of the floating video window in pixels.

Syntax
------


```js
pictureInPictureWindow.width
```

### Value

An integer value indicating the width of the floating video window in pixels if the Picture-in-Picture window is open. Otherwise, it returns `0`.

Specifications
--------------

| Specification |
| --- |
| Picture-in-Picture # ref-for-dom-pictureinpicturewindow-width |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Picture-in-Picture API
* `PictureInPictureWindow.height`
PictureInPictureWindow: resize event
====================================

The **`resize`** event fires when the floating video window has been resized.

This event is not cancelable and does not bubble.

Syntax
------

Use the event name in methods like `addEventListener()`, or set an event handler property.


```js
addEventListener("resize", (event) => {});

onresize = (event) => {};
```

Event type
----------

A `PictureInPictureEvent`. Inherits from `Event`.

Event

PictureInPictureEventEvent properties
----------------

*In addition to the properties listed below, properties from the parent interface, `Event`, are available.*

`PictureInPictureEvent.pictureInPictureWindow`

Returns the `PictureInPictureWindow` that is resized.

Examples
--------

### Window size logger


```html
<p>Resize the floating video window to fire the <code>resize</code> event.</p>
<p>Window height: <span id="height"></span></p>
<p>Window width: <span id="width"></span></p>
<video id="video" src="" muted autoplay></video>
```



```js
const video = document.querySelector("#video");
const heightOutput = document.querySelector("#height");
const widthOutput = document.querySelector("#width");

function resize(evt) {
  heightOutput.textContent = evt.target.height;
  widthOutput.textContent = evt.target.width;
}

video.requestPictureInPicture().then((pictureInPictureWindow) => {
  pictureInPictureWindow.onresize = resize;
  // or
  pictureInPictureWindow.addEventListener("resize", resize);
});
```

Specifications
--------------

| Specification |
| --- |
| Picture-in-Picture # eventdef-pictureinpicturewindow-resize |
| Picture-in-Picture # dom-pictureinpicturewindow-onresize |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
PictureInPictureWindow: height property
=======================================

The read-only **`height`** property of the `PictureInPictureWindow` interface returns the height of the floating video window in pixels.

Syntax
------


```js
pictureInPictureWindow.height
```

### Value

An integer value indicating the height of the floating video window in pixels if the Picture-in-Picture window is open. Otherwise, it returns `0`.

Specifications
--------------

| Specification |
| --- |
| Picture-in-Picture # ref-for-dom-pictureinpicturewindow-height |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Picture-in-Picture API
* `PictureInPictureWindow.width`
PushManager: getSubscription() method
=====================================

The **`PushManager.getSubscription()`** method of the `PushManager` interface retrieves an existing push subscription.

It returns a `Promise` that resolves to a `PushSubscription` object containing details of an existing subscription. If no existing subscription exists, this resolves to a `null` value.

Syntax
------


```js
getSubscription()
```

### Parameters

None.

### Return value

A `Promise` that resolves to a `PushSubscription` object or `null`.

Examples
--------

This code snippet is taken from a push messaging and notification sample. (No live demo is available.)


```js
// We need the service worker registration to check for a subscription
navigator.serviceWorker.ready.then((serviceWorkerRegistration) => {
  // Do we already have a push message subscription?
  serviceWorkerRegistration.pushManager
    .getSubscription()
    .then((subscription) => {
      // Enable any UI which subscribes / unsubscribes from
      // push messages.
      const pushButton = document.querySelector(".js-push-button");
      pushButton.disabled = false;

      if (!subscription) {
        // We aren't subscribed to push, so set UI
        // to allow the user to enable push
        return;
      }

      // Keep your server in sync with the latest subscriptionId
      sendSubscriptionToServer(subscription);

      showCurlCommand(subscription);

      // Set your UI to show they have subscribed for
      // push messages
      pushButton.textContent = "Disable Push Messages";
      isPushEnabled = true;
    })
    .catch((err) => {
      console.error(`Error during getSubscription(): ${err}`);
    });
});
```

Specifications
--------------

| Specification |
| --- |
| Push API # dom-pushmanager-getsubscription |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
PushManager: register() method
==============================

**Deprecated:** This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

 The **`register`** method is used to ask the system to request
 a new endpoint for notifications.

**Note:** This method has been superseded by `PushManager.subscribe()`.

Syntax
------


```js
register()
```

### Parameters

None.

### Return value

A `DOMRequest` object to handle the success or failure of the method call.

 If the method call is successful, the request's `result` will be a string,
 which is the endpoint URL.


**Note:** if you do not need the URL any more, please use
 `PushManager.unregister()` to clean up after yourself.


Examples
--------


```js
const req = navigator.push.register();

req.onsuccess = (e) => {
  const endpoint = req.result;
  console.log(`New endpoint: ${endpoint}`);
};

req.onerror = (e) => {
  console.error(`Error getting a new endpoint: ${e.error}`);
};
```

Specifications
--------------

This feature is not part of any specification. It is no longer on track to become a standard.

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `PushManager`
PushManager: hasPermission() method
===================================

**Deprecated:** This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

The **`PushManager.hasPermission()`** method of the `PushManager` interface returns a `Promise` that resolves to the `PushPermissionStatus` of the requesting webapp, which will be one of `granted`, `denied`, or `default`.

**Note:** This feature has been superseded by the `PushManager.permissionState()` method.

Syntax
------


```js
hasPermission()
```

### Parameters

None.

### Return value

A `Promise` that resolves to the `PushPermissionStatus`.

Examples
--------


```js
// TBD
```

Specifications
--------------

This feature is not part of any specification anymore. It is no longer on track to become a standard.

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
PushManager: unregister() method
================================

**Deprecated:** This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

 The **`unregister()`** method was used to ask the system to
 unregister and delete the specified endpoint.

**Note:** In the updated API, a subscription can be unregistered via the `PushSubscription.unsubscribe()` method.

Syntax
------


```js
unregister(pushEndpoint)
```

### Parameters

`pushEndpoint`

A pushEndpoint to be unregistered.

### Return value

A `DOMRequest` object to handle the success or failure of the method call.

 If the method call is successful, the request's `result` will be a
 PushRegistration object representing the endpoint that has been
 unregistered.

### PushRegistration

Those objects are anonymous JavaScript objects with the following properties:

`pushEndpoint`

A string representing the URL of the unregistered endpoint.

`version`

`Undefined` when `unregister.onsuccess` is called.

Examples
--------


```js
const req = navigator.push.unregister(pushEndpoint);

req.onsuccess = (e) => {
  const endpoint = req.result;
  console.log(`Unregistered endpoint: ${endpoint}`);
};

req.onerror = (e) => {
  console.error(`Error unregistering the endpoint: ${e.error}`);
};
```

Specifications
--------------

This feature is not part of any specification anymore. It is no longer on track to become a standard.

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `PushManager`
PushManager: supportedContentEncodings static property
======================================================

 The **`supportedContentEncodings`** read-only static property of the
 `PushManager` interface returns an array of supported content codings that
 can be used to encrypt the payload of a push message.

Value
-----

An array of strings.

Specifications
--------------

| Specification |
| --- |
| Push API # dom-pushmanager-supportedcontentencodings |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
PushManager: registrations() method
===================================

**Deprecated:** This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

 The **`registrations`** method is used to ask the system about
 existing push endpoint registrations.

**Note:** This method has been superseded by the `PushManager.getSubscription()` method.

Syntax
------


```js
registrations()
```

### Parameters

None.

### Return value

A `DOMRequest` object to handle the success or failure of the method call.

 If the method call is successful, the request's `result` will be an array of
 PushRegistration objects.

### PushRegistration

Those objects are anonymous JavaScript objects with the following properties:

`pushEndpoint`

A string representing the URL of the endpoint.

`version`

The current version that the push endpoint is at.

Examples
--------


```js
const req = navigator.push.registrations();

req.onsuccess = (e) => {
  if (req.result.length > 0) {
    req.result.forEach((result) => {
      console.log(
        `Existing registration ${result.pushEndpoint} ${result.version}`,
      );
    });
    // Reuse existing endpoints.
  } else {
    // Register for a new endpoint.
    const register = navigator.push.register();
    register.onsuccess = (e) => {
      console.log(`Registered new endpoint: ${register.result}`);
    };
  }
};
```

Specifications
--------------

This feature is not part of any specification anymore. It is no longer on track to become a standard.

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `PushManager`
PushManager: permissionState() method
=====================================

 The **`permissionState()`** method of the
 `PushManager` interface returns a `Promise` that resolves to a
 string indicating the permission state of the push manager. Possible
 values are `'prompt'`, `'denied'`, or `'granted'`.


**Note:** As of Firefox 44, the permissions for Notifications and Push have been merged. If permission is
 granted for notifications, push will also be enabled.


Syntax
------


```js
permissionState()
permissionState(options)
```

### Parameters

`options` Optional

 An object containing optional configuration parameters. It can have the following
 properties:


`userVisibleOnly`

 A boolean indicating that the returned push
 subscription will only be used for messages whose effect is made visible to the
 user.


`applicationServerKey`

 A public key your push server will use to
 send messages to client apps via a push server. This value is part of a signing
 key pair generated by your application server and usable with elliptic curve
 digital signature (ECDSA) over the P-256 curve.



### Return value

 A `Promise` that resolves to a string with a value of
 `'prompt'`, `'denied'`, or `'granted'`.

Specifications
--------------

| Specification |
| --- |
| Push API # dom-pushmanager-permissionstate |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
RTCPeerConnection: sctp property
================================

 The read-only **`sctp`** property on the `RTCPeerConnection` interface returns an `RTCSctpTransport` describing the SCTP transport over which SCTP data is being sent and
 received.
 If SCTP hasn't been negotiated, this value is `null`.

The SCTP transport is used for transmitting and receiving data for any and all `RTCDataChannel`s on the peer connection.

Value
-----

A `RTCSctpTransport` object describing the SCTP transport being used by the `RTCPeerConnection` for transmitting and receiving on its data channels, or `null` if SCTP negotiation hasn't happened.

Example
-------


```js
const peerConnection = new RTCPeerConnection();

const channel = peerConnection.createDataChannel("Mydata");
channel.onopen = (event) => {
  channel.send("sending a message");
};
channel.onmessage = (event) => {
  console.log(event.data);
};

// Determine the largest message size that can be sent

const sctp = peerConnection.sctp;
const maxMessageSize = sctp.maxMessageSize;
```

Specifications
--------------

| Specification |
| --- |
| WebRTC: Real-Time Communication in Browsers # dom-rtcpeerconnection-sctp |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* WebRTC
* `RTCPeerConnection`
* `RTCDataChannel`
* SCTP
RTCPeerConnection: track event
==============================

The **`track`** event is sent to the `ontrack` event handler on `RTCPeerConnection`s after a new track has been added to an `RTCRtpReceiver` which is part of the connection.

By the time this event is delivered, the new track has been fully added to the peer connection. See Track event types for details.

This event is not cancellable and does not bubble.

Syntax
------

Use the event name in methods like `addEventListener()`, or set an event handler property.


```js
addEventListener("track", (event) => {});

ontrack = (event) => {};
```

Event type
----------

An `RTCTrackEvent`. Inherits from `Event`.

Event

RTCTrackEventEvent properties
----------------

*Since `RTCTrackEvent` is based on `Event`, its properties are also available.*

`receiver` Read only 

The `RTCRtpReceiver` used by the track that's been added to the `RTCPeerConnection`.

`streams` Read only  Optional

An array of `MediaStream` objects, each representing one of the media streams to which the added `track` belongs. By default, the array is empty, indicating a streamless track.

`track` Read only 

The `MediaStreamTrack` which has been added to the connection.

`transceiver` Read only 

The `RTCRtpTransceiver` being used by the new track.

Examples
--------

This example shows code that creates a new `RTCPeerConnection`, then adds a new `track` event handler.


```js
pc = new RTCPeerConnection({
  iceServers: [
    {
      urls: "turn:fake.turnserver.url",
      username: "someusername",
      credential: "somepassword",
    },
  ],
});

pc.addEventListener(
  "track",
  (e) => {
    videoElement.srcObject = e.streams[0];
    hangupButton.disabled = false;
  },
  false,
);
```


The event handler assigns the new track's first stream to an existing `<video>` element, identified using the variable `videoElement`.

You can also assign the event handler function to the `ontrack` property, rather than use `addEventListener()`.


```js
pc.ontrack = (e) => {
  videoElement.srcObject = e.streams[0];
  hangupButton.disabled = false;
  return false;
};
```

Specifications
--------------

| Specification |
| --- |
| WebRTC: Real-Time Communication in Browsers # event-track |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.