diff --git a/web/app/configs/widget/jitsi/jitsi.widget.component.html b/web/app/configs/widget/jitsi/jitsi.widget.component.html index 81675bb..551ecf8 100644 --- a/web/app/configs/widget/jitsi/jitsi.widget.component.html +++ b/web/app/configs/widget/jitsi/jitsi.widget.component.html @@ -7,5 +7,12 @@ [(ngModel)]="widget.dimension.newData.conferenceUrl" name="widget-url-{{widget.id}}" [disabled]="isUpdating"/> + \ No newline at end of file diff --git a/web/app/configs/widget/jitsi/jitsi.widget.component.ts b/web/app/configs/widget/jitsi/jitsi.widget.component.ts index 4152f97..39c2c31 100644 --- a/web/app/configs/widget/jitsi/jitsi.widget.component.ts +++ b/web/app/configs/widget/jitsi/jitsi.widget.component.ts @@ -80,7 +80,6 @@ export class JitsiWidgetConfigComponent extends WidgetComponent { const jitsiUrl = url.parse(widget.dimension.newData.conferenceUrl); widget.dimension.newData.domain = jitsiUrl.host; widget.dimension.newData.conferenceId = jitsiUrl.path.substring(1); - widget.dimension.newData.isAudioOnly = false; let widgetQueryString = url.format({ query: { diff --git a/web/app/widget-wrappers/jitsi/jitsi.component.html b/web/app/widget-wrappers/jitsi/jitsi.component.html index 65c586d..40e255c 100644 --- a/web/app/widget-wrappers/jitsi/jitsi.component.html +++ b/web/app/widget-wrappers/jitsi/jitsi.component.html @@ -7,7 +7,11 @@

Jitsi Video Conference

+
+ \ No newline at end of file diff --git a/web/app/widget-wrappers/jitsi/jitsi.component.ts b/web/app/widget-wrappers/jitsi/jitsi.component.ts index 78ed54b..8733111 100644 --- a/web/app/widget-wrappers/jitsi/jitsi.component.ts +++ b/web/app/widget-wrappers/jitsi/jitsi.component.ts @@ -17,12 +17,14 @@ declare var JitsiMeetExternalAPI: any; export class JitsiWidgetWrapperComponent extends CapableWidget implements OnInit, OnDestroy { public isJoined = false; + public toggleVideo = false; private domain: string; private conferenceId: string; private displayName: string; private avatarUrl: string; private userId: string; + private isAudioOnly: boolean; private jitsiApiObj: any; private jitsiApiSubscription: Subscription; @@ -37,6 +39,9 @@ export class JitsiWidgetWrapperComponent extends CapableWidget implements OnInit this.displayName = params.displayName; this.avatarUrl = params.avatarUrl; this.userId = params.userId || params.email; // Riot uses `email` when placing a conference call + this.isAudioOnly = params.isAudioOnly === 'true'; + + this.toggleVideo = !this.isAudioOnly; // Set the widget ID if we have it ScalarWidgetApi.widgetId = params.widgetId; @@ -108,6 +113,7 @@ export class JitsiWidgetWrapperComponent extends CapableWidget implements OnInit if (this.displayName) this.jitsiApiObj.executeCommand("displayName", this.displayName); if (this.avatarUrl) this.jitsiApiObj.executeCommand("avatarUrl", this.avatarUrl.toString()); if (this.userId) this.jitsiApiObj.executeCommand("email", this.userId); + if (this.isAudioOnly === this.toggleVideo) this.jitsiApiObj.executeCommand("toggleVideo"); this.jitsiApiObj.on("readyToClose", () => { this.isJoined = false;