🖥️프론트엔드/Electron.js
일렉트론 - 사용자로부터 웹 캠, 마이크 가져오기
Janger
2022. 11. 7. 15:54
728x90
웹 캠, 마이크 가져오기
window.addEventListener('DOMContentLoaded', () => {
navigator.getUserMedia({video: true, audio: true}, (localMediaStream) => {
var video = document.querySelector('video')
video.srcObject = localMediaStream
video.autoplay = true
}, (e) => {})
})
참고:
[웹 캠 가져오기]
https://stackoverflow.com/questions/38276409/electron-allowing-access-to-webcam
electron - allowing access to webcam
In orden to use webcam from my electron app I installed webcamjs node module, this is the code I've used, taken from module docs: <h1>camara</h1> <div id="my_camera" style="width:3...
stackoverflow.com
[데스크톱 캡처]
https://www.electronjs.org/docs/latest/api/desktop-capturer
desktopCapturer | Electron
Access information about media sources that can be used to capture audio and video from the desktop using the navigator.mediaDevices.getUserMedia API.
www.electronjs.org
728x90