mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 20:54:59 +08:00
Adjust for new widget messaging APIs
As part of changing to the `events` package, the API surface changed slightly. Related to https://github.com/vector-im/element-web/issues/15493
This commit is contained in:
parent
d1a6b656bc
commit
ea4985819f
@ -76,7 +76,7 @@ let meetApi: any; // JitsiMeetExternalAPI
|
||||
widgetApi.requestCapabilities(VideoConferenceCapabilities);
|
||||
readyPromise = Promise.all([
|
||||
new Promise<void>(resolve => {
|
||||
widgetApi.once<CustomEvent<IWidgetApiRequest>>(`action:${ElementWidgetActions.ClientReady}`, ev => {
|
||||
widgetApi.once(`action:${ElementWidgetActions.ClientReady}`, ev => {
|
||||
ev.preventDefault();
|
||||
widgetApi.transport.reply(ev.detail, {});
|
||||
resolve();
|
||||
@ -113,7 +113,7 @@ let meetApi: any; // JitsiMeetExternalAPI
|
||||
|
||||
// TODO: register widgetApi listeners for PTT controls (https://github.com/vector-im/riot-web/issues/12795)
|
||||
|
||||
widgetApi.addEventListener(`action:${ElementWidgetActions.HangupCall}`,
|
||||
widgetApi.on(`action:${ElementWidgetActions.HangupCall}`,
|
||||
(ev: CustomEvent<IWidgetApiRequest>) => {
|
||||
if (meetApi) meetApi.executeCommand('hangup');
|
||||
widgetApi.transport.reply(ev.detail, {}); // ack
|
||||
|
Loading…
Reference in New Issue
Block a user