๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ–ฅ๏ธํ”„๋ก ํŠธ์—”๋“œ/Electron.js

์ผ๋ ‰ํŠธ๋ก  - ์‚ฌ์šฉ์ž๋กœ๋ถ€ํ„ฐ ์›น ์บ , ๋งˆ์ดํฌ ๊ฐ€์ ธ์˜ค๊ธฐ

by Janger 2022. 11. 7.
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
๋ฐ˜์‘ํ˜•