Skip to content

Commit

Permalink
fix: screenshot taking (#1418)
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
  • Loading branch information
hacdias authored Apr 17, 2020
1 parent dfd35e2 commit f606d3f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/webui/screenshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@ async function streamHandler (format, stream) {
async function screenshot (format) {
format = format || 'image/png'

const sources = await new Promise((resolve, reject) => {
desktopCapturer.getSources({ types: ['screen'] }, (error, sources) => {
if (error) return reject(error)
resolve(sources)
})
})

const sources = await desktopCapturer.getSources({ types: ['screen'] })
const output = []

for (const source of sources) {
Expand Down

0 comments on commit f606d3f

Please sign in to comment.