diff options
Diffstat (limited to 'recipes/discord')
-rw-r--r-- | recipes/discord/package.json | 2 | ||||
-rw-r--r-- | recipes/discord/webview.js | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/recipes/discord/package.json b/recipes/discord/package.json index 7a2ec50..73a859c 100644 --- a/recipes/discord/package.json +++ b/recipes/discord/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "discord", | 2 | "id": "discord", |
3 | "name": "Discord", | 3 | "name": "Discord", |
4 | "version": "1.3.1", | 4 | "version": "1.4.0", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://discordapp.com/login", | 7 | "serviceURL": "https://discordapp.com/login", |
diff --git a/recipes/discord/webview.js b/recipes/discord/webview.js index 0559612..480329d 100644 --- a/recipes/discord/webview.js +++ b/recipes/discord/webview.js | |||
@@ -1,7 +1,5 @@ | |||
1 | // TODO: Some/most of this is already present in https://github.com/getferdi/ferdi/blob/develop/src/webview/screenshare.js#L5 | 1 | // TODO: Some/most of this is already present in https://github.com/getferdi/ferdi/blob/develop/src/webview/screenshare.js#L5 |
2 | 2 | ||
3 | const { desktopCapturer, remote: { BrowserWindow } } = require('electron'); | ||
4 | |||
5 | const _path = _interopRequireDefault(require('path')); | 3 | const _path = _interopRequireDefault(require('path')); |
6 | 4 | ||
7 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | 5 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
@@ -9,7 +7,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de | |||
9 | window.navigator.mediaDevices.getDisplayMedia = () => { | 7 | window.navigator.mediaDevices.getDisplayMedia = () => { |
10 | return new Promise(async (resolve, reject) => { | 8 | return new Promise(async (resolve, reject) => { |
11 | try { | 9 | try { |
12 | const sources = await desktopCapturer.getSources({ types: ['screen', 'window'] }); | 10 | const sources = await Ferdi.desktopCapturer.getSources({ types: ['screen', 'window'] }); |
13 | 11 | ||
14 | const selectionElem = document.createElement('div'); | 12 | const selectionElem = document.createElement('div'); |
15 | selectionElem.classList = 'desktop-capturer-selection'; | 13 | selectionElem.classList = 'desktop-capturer-selection'; |
@@ -99,7 +97,7 @@ module.exports = (Ferdi, settings) => { | |||
99 | event.stopPropagation(); | 97 | event.stopPropagation(); |
100 | 98 | ||
101 | if (url.includes('views/imgpsh_fullsize_anim')) { | 99 | if (url.includes('views/imgpsh_fullsize_anim')) { |
102 | let win = new BrowserWindow({ | 100 | let win = new Ferdi.BrowserWindow({ |
103 | width: 800, | 101 | width: 800, |
104 | height: window.innerHeight, | 102 | height: window.innerHeight, |
105 | minWidth: 600, | 103 | minWidth: 600, |