GainNode: gain プロパティ
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since April 2021.
GainNode
インターフェイスの gain
プロパティは、適用するゲインを表す a-rate の AudioParam
です。
値
AudioParam
です。
メモ:
返される AudioParam
は読み取り専用ですが、それが表す値は読み取り専用ではありません。
例
BaseAudioContext.createGain()
に、AudioContext
を用いて GainNode
を作成し、その gain
プロパティの値を変えることで音声を消音したり消音解除したりするサンプルコードがあります。
仕様書
Specification |
---|
Web Audio API # dom-gainnode-gain |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
gain |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.