recursal/MDN huggingface dataset:
EncodedAudioChunk: EncodedAudioChunk() constructor
==================================================

Limited availability
--------------------

This feature is not Baseline because it does not work in some of the most widely-used browsers.

* Learn more
* See full compatibility
* Report feedback
**Experimental:** **This is an experimental technology**  
Check the Browser compatibility table carefully before using this in production.

The **`EncodedAudioChunk()`** constructor creates a new `EncodedAudioChunk` object representing a chunk of encoded audio.

Syntax
------


```js
new EncodedAudioChunk(options)
```

### Parameters

`options`

An object containing the following members:

`type`

Indicates if the chunk is a key chunk that does not rely on other frames for encoding. One of:

`"key"`

The data is a key chunk.

`"delta"`

The data is not a key chunk.


`timestamp`

An integer representing the timestamp of the audio in microseconds.

`duration`

An integer representing the length of the audio in microseconds.

`data`

An `ArrayBuffer`, a `TypedArray`, or a `DataView` containing the audio data.

`transfer`

An array of `ArrayBuffer`s that `EncodedAudioChunk` will detach and take ownership of. If the array contains the `ArrayBuffer` backing `data`, `EncodedAudioChunk` will use that buffer directly instead of copying from it.


Examples
--------

In the following example a new `EncodedAudioChunk` is created.


```js
const init = {
  type: "key",
  data: audioBuffer,
  timestamp: 23000000,
  duration: 2000000,
  transfer: [audioBuffer],
};
chunk = new EncodedAudioChunk(init);
```

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

| Specification |
| --- |
| WebCodecs # dom-encodedaudiochunk-encodedaudiochunk |

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

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

Limited availability
--------------------

This feature is not Baseline because it does not work in some of the most widely-used browsers.

* Learn more
* See full compatibility
* Report feedback
**Experimental:** **This is an experimental technology**  
Check the Browser compatibility table carefully before using this in production.

The **`byteLength`** read-only property of the `EncodedAudioChunk` interface returns the length in bytes of the encoded audio data.

Value
-----

An integer.

Examples
--------

In the following example the `byteLength` is printed to the console.


```js
const init = {
  type: "key",
  data: audioBuffer,
  timestamp: 23000000,
  duration: 2000000,
};
chunk = EncodedAudioChunk(init);

console.log(chunk.byteLength); //352800
```

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

| Specification |
| --- |
| WebCodecs # dom-encodedaudiochunk-bytelength |

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

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

Limited availability
--------------------

This feature is not Baseline because it does not work in some of the most widely-used browsers.

* Learn more
* See full compatibility
* Report feedback
**Experimental:** **This is an experimental technology**  
Check the Browser compatibility table carefully before using this in production.

The **`duration`** read-only property of the `EncodedAudioChunk` interface returns an integer indicating the duration of the audio in microseconds.

Value
-----

An integer.

Examples
--------

In the following example the `duration` is printed to the console.


```js
const init = {
  type: "key",
  data: audioBuffer,
  timestamp: 23000000,
  duration: 2000000,
};
chunk = EncodedAudioChunk(init);

console.log(chunk.duration); //2000000
```

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

| Specification |
| --- |
| WebCodecs # dom-encodedaudiochunk-duration |

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

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

**Secure context:** This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

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

 The **`write`** read-only property of the
 `BluetoothCharacteristicProperties` interface returns a
 `boolean` that is `true` if the writing to the characteristic with
 response is permitted.

Value
-----

A boolean value.

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

| Specification |
| --- |
| Web Bluetooth # dom-bluetoothcharacteristicproperties-write |

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

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

null
BluetoothCharacteristicProperties: authenticatedSignedWrites property
=====================================================================

**Secure context:** This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

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

 The **`authenticatedSignedWrites`** read-only
 property of the `BluetoothCharacteristicProperties` interface returns a
 `boolean` that is `true` if signed writing to the characteristic
 value is permitted.

Value
-----

A boolean value.

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

| Specification |
| --- |
| Web Bluetooth # dom-bluetoothcharacteristicproperties-authenticatedsignedwrites |

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

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

**Secure context:** This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

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

 The **`writeWithoutResponse`** read-only
 property of the `BluetoothCharacteristicProperties` interface returns a
 `boolean` that is `true` if the writing to the characteristic
 without response is permitted.

Value
-----

A boolean value.

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

| Specification |
| --- |
| Web Bluetooth # dom-bluetoothcharacteristicproperties-writewithoutresponse |

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

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

**Secure context:** This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

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

 The **`indicate`** read-only property of the
 `BluetoothCharacteristicProperties` interface returns a
 `boolean` that is `true` if indications of the characteristic
 value with acknowledgement is permitted.

Value
-----

A boolean value.

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

| Specification |
| --- |
| Web Bluetooth # dom-bluetoothcharacteristicproperties-indicate |

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

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

**Secure context:** This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

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

 The **`reliableWrite`** read-only property of
 the `BluetoothCharacteristicProperties` interface returns a
 `boolean` that is `true` if reliable writes to the characteristic
 is permitted.

Value
-----

A boolean value.

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

| Specification |
| --- |
| Web Bluetooth # dom-bluetoothcharacteristicproperties-reliablewrite |

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

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

**Secure context:** This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

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

 The **`read`** read-only property of the
 `BluetoothCharacteristicProperties` interface returns a
 `boolean` that is `true` if the reading of the characteristic
 value is permitted.

Value
-----

A boolean value.

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

| Specification |
| --- |
| Web Bluetooth # dom-bluetoothcharacteristicproperties-read |

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

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

**Secure context:** This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

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

 The **`writableAuxiliaries`** read-only
 property of the `BluetoothCharacteristicProperties` interface returns a
 `boolean` that is `true` if reliable writes to the characteristic
 descriptor is permitted.

Value
-----

A boolean value.

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

| Specification |
| --- |
| Web Bluetooth # dom-bluetoothcharacteristicproperties-writableauxiliaries |

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

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

**Secure context:** This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

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

 The **`broadcast`** read-only property of the
 `BluetoothCharacteristicProperties` interface returns a
 `boolean` that is `true` if the broadcast of the characteristic
 value is permitted using the Server Characteristic Configuration Descriptor.

Value
-----

A boolean value.

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

| Specification |
| --- |
| Web Bluetooth # dom-bluetoothcharacteristicproperties-broadcast |

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

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

**Secure context:** This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

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

 The **`notify`** read-only property of the
 `BluetoothCharacteristicProperties` interface returns a
 `boolean` that is `true` if notifications of the characteristic
 value without acknowledgement is permitted.

Value
-----

A boolean value.

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

| Specification |
| --- |
| Web Bluetooth # dom-bluetoothcharacteristicproperties-notify |

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

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

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

 The **`getBindGroupLayout()`** method of the
 `GPUComputePipeline` interface returns the pipeline's `GPUBindGroupLayout` object with the given index (i.e. included in the originating `GPUDevice.createComputePipeline()` or `GPUDevice.createComputePipelineAsync()` call's pipeline layout).

If the `GPUComputePipeline` was created with `layout: "auto"`, this method is the only way to retrieve the `GPUBindGroupLayout`s generated by the pipeline.

Syntax
------


```js
getBindGroupLayout(index)
```

### Parameters

`index`

A number representing the index of the `GPUBindGroupLayout` to return.

### Return value

A `GPUBindGroupLayout` object instance.

### Validation

The following criteria must be met when calling **`getBindGroupLayout()`**, otherwise a `GPUValidationError` is generated and an invalid `GPUBindGroupLayout` object is returned:

* `index` is less than the number of `GPUBindGroupLayout` objects used in the pipeline layout.
Examples
--------

**Note:** You can see complete working examples with `getBindGroupLayout()` in action in the WebGPU samples.


```js
// ...

// Create a compute pipeline using layout: "auto" to automatically generate
// appropriate bind group layouts
const computePipeline = device.createComputePipeline({
  layout: "auto",
  compute: {
    module: shaderModule,
    entryPoint: "main",
  },
});

// Create a bind group with the auto-generated layout from the compute pipeline
const computeBindGroup = device.createBindGroup({
  layout: computePipeline.getBindGroupLayout(0),
  entries: [
    {
      binding: 0,
      resource: { buffer: storageBuffer },
    },
  ],
});

// ...
```

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

| Specification |
| --- |
| WebGPU # dom-gpupipelinebase-getbindgrouplayout |

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

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

See also
--------

* The WebGPU API
GPUComputePipeline: label property
==================================

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

 The **`label`** property of the
 `GPUComputePipeline` interface provides a label that can be used to identify the object, for example in `GPUError` messages or console warnings.

This can be set by providing a `label` property in the descriptor object passed into the originating `GPUDevice.createComputePipeline()` or `GPUDevice.createComputePipelineAsync()` call, or you can get and set it directly on the `GPUComputePipeline` object.

Value
-----

A string. If this has not been previously set as described above, it will be an empty string.

Examples
--------

Setting and getting a label via `GPUComputePipeline.label`:


```js
// ...

const computePipeline = device.createComputePipeline({
  layout: device.createPipelineLayout({
    bindGroupLayouts: [bindGroupLayout],
  }),
  compute: {
    module: shaderModule,
    entryPoint: "main",
  },
});

computePipeline.label = "mycomputepipeline";

console.log(computePipeline.label); // "mycomputepipeline"
```


Setting a label via a `GPUDevice.createComputePipeline()` call, and then getting it via `GPUComputePipeline.label`:


```js
// ...

const computePipeline = device.createComputePipeline({
  layout: device.createPipelineLayout({
    bindGroupLayouts: [bindGroupLayout],
  }),
  compute: {
    module: shaderModule,
    entryPoint: "main",
  },
  label: "mycomputepipeline",
});

console.log(computePipeline.label); // "mycomputepipeline"
```

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

| Specification |
| --- |
| WebGPU # dom-gpuobjectbase-label |

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

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

See also
--------

* The WebGPU API
MediaTrackSettings: groupId property
====================================

 The `MediaTrackSettings` dictionary's
 **`groupId`** property is a browsing-session unique
 string which identifies the group of devices which includes the source
 for the `MediaStreamTrack`. This lets you determine what value was selected
 to comply with your specified constraints for this property's value as described in the
 `MediaTrackConstraints.groupId` property you provided when calling either
 `getUserMedia()`.

 If needed, you can determine whether or not this constraint is supported by checking
 the value of `MediaTrackSupportedConstraints.groupId` as returned by a call
 to `MediaDevices.getSupportedConstraints()`. However, typically this is
 unnecessary since browsers will ignore any constraints they're unfamiliar with.

 Because RTP doesn't include this information, tracks associated with a
 WebRTC `RTCPeerConnection`
 will never include this property.

Value
-----

 A string whose value is a browsing-session unique identifier for a
 group of devices which includes the source of the track's contents. Two devices share
 the same group ID if they belong to the same physical hardware device. For example, a
 headset has two devices on it: a microphone which can serve as a source for audio tracks
 and a speaker which can serve as an output for audio.

 The group ID is not usable across multiple browsing sessions. However, it can be used
 to ensure that audio input and output are both being performed on the same headset, for
 example, or to ensure that the built-in camera and microphone on a phone are being used
 for video conferencing purposes.

 The actual value of the string, however, is determined by the source of the track, and
 there is no guarantee what form it will take, although the specification does recommend
 it be a GUID.

 Since this property isn't stable across browsing sessions, its usefulness when calling
 `getUserMedia()` is generally limited to
 ensuring that tasks performed during the same browsing session use devices from the same
 group (or that they don't use devices from the same group). There is no situation in
 which the groupId is useful when calling `applyConstraints()`, since the
 value can't be changed.

Examples
--------

See the Constraint exerciser example.

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

| Specification |
| --- |
| Media Capture and Streams # dom-mediatracksettings-groupid |

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

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

See also
--------

* Media Capture and Streams API
* Capabilities, constraints, and settings
* `MediaTrackSettings.deviceId`
* `MediaTrackConstraints.groupId`
* `MediaTrackSettings`
MediaTrackSettings: latency property
====================================

 The `MediaTrackSettings` dictionary's
 **`latency`** property is a double-precision floating-point
 number indicating the estimated latency (specified in seconds) of the
 `MediaStreamTrack` as currently configured. This lets you determine what
 value was selected to comply with your specified constraints for this property's value
 as described in the `MediaTrackConstraints.latency` property you provided
 when calling either `getUserMedia()` or
 `MediaStreamTrack.applyConstraints()`.

 This is, of course, an approximation, since latency can vary for many reasons including
 CPU, transmission, and storage overhead.

 If needed, you can determine whether or not this constraint is supported by checking
 the value of `MediaTrackSupportedConstraints.latency` as returned by a call
 to `MediaDevices.getSupportedConstraints()`. However, typically this is
 unnecessary since browsers will ignore any constraints they're unfamiliar with.

 Because RTP doesn't include this information, tracks associated with a
 WebRTC `RTCPeerConnection`
 will never include this property.

Value
-----

 A double-precision floating-point number indicating the estimated latency, in seconds,
 of the audio track as currently configured.

Examples
--------

See the Constraint exerciser example.

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

| Specification |
| --- |
| Media Capture and Streams # dom-mediatracksettings-latency |

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

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

See also
--------

* Media Capture and Streams API
* Capabilities, constraints, and settings
* `MediaTrackConstraints.latency`
* `MediaTrackSettings`
MediaTrackSettings: channelCount property
=========================================

 The `MediaTrackSettings` dictionary's
 **`channelCount`** property is an integer indicating how many
 audio channels the `MediaStreamTrack` is currently configured to have. This
 lets you determine what value was selected to comply with your specified constraints for
 this property's value as described in the
 `MediaTrackConstraints.channelCount` property you provided when calling
 either `getUserMedia()` or
 `MediaStreamTrack.applyConstraints()`.

 If needed, you can determine whether or not this constraint is supported by checking
 the value of `MediaTrackSupportedConstraints.channelCount` as returned by a
 call to `MediaDevices.getSupportedConstraints()`. However, typically this
 is unnecessary since browsers will ignore any constraints they're unfamiliar with.

Value
-----

 An integer value indicating the number of audio channels on the track. A value of 1
 indicates monaural sound, 2 means stereo, and so forth.

Examples
--------

See the Constraint exerciser example.

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

| Specification |
| --- |
| Media Capture and Streams # dom-mediatracksettings-channelcount |

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

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

See also
--------

* Media Capture and Streams API
* Capabilities, constraints, and settings
* `MediaTrackConstraints.channelCount`
* `MediaTrackSettings`
MediaTrackSettings: frameRate property
======================================

 The `MediaTrackSettings` dictionary's
 **`frameRate`** property is a double-precision floating-point
 number indicating the frame rate, in frames per second, of the
 `MediaStreamTrack` as currently configured. This lets you determine what
 value was selected to comply with your specified constraints for this property's value
 as described in the `MediaTrackConstraints.frameRate` property you provided
 when calling either `getUserMedia()` or
 `MediaStreamTrack.applyConstraints()`.

 If needed, you can determine whether or not this constraint is supported by checking
 the value of `MediaTrackSupportedConstraints.frameRate` as returned by a
 call to `MediaDevices.getSupportedConstraints()`. However, typically this
 is unnecessary since browsers will ignore any constraints they're unfamiliar with.

Value
-----

 A double-precision floating-point number indicating the current configuration of the
 track's frame rate, in frames per second.

Examples
--------

See the Constraint exerciser example.

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

| Specification |
| --- |
| Media Capture and Streams # dom-mediatracksettings-framerate |

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

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

See also
--------

* Media Capture and Streams API
* Capabilities, constraints, and settings
* `MediaTrackConstraints.frameRate`
* `MediaTrackSettings`