diff --git a/src/screenshareviewfacade/DefaultScreenShareViewFacade.ts b/src/screenshareviewfacade/DefaultScreenShareViewFacade.ts index 395a7f4262..e8c220d660 100644 --- a/src/screenshareviewfacade/DefaultScreenShareViewFacade.ts +++ b/src/screenshareviewfacade/DefaultScreenShareViewFacade.ts @@ -45,11 +45,7 @@ export default class DefaultScreenShareViewFacade implements ScreenShareViewFaca ); } - async open(): Promise {} - - async close(): Promise {} - - async start(element: HTMLDivElement): Promise { + async open(): Promise { const connectionRequest: ScreenViewingSessionConnectionRequest = new ScreenViewingSessionConnectionRequest( this.configuration.urls.screenViewingURL, this.configuration.urls.screenDataURL, @@ -57,12 +53,18 @@ export default class DefaultScreenShareViewFacade implements ScreenShareViewFaca this.configuration.screenViewingTimeoutMs ); await this.screenViewing.open(connectionRequest); + } + + async close(): Promise { + await this.screenViewing.close(); + } + + start(element: HTMLDivElement): void { return this.screenViewing.start(element); } - async stop(): Promise { + stop(): void { this.screenViewing.stop(); - await this.screenViewing.close(); } presentScaleToFit(): void { diff --git a/src/screenshareviewfacade/ScreenShareViewFacade.ts b/src/screenshareviewfacade/ScreenShareViewFacade.ts index 5937dfc3c5..34b2a483ef 100644 --- a/src/screenshareviewfacade/ScreenShareViewFacade.ts +++ b/src/screenshareviewfacade/ScreenShareViewFacade.ts @@ -6,15 +6,11 @@ import ScreenObserver from '../screenviewing/observer/ScreenObserver'; export default interface ScreenShareViewFacade { /** * Opens the connections, must be called after the ScreenShareViewFacade is constructed - * - * @deprecated Use start when the user wants to start viewing screen */ open(): Promise; /** * Closes screen viewing connection - * - * @deprecated Use stop when the user wants to stop viewing screen */ close(): Promise; @@ -22,12 +18,12 @@ export default interface ScreenShareViewFacade { * Starts viewing the screen share within an HTML element. Note that an * HTMLCanvas will be placed inside of this element. */ - start(element: HTMLDivElement): Promise; + start(element: HTMLDivElement): void; /** * Stops viewing the screen share. */ - stop(): Promise; + stop(): void; /** * Changes the presentation policy to scale-to-fit