MediaElementAudioSourceNode: mediaElement プロパティ

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.

MediaElementAudioSourceNode インターフェイスの読み取り専用プロパティ mediaElement は、このノードが音声を受け取る元の音声トラックを持つ HTMLMediaElement を示します。

このストリームは、MediaElementAudioSourceNode() コンストラクターまたは AudioContext.createMediaElementSource() メソッドのいずれかによりこのノードが最初に生成された時に指定されました。

このノードの音声の音源を持つ要素を表す HTMLMediaElement です。

js
const audioCtx = new window.AudioContext();
const audioElem = document.querySelector("audio");

let options = {
  mediaElement: audioElem,
};

let source = new MediaElementAudioSourceNode(audioCtx, options);
console.log(source.mediaElement);

仕様書

Specification
Web Audio API
# dom-mediaelementaudiosourcenode-mediaelement

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
mediaElement

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support