Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. MediaTrackConstraints
  4. sampleRate

MediaTrackConstraints: sampleRate property

Limited availability

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

TheMediaTrackConstraints dictionary'ssampleRate property is aConstrainULongdescribing the requested or mandatory constraints placed upon the value of thesampleRate constrainable property.

If needed, you can determine whether or not this constraint is supported by checkingthe value ofMediaTrackSupportedConstraints.sampleRate as returned by acall toMediaDevices.getSupportedConstraints(). However, typically thisis unnecessary since browsers will ignore any constraints they're unfamiliar with.

Value

If this value is a number, the user agent will attempt to obtain media whose samplerate is as close as possible to this number given the capabilities of the hardware andthe other constraints specified. Otherwise, the value of thisConstrainULong will guide the user agent in its efforts to provide anexact match to the required sample rate (ifexact is specified or bothmin andmax are provided and have the same value) or to abest-possible value.

Examples

See theConstraint exerciser example.

Specifications

Specification
Media Capture and Streams
# dom-mediatrackconstraintset-samplerate

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp