This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

MediaStreamTrack.kind

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨2017년 9월⁩.

MediaStreamTrack.kind 읽기 전용 속성은 트랙이 오디오인 경우 "audio", 비디오인 경우 "video"DOMString을 반환합니다. 트랙이 소스에서 분리된 경우엔 바뀌지 않습니다.

구문

js
const type = track.kind;

DOMString. 가능한 값은 다음과 같습니다.

  • "audio": 트랙이 오디오 트랙입니다.
  • "video": 트랙이 비디오 트랙입니다.

명세

Specification
Media Capture and Streams
# dom-mediastreamtrack-kind

브라우저 호환성

같이 보기