Navigator.mediaDevices

읽기 속성인 Navigator.mediaDevices은 카메라나 마이크 및 화면 공유와 같이 연결된 미디어 입력 장치가 있다면, 그에 대한 접근 권한을 부여하는 MediaDevices 객체를 반환합니다. 

Syntax

var mediaDevices = navigator.mediaDevices;

반환 값

MediaDevices는 singleton 객체입니다 (* 여러번 호출되어도 객체는 하나만 생성). 보통 navigator.mediaDevices.getUserMedia()을 호출해서 미디어 장치 객체의 요소들을 바로 사용하게됩니다.

명세

명세 상태 코멘트
Media Capture and Streams
The definition of 'NavigatorUserMedia.mediaDevices' in that specification.
Candidate Recommendation Initial definition.

브라우저 호환성

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
mediaDevicesChrome Full support 51Edge Full support 12Firefox Full support 36IE Full support YesOpera No support NoSafari No support NoWebView Android Full support 51Chrome Android Full support 51Firefox Android Full support 36Opera Android No support NoSafari iOS No support NoSamsung Internet Android Full support Yes
Secure context requiredChrome Full support 74Edge No support NoFirefox Full support 69IE No support NoOpera No support NoSafari No support NoWebView Android Full support 74Chrome Android Full support 74Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown

참조