Add support for switching layouts in the Jitsi wrapper (#22664)

pull/22672/head
Robin 2022-06-27 15:37:27 -04:00 committed by GitHub
parent feccdec581
commit 91918f2a58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -204,6 +204,20 @@ const ack = (ev: CustomEvent<IWidgetApiRequest>) => widgetApi.transport.reply(ev
ack(ev);
},
);
widgetApi.on(`action:${ElementWidgetActions.TileLayout}`,
(ev: CustomEvent<IWidgetApiRequest>) => {
ev.preventDefault();
meetApi?.executeCommand('setTileView', true);
ack(ev);
},
);
widgetApi.on(`action:${ElementWidgetActions.SpotlightLayout}`,
(ev: CustomEvent<IWidgetApiRequest>) => {
ev.preventDefault();
meetApi?.executeCommand('setTileView', false);
ack(ev);
},
);
widgetApi.on(`action:${ElementWidgetActions.StartLiveStream}`,
(ev: CustomEvent<IWidgetApiRequest>) => {
ev.preventDefault();