recursal/MDN huggingface dataset:
RTCOutboundRtpStreamStats: remoteId property
============================================

 The **`remoteId`** property of the
 `RTCOutboundRtpStreamStats` dictionary specifies the
 `id` of the `RTCRemoteInboundRtpStreamStats`
 object representing the remote peer's `RTCRtpReceiver` which is sending
 the media to the local peer for this SSRC.

Value
-----

 A string containing the ID of the
 `RTCRemoteInboundRtpStreamStats` object that represents the remote peer's
 `RTCRtpReceiver` for the synchronization source represented by this stats
 object.

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

| Specification |
| --- |
| Identifiers for WebRTC's Statistics API # dom-rtcoutboundrtpstreamstats-remoteid |

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

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

The **`type`** property of the `RTCOutboundRtpStreamStats` dictionary is a string with the value `"outbound-rtp"`.

 Different statistics are obtained by iterating the `RTCStatsReport` object returned by a call to `RTCPeerConnection.getStats()`.
 The type indicates the set of statistics available through the object in a particular iteration step.
 A value of `"outbound-rtp"` indicates that the statistics available in the current step are those defined in `RTCOutboundRtpStreamStats`.

Value
-----

A string with the value `"outbound-rtpp"`.

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

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

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

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

 The **`pliCount`** property of the
 `RTCOutboundRtpStreamStats` dictionary states the number of times the
 remote peer's `RTCRtpReceiver` sent a **Picture Loss
Indication** (**PLI**) packet to the `RTCRtpSender`
 for which this object provides statistics.

 A PLI packet indicates that some
 amount of encoded video data has been lost for one or more frames.

Value
-----

 An integer value indicating the number of times a PLI packet was sent to this sender by
 the remote peer's `RTCRtpReceiver`. These are sent by the receiver's
 decoder to notify the sender's encoder that an undefined amount of coded video data,
 which may span frame boundaries, has been lost.

**Note:** This property is only used for video streams.

Usage notes
-----------

 Upon receiving a PLI packet, the sender may have responded by sending a full frame to
 the remote peer to allow it to re-synchronize with the media. However, the primary
 purpose of a PLI packet is to allow the `RTCRtpSender` for which this
 `RTCOutboundRtpStreamStats` object provides statistics to consider techniques
 to mitigate network performance issues. This is often achieved by methods such as
 increasing the compression or lowering resolution, although the mechanisms available to
 reduce the bit rate of the stream vary from codec to codec.

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

#### No specification found

No specification data found for `api.RTCOutboundRtpStreamStats.pliCount`.  
Check for problems with this page or contribute a missing `spec_url` to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.

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

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

See also
--------

* RFC 4585, section 6.3.1: Definition of "PLI messages" in the document *Extended
RTP Profile for Real-time Transport Control Protocol (RTCP)-Based Feedback
(RTP/AVPF)*.
RTCOutboundRtpStreamStats: perDscpPacketsSent property
======================================================

 The **`perDscpPacketsSent`** property
 of the `RTCOutboundRtpStreamStats` dictionary is a record comprised of
 key/value pairs in which each key is a string representation of a Differentiated
 Services Code Point and the value is the number of packets sent for that DCSP.


**Note:** Not all operating systems make data available on a per-DSCP
 basis, so this property shouldn't be relied upon on those systems.


Value
-----

 A record comprised of string/value pairs. Each key is the string representation of a
 single Differentiated Services Code Point (DSCP)'s ID number.


**Note:** Due to network bleaching and remapping, the numbers seen on
 this record are not necessarily going to match the values as they were when the data
 was sent.


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

#### No specification found

No specification data found for `api.RTCOutboundRtpStreamStats.perDscpPacketsSent`.  
Check for problems with this page or contribute a missing `spec_url` to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.

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

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

See also
--------

* RFC 2474: The Differentiated Service field in IPv4 and IPv6 headers
RTCOutboundRtpStreamStats: trackId property
===========================================

The **`trackId`** property of the `RTCOutboundRtpStreamStats` dictionary indicates the `id` of the `RTCSenderAudioTrackAttachmentStats` or `RTCSenderVideoTrackAttachmentStats` object representing the `MediaStreamTrack` which is being sent on this stream.

Value
-----

A string containing the ID of the `RTCSenderAudioTrackAttachmentStats` or `RTCSenderVideoTrackAttachmentStats` object representing the track which is the source of the media being sent on this stream.

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

#### No specification found

No specification data found for `api.RTCOutboundRtpStreamStats.trackId`.  
Check for problems with this page or contribute a missing `spec_url` to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.

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

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

The **`id`** property of the `RTCOutboundRtpStreamStats` 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 `RTCOutboundRtpStreamStats` 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.
TouchEvent: changedTouches property
===================================

The **`changedTouches`** read-only property is a `TouchList` whose touch points (`Touch` objects) varies depending on the event type, as follows:

* For the `touchstart` event, it is a list of the touch points that became active with the current event.
* For the `touchmove` event, it is a list of the touch points that have changed since the last event.
* For the `touchend` event, it is a list of the touch points that have been removed from the surface (that is, the set of touch points corresponding to fingers no longer touching the surface).
Value
-----

A `TouchList` whose `Touch` objects include all the touch points that contributed to this touch event.

Examples
--------

This example illustrates the `TouchEvent` object's `TouchEvent.changedTouches` property. The `TouchEvent.changedTouches` property is a `TouchList` object that contains one `Touch` object for each touch point which contributed to the event.

In following code snippet, the `touchmove` event handler iterates through the `changedTouches` list and prints the identifier of each touch point that changed since the last event.


```js
someElement.addEventListener(
  "touchmove",
  (e) => {
    // Iterate through the list of touch points that changed
    // since the last event and print each touch point's identifier.
    for (let i = 0; i < e.changedTouches.length; i++) {
      console.log(
        `changedTouches[${i}].identifier = ${e.changedTouches[i].identifier}`,
      );
    }
  },
  false,
);
```

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

| Specification |
| --- |
| Touch Events # dom-touchevent-changedtouches |

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
TouchEvent: TouchEvent() constructor
====================================

The **`TouchEvent()`** constructor creates a new `TouchEvent` object.

**Note:** If you construct a synthetic event using this constructor, that event will not be *trusted*, for security reasons.
 Only browser-generated `TouchEvent` objects are trusted and only trusted events trigger default actions.


Syntax
------


```js
new TouchEvent(type)
new TouchEvent(type, options)
```

### Parameters

`type`

 A string with the name of the event.
 It is case-sensitive and browsers set it to `touchstart`, `touchend`, `touchmove`, `touchcancel`

`options` Optional

An object that, *in addition of the properties defined in `UIEvent()`*, can have the following properties:

`touches` Optional

A `TouchList`, defaulting to an empty one, that is a list of objects for every point of contact currently touching the surface.

`targetTouches` Optional

 A `TouchList`, defaulting to an empty one,, that is a list of objects for every point of contact that is touching the surface
 *and* started on the element that is the target of the current event.


`changedTouches` Optional

and defaulting to `[]`, of type `Touch[]`, that is a list of objects for every point of contact which contributed to the event.

`ctrlKey` Optional

A boolean value, defaulting to `false`, indicating if the `ctrl` key was simultaneously pressed.

`shiftKey` Optional

A boolean value, defaulting to `false`, indicating if the `shift` key was simultaneously pressed.

`altKey` Optional

A boolean value, defaulting to `false`, indicating if the `alt` key was simultaneously pressed.

`metaKey` Optional

A boolean value, defaulting to `false`, indicating if the `meta` key was simultaneously pressed.


### Return value

A new `TouchEvent` object.

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

| Specification |
| --- |
| Touch Events # dom-touchevent-constructor |

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

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

See also
--------

* `TouchEvent`, the interface of the objects it constructs.
TouchEvent: metaKey property
============================

The read-only **`metaKey`** property of the `TouchEvent` interface returns a boolean value indicating whether or not the `Meta` key is enabled when the touch event is created. If this key is enabled, the attribute's value is `true`. Otherwise, it is `false`.

This property is Read only .

**Note:** On Macintosh keyboards, this is the `⌘ Command` key. On Windows keyboards, this is the Windows key (`⊞`).

Value
-----

A boolean value that is `true` if the `Meta` key is enabled for this event; and `false` if the `Meta` is not enabled.

Examples
--------

The TouchEvent.altKey example includes an example of this property's usage.

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

| Specification |
| --- |
| Touch Events # dom-touchevent-metakey |

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

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

The read-only **`altKey`** property of the `TouchEvent` interface returns a boolean value indicating whether or not the `alt` (Alternate) key is enabled when the touch event is created. If the `alt` key is enabled, the attribute's value is `true`. Otherwise, it is `false`.

This property is Read only .

Value
-----

A boolean value that is `true` if the `alt` key is enabled for this event; and `false` if the `alt` is not enabled.

Examples
--------

This example illustrates how to access the `TouchEvent` key modifier properties: `TouchEvent.altKey`, `TouchEvent.ctrlKey`, `TouchEvent.metaKey` and `TouchEvent.shiftKey`.

In following code snippet, the `touchstart` event handler logs the state of the event's modifier keys.


```js
someElement.addEventListener(
  "touchstart",
  (e) => {
    // Log the state of this event's modifier keys
    console.log(`altKey = ${e.altKey}`);
    console.log(`ctrlKey = ${e.ctrlKey}`);
    console.log(`metaKey = ${e.metaKey}`);
    console.log(`shiftKey = ${e.shiftKey}`);
  },
  false,
);
```

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

| Specification |
| --- |
| Touch Events # dom-touchevent-altkey |

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

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

**`touches`** is a read-only `TouchList` listing
 all the `Touch` objects for touch points that are currently in contact
 with the touch surface, regardless of whether or not they've changed or what their
 target element was at `touchstart` time.

 You can think of it as how many separate fingers are able to be identified as touching
 the screen.


**Note:** Touches inside the array are not necessarily ordered by order of occurrences (the
 i-th element in the array being the i-th touch that happened). You cannot assume a specific order. To determine the order of occurrences of the touches, use the `touch` object IDs.


Value
-----

 A `TouchList` listing all the `Touch` objects for touch points that are still in contact with the touch surface, regardless of whether or not they've changed or what their target element was at `touchstart`
 time.

Examples
--------

 This example illustrates the `TouchEvent` object's
 `TouchEvent.touches` property. The `TouchEvent.touches`
 property is a `TouchList` object and containing a list of
 `Touch` objects for every point of contact currently touching the surface.

 In following code snippet, the `touchstart` event handler checks the length
 of the `TouchEvent.touches` list to determine the number of touch points
 that were activated and then invokes different handlers depending on the number of touch
 points.


```js
someElement.addEventListener(
  "touchstart",
  (e) => {
    // Invoke the appropriate handler depending on the
    // number of touch points.
    switch (e.touches.length) {
      case 1:
        handle\_one\_touch(e);
        break;
      case 2:
        handle\_two\_touches(e);
        break;
      case 3:
        handle\_three\_touches(e);
        break;
      default:
        console.log("Not supported");
        break;
    }
  },
  false,
);
```

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

| Specification |
| --- |
| Touch Events # dom-touchevent-touches |

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

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

The read-only **`shiftKey`** property of the `TouchEvent` interface returns a boolean value indicating whether or not the `shift` key is enabled when the touch event is created. If this key is enabled, the attribute's value is `true`. Otherwise, it is `false`.

Value
-----

The boolean value `true` if the `shift` key is enabled for this event; and `false` if the `shift` key is not enabled.

Examples
--------

The TouchEvent.altKey example includes an example of this property's usage.

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

| Specification |
| --- |
| Touch Events # dom-touchevent-shiftkey |

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

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

The read-only **`ctrlKey`** property of the `TouchEvent` interface returns a boolean value indicating whether the `control` (Control) key is enabled when the touch event is created. If this key is enabled, the attribute's value is `true`. Otherwise, it is `false`.

This property is Read only .

Value
-----

A boolean value that is `true` if the `control` key is enabled for this event; and `false` if the `control` is not enabled.

Examples
--------

The TouchEvent.altKey example includes an example of this property's usage.

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

| Specification |
| --- |
| Touch Events # dom-touchevent-ctrlkey |

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

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

The **`targetTouches`** read-only property is a `TouchList` listing all the `Touch` objects for touch points that are still in contact with the touch surface **and** whose `touchstart` event occurred inside the same target `element` as the current target element.

Value
-----

A `TouchList` listing all the `Touch` objects for touch points that are still in contact with the touch surface **and** whose `touchstart` event occurred inside the same target `element` as the current target element.

Examples
--------

This example illustrates the `TouchEvent` object's `TouchEvent.targetTouches` property. The `TouchEvent.targetTouches` property is a `TouchList` object that includes those TPs that are currently touching the surface *and* started on the element that is the target of the current event. As such, the `targetTouches` list is a strict subset of the `touches` list.

In following code snippet, the function compares the length of the `touches` list to the length of the `targetTouches` list and returns `true` if the lengths are the same and returns `false` otherwise.


```js
function touches\_in\_target(ev) {
  // Return true if all of the touches are within the target element;
  // otherwise return false.
  return ev.touches.length === ev.targetTouches.length;
}
```

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

| Specification |
| --- |
| Touch Events # dom-touchevent-targettouches |

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

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

**Experimental:** **This is an experimental technology**  
Check the Browser compatibility table carefully before using this in production.

The **`fixedFoveation`** property of the `XRProjectionLayer` interface is a number indicating the amount of foveation used by the XR compositor for the layer. Fixed Foveated Rendering (FFR) renders the edges of the eye textures at a lower resolution than the center and reduces the GPU load.

It is most useful for low-contrast textures such as background images, but less for high-contrast ones such as text or detailed images. Authors can adjust the level on a per-frame basis to achieve the best tradeoff between performance and visual quality.

Value
-----

A number between 0 and 1.

* The minimum amount of foveation is indicated by 0 (full resolution).
* The maximum amount of foveation is indicated by 1 (the edges render at lower resolution).

It's up to the user agent how to interpret the numbers in this range. When changing the foveation level, the effect will visible in the next `XRFrame`.

Note that some user agents might implement certain levels of foveation, so you might need to adjust the foveation level in large increments to see an effect. Example levels:

* `0`: no foveation
* `1/3`: low foveation
* `2/3`: medium foveation
* `1.0`: maximum foveation

Some devices don't support foveated rendering. In that case `fixedFoveation` is `null` and setting it will not do anything.

Examples
--------

### Dynamically setting the level of fixed foveation rendering

The `fixedFoveation` property allows you to set the level of foveation at runtime and for each frame. To set the maximum foveation for a given `XRProjectionLayer`, use a value of `1`.


```js
let glProjectionLayer = glBinding.createProjectionLayer(/\* … \*/);
glProjectionLayer.fixedFoveation = 1; // maximum foveation
```

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

| Specification |
| --- |
| WebXR Layers API Level 1 # dom-xrprojectionlayer-fixedfoveation |

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

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

See also
--------

* Foveated rendering
XRProjectionLayer: textureWidth property
========================================

**Experimental:** **This is an experimental technology**  
Check the Browser compatibility table carefully before using this in production.

The read-only **`textureWidth`** property of the `XRProjectionLayer` interface indicates the width in pixels of the color textures of this layer.

The projection layer's texture width is determined by the user agent or the device. It is reported in the `XRSubImage`, which can only be accessed inside the frame loop. If you want to manage your own depth buffers and don't want to wait for first frame after layer creation to determine the required dimensions for those buffers, the `textureWidth` property allows access to layer texture width outside the frame loop. Allocation of these buffers can happen directly after layer creation.

Value
-----

A number indicating the width in pixels.

Examples
--------

### Using `textureWidth`

The `textureWidth` of a layer is useful when creating render buffers for a layer. See also `WebGL2RenderingContext.renderbufferStorageMultisample()`.


```js
let glLayer = xrGLBinding.createProjectionLayer();

let color_rb = gl.createRenderbuffer();
gl.bindRenderbuffer(gl.RENDERBUFFER, color_rb);
gl.renderbufferStorageMultisample(
  gl.RENDERBUFFER,
  samples,
  gl.RGBA8,
  glLayer.textureWidth,
  glLayer.textureHeight,
);
```

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

| Specification |
| --- |
| WebXR Layers API Level 1 # dom-xrprojectionlayer-texturewidth |

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

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

See also
--------

* `XRWebGLBinding.createProjectionLayer()`
* `WebGL2RenderingContext.renderbufferStorageMultisample()`
* `XRSubImage`