mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
ElectronPlatform: Import desktopCapturer explicitly
This commit is contained in:
parent
44c0fb77da
commit
f79b8e0c71
@ -21,7 +21,7 @@ import VectorBasePlatform, {updateCheckStatusEnum} from './VectorBasePlatform';
|
|||||||
import dis from 'matrix-react-sdk/lib/dispatcher';
|
import dis from 'matrix-react-sdk/lib/dispatcher';
|
||||||
import { _t } from 'matrix-react-sdk/lib/languageHandler';
|
import { _t } from 'matrix-react-sdk/lib/languageHandler';
|
||||||
import Promise from 'bluebird';
|
import Promise from 'bluebird';
|
||||||
import electron, {remote, ipcRenderer} from 'electron';
|
import {remote, ipcRenderer, desktopCapturer} from 'electron';
|
||||||
import rageshake from '../rageshake';
|
import rageshake from '../rageshake';
|
||||||
|
|
||||||
remote.autoUpdater.on('update-downloaded', onUpdateDownloaded);
|
remote.autoUpdater.on('update-downloaded', onUpdateDownloaded);
|
||||||
@ -233,7 +233,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
|||||||
* 150px.
|
* 150px.
|
||||||
*/
|
*/
|
||||||
obtainDesktopStreams(callback, errorCallback, options = {}) {
|
obtainDesktopStreams(callback, errorCallback, options = {}) {
|
||||||
electron.desktopCapturer.getSources(options,
|
desktopCapturer.getSources(options,
|
||||||
(error, sources) => {
|
(error, sources) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
errorCallback(error);
|
errorCallback(error);
|
||||||
|
Loading…
Reference in New Issue
Block a user