This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree 2 files changed +13
-3
lines changed
2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -21,20 +21,18 @@ export enum ElementWidgetActions {
21
21
JoinCall = "io.element.join" ,
22
22
HangupCall = "im.vector.hangup" ,
23
23
CallParticipants = "io.element.participants" ,
24
- MuteVideo = "io.element.mute_video" ,
25
- UnmuteVideo = "io.element.unmute_video" ,
26
24
StartLiveStream = "im.vector.start_live_stream" ,
27
25
28
26
// Actions for switching layouts
29
27
TileLayout = "io.element.tile_layout" ,
30
28
SpotlightLayout = "io.element.spotlight_layout" ,
31
29
32
30
OpenIntegrationManager = "integration_manager_open" ,
33
-
34
31
/**
35
32
* @deprecated Use MSC2931 instead
36
33
*/
37
34
ViewRoom = "io.element.view_room" ,
35
+
38
36
// This action type is used as a `fromWidget` and a `toWidget` action.
39
37
// fromWidget: updates the client about the current device mute state
40
38
// toWidget: the client requests a specific device mute configuration
Original file line number Diff line number Diff line change @@ -965,6 +965,18 @@ describe("ElementCall", () => {
965
965
expect ( messaging . transport . send ) . toHaveBeenCalledWith ( ElementWidgetActions . TileLayout , { } ) ;
966
966
} ) ;
967
967
968
+ it ( "acknowledges mute_device widget action" , async ( ) => {
969
+ await callConnectProcedure ( call ) ;
970
+ const preventDefault = jest . fn ( ) ;
971
+ const mockEv = {
972
+ preventDefault,
973
+ detail : { video_enabled : false } ,
974
+ } ;
975
+ messaging . emit ( `action:${ ElementWidgetActions . DeviceMute } ` , mockEv ) ;
976
+ expect ( messaging . transport . reply ) . toHaveBeenCalledWith ( { video_enabled : false } , { } ) ;
977
+ expect ( preventDefault ) . toHaveBeenCalled ( ) ;
978
+ } ) ;
979
+
968
980
it ( "emits events when connection state changes" , async ( ) => {
969
981
// const wait = jest.spyOn(CallModule, "waitForEvent");
970
982
const onConnectionState = jest . fn ( ) ;
You can’t perform that action at this time.
0 commit comments