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 {
288
288
return false ;
289
289
}
290
290
291
+ public supportsJitsiScreensharing ( ) : boolean {
292
+ return true ;
293
+ }
294
+
291
295
public overrideBrowserShortcuts ( ) : boolean {
292
296
return false ;
293
297
}
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import { CallType } from "matrix-js-sdk/src/webrtc/call";
26
26
import { randomString , randomLowercaseString , randomUppercaseString } from "matrix-js-sdk/src/randomstring" ;
27
27
28
28
import { MatrixClientPeg } from '../MatrixClientPeg' ;
29
+ import PlatformPeg from '../PlatformPeg' ;
29
30
import SdkConfig from "../SdkConfig" ;
30
31
import dis from '../dispatcher/dispatcher' ;
31
32
import WidgetEchoStore from '../stores/WidgetEchoStore' ;
@@ -510,6 +511,7 @@ export default class WidgetUtils {
510
511
'roomId=$matrix_room_id' ,
511
512
'theme=$theme' ,
512
513
'roomName=$roomName' ,
514
+ `supportsScreensharing=${ PlatformPeg . get ( ) . supportsJitsiScreensharing ( ) } ` ,
513
515
] ;
514
516
if ( opts . auth ) {
515
517
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";
19
19
import { IDevice } from "matrix-js-sdk/src/crypto/deviceinfo" ;
20
20
import { RoomType } from "matrix-js-sdk/src/@types/event" ;
21
21
22
- import { stubClient , setupAsyncStoreWithClient } from "./test-utils" ;
22
+ import { stubClient , setupAsyncStoreWithClient , mockPlatformPeg } from "./test-utils" ;
23
23
import { MatrixClientPeg } from "../src/MatrixClientPeg" ;
24
24
import WidgetStore from "../src/stores/WidgetStore" ;
25
25
import WidgetUtils from "../src/utils/WidgetUtils" ;
26
26
import { VIDEO_CHANNEL_MEMBER } from "../src/utils/VideoChannelUtils" ;
27
27
import createRoom , { canEncryptToAllUsers } from '../src/createRoom' ;
28
28
29
29
describe ( "createRoom" , ( ) => {
30
+ mockPlatformPeg ( ) ;
31
+
30
32
let client : MatrixClient ;
31
33
beforeEach ( ( ) => {
32
34
stubClient ( ) ;
33
35
client = MatrixClientPeg . get ( ) ;
34
36
} ) ;
35
37
38
+ afterEach ( ( ) => jest . clearAllMocks ( ) ) ;
39
+
36
40
it ( "sets up video rooms correctly" , async ( ) => {
37
41
setupAsyncStoreWithClient ( WidgetStore . instance , client ) ;
38
42
jest . spyOn ( WidgetUtils , "waitForRoomWidget" ) . mockResolvedValue ( ) ;
You can’t perform that action at this time.
0 commit comments