[TIL] WebRTC 사용법

서민지·2021년 12월 28일
0

https://surprisecomputer.tistory.com/7?category=909008
https://webrtc.org/getting-started/media-devices#using-promises
https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices
https://www.youtube.com/watch?v=ktJkNL2gZ2I

우선, WebRTC 가이드에 따라서 미디어 기기 시작하기

(사각사각 116번째 라인과 비교하기. 시작 open 은 이렇게 하면 될듯)
navigator.mediaDevices.getUserMedia({'video': true, 'audio' : true})
.then(stream => {
	console.log(stream);
})
.catch(error => {
	console.error(error);
});
profile
Do what I want for no regret

0개의 댓글