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
๋ฐ์ํ
'๐ฅ๏ธํ๋ก ํธ์๋ > Electron.js' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
์ผ๋ ํธ๋ก - ๋ถํธ์คํธ๋ฉ(bootstrap) ์ ์ฉ (0) | 2022.11.01 |
---|---|
Electron - Preload์์ npm ๋ชจ๋ ์ฌ์ฉํ๊ธฐ (0) | 2022.10.31 |
Electron - loadURL๋ก ๋ฌธ์ ๋ถ๋ฌ์จ ํ์ ์๋ฐ์คํฌ๋ฆฝํธ ์คํ (0) | 2022.04.01 |
Electron - ๋ ๋๋ฌ๊ฐ ๋ฉ์ธ์๊ฒ ์ ํธ ๋ณด๋ด๊ธฐ(ipcMain & ipcRenderer) (0) | 2022.03.28 |
Electron - Tray ์์ฑ ๋ฐ ํด๋ฆญ ์ด๋ฒคํธ, Tray ์์ด์ฝ ๋ณ๊ฒฝ (0) | 2022.03.28 |