--- title: CanvasCaptureMediaStreamTrack.canvas slug: Web/API/CanvasCaptureMediaStreamTrack/canvas tags: - 웹 - 캔버스 translation_of: Web/API/CanvasCaptureMediaStreamTrack/canvas ---
{{APIRef}}

The {{domxref("CanvasCaptureMediaStreamTrack")}} canvas읽기 전용 속성은 프레임이 캡쳐되는{{domxref("HTMLCanvasElement")}} 를 반환한다.

구문

var elt = stream.canvas;

캡처되는 프레임의 원본인 canvas를 나타내는 HTMLCanvasElement .

예시

// 캡처할 canvas 요소 찾기
var canvasElt = document.getElementsByTagName("canvas")[0];

// stream 얻기
var stream = canvasElt.captureStream(25); // 25 FPS

// stream 처리하기
...

// stream과 연결된 canvas 가져오기
var canvas = stream.canvas;

명세

명세 상태 내용
{{SpecName('Media Capture DOM Elements', '#dom-canvascapturemediastreamtrack-canvas', 'CanvasCaptureMediaStreamTrack.canvas')}} {{Spec2('Media Capture DOM Elements')}} Initial definition

브라우저 호환성

{{Compat("api.CanvasCaptureMediaStreamTrack.canvas")}}

더 보기