This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -288,6 +288,10 @@ export default abstract class BasePlatform {
288288 return false ;
289289 }
290290
291+ public supportsJitsiScreensharing ( ) : boolean {
292+ return true ;
293+ }
294+
291295 public overrideBrowserShortcuts ( ) : boolean {
292296 return false ;
293297 }
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import { CallType } from "matrix-js-sdk/src/webrtc/call";
2626import { randomString , randomLowercaseString , randomUppercaseString } from "matrix-js-sdk/src/randomstring" ;
2727
2828import { MatrixClientPeg } from '../MatrixClientPeg' ;
29+ import PlatformPeg from '../PlatformPeg' ;
2930import SdkConfig from "../SdkConfig" ;
3031import dis from '../dispatcher/dispatcher' ;
3132import WidgetEchoStore from '../stores/WidgetEchoStore' ;
@@ -510,6 +511,7 @@ export default class WidgetUtils {
510511 'roomId=$matrix_room_id' ,
511512 'theme=$theme' ,
512513 'roomName=$roomName' ,
514+ `supportsScreensharing=${ PlatformPeg . get ( ) . supportsJitsiScreensharing ( ) } ` ,
513515 ] ;
514516 if ( opts . auth ) {
515517 queryStringParts . push ( `auth=${ opts . auth } ` ) ;
Original file line number Diff line number Diff line change @@ -19,20 +19,24 @@ import { MatrixClient } from "matrix-js-sdk/src/matrix";
1919import { IDevice } from "matrix-js-sdk/src/crypto/deviceinfo" ;
2020import { RoomType } from "matrix-js-sdk/src/@types/event" ;
2121
22- import { stubClient , setupAsyncStoreWithClient } from "./test-utils" ;
22+ import { stubClient , setupAsyncStoreWithClient , mockPlatformPeg } from "./test-utils" ;
2323import { MatrixClientPeg } from "../src/MatrixClientPeg" ;
2424import WidgetStore from "../src/stores/WidgetStore" ;
2525import WidgetUtils from "../src/utils/WidgetUtils" ;
2626import { VIDEO_CHANNEL_MEMBER } from "../src/utils/VideoChannelUtils" ;
2727import createRoom , { canEncryptToAllUsers } from '../src/createRoom' ;
2828
2929describe ( "createRoom" , ( ) => {
30+ mockPlatformPeg ( ) ;
31+
3032 let client : MatrixClient ;
3133 beforeEach ( ( ) => {
3234 stubClient ( ) ;
3335 client = MatrixClientPeg . get ( ) ;
3436 } ) ;
3537
38+ afterEach ( ( ) => jest . clearAllMocks ( ) ) ;
39+
3640 it ( "sets up video rooms correctly" , async ( ) => {
3741 setupAsyncStoreWithClient ( WidgetStore . instance , client ) ;
3842 jest . spyOn ( WidgetUtils , "waitForRoomWidget" ) . mockResolvedValue ( ) ;
You can’t perform that action at this time.
0 commit comments