MediaStreamTrack.muted
MediaStreamTrack
인터페이스의 muted
읽기 전용 속성은 트랙이 현재 미디어 출력을 제공할 수 없는 상태인지를 나타내는 Boolean
을 반환합니다.
참고 :
사용자가 트랙을 음소거할 수 있는 기능을 구현하려면 enabled
속성을 사용하세요. enabled
를 false
로 바꿔 트랙을 비활성하면 빈 프레임(모든 샘플이 0인 오디오 프레임, 모든 픽셀이 검은색인 비디오 프레임)만 생성합니다.
구문
js
const mutedFlag = track.muted;
값
예제
다음 예제 코드는 MediaStreamTrack
배열에서 중단된 트랙의 수를 셉니다.
js
let mutedCount = 0;
trackList.forEach((track) => {
if (track.muted) {
mutedCount += 1;
}
});
명세
Specification |
---|
Media Capture and Streams # dom-mediastreamtrack-muted |
브라우저 호환성
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
muted |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Partial support
- Partial 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.