mirror of https://github.com/vector-im/riot-web
				
				
				
			Remove Element-specifc screen-sharing code out of the js-sdk
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>pull/21833/head
							parent
							
								
									4777da4da7
								
							
						
					
					
						commit
						7ae9f3d1ae
					
				|  | @ -49,6 +49,7 @@ import PerformanceMonitor from "../performance"; | |||
| import UIStore from "../stores/UIStore"; | ||||
| import { SetupEncryptionStore } from "../stores/SetupEncryptionStore"; | ||||
| import { RoomScrollStateStore } from "../stores/RoomScrollStateStore"; | ||||
| import { DesktopCapturerSource } from "matrix-js-sdk/src/webrtc/call"; | ||||
| 
 | ||||
| /* eslint-disable @typescript-eslint/naming-convention */ | ||||
| 
 | ||||
|  | @ -93,6 +94,20 @@ declare global { | |||
|         mxSetupEncryptionStore?: SetupEncryptionStore; | ||||
|         mxRoomScrollStateStore?: RoomScrollStateStore; | ||||
|         mxOnRecaptchaLoaded?: () => void; | ||||
|         electron?: Electron; | ||||
|     } | ||||
| 
 | ||||
|     interface GetSourcesOptions { | ||||
|         types: Array<string>; | ||||
|         thumbnailSize?: { | ||||
|             height: number; | ||||
|             width: number; | ||||
|         }; | ||||
|         fetchWindowIcons?: boolean; | ||||
|     } | ||||
| 
 | ||||
|     interface Electron { | ||||
|         getDesktopCapturerSources(options: GetSourcesOptions): Promise<Array<DesktopCapturerSource>>; | ||||
|     } | ||||
| 
 | ||||
|     interface Document { | ||||
|  |  | |||
|  | @ -20,10 +20,23 @@ import BaseDialog from "..//dialogs/BaseDialog"; | |||
| import DialogButtons from "./DialogButtons"; | ||||
| import classNames from 'classnames'; | ||||
| import AccessibleButton from './AccessibleButton'; | ||||
| import { getDesktopCapturerSources } from "matrix-js-sdk/src/webrtc/call"; | ||||
| import { replaceableComponent } from "../../../utils/replaceableComponent"; | ||||
| import TabbedView, { Tab, TabLocation } from '../../structures/TabbedView'; | ||||
| 
 | ||||
| export function getDesktopCapturerSources(): Promise<Array<DesktopCapturerSource>> { | ||||
|     const options: GetSourcesOptions = { | ||||
|         thumbnailSize: { | ||||
|             height: 176, | ||||
|             width: 312, | ||||
|         }, | ||||
|         types: [ | ||||
|             "screen", | ||||
|             "window", | ||||
|         ], | ||||
|     }; | ||||
|     return window.electron.getDesktopCapturerSources(options); | ||||
| } | ||||
| 
 | ||||
| export enum Tabs { | ||||
|     Screens = "screen", | ||||
|     Windows = "window", | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Šimon Brandner
						Šimon Brandner