Merge pull request #5430 from tsiegleauq/stream-jitsi-perms

separate stream permission from jitsi
This commit is contained in:
Emanuel Schütze 2020-06-18 15:57:15 +02:00 committed by GitHub
commit e20c93d445
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -25,7 +25,7 @@
</div> </div>
</ng-template> </ng-template>
<div class="jitsi-integration" *ngIf="canSeeLiveStream && (enableJitsi || videoStreamUrl)"> <div class="jitsi-integration" *ngIf="enableJitsi || (videoStreamUrl && canSeeLiveStream)">
<!-- Audio-Conference-bar --> <!-- Audio-Conference-bar -->
<div <div
class="jitsi-bar" class="jitsi-bar"
@ -47,7 +47,7 @@
color="accent" color="accent"
(click)="viewStream()" (click)="viewStream()"
matTooltip="{{ 'Exit live conference and continue livestream' | translate }}" matTooltip="{{ 'Exit live conference and continue livestream' | translate }}"
*ngIf="videoStreamUrl" *ngIf="videoStreamUrl && canSeeLiveStream"
> >
<mat-icon color="warn"> <mat-icon color="warn">
meeting_room meeting_room
@ -78,7 +78,7 @@
(click)="enterConversation()" (click)="enterConversation()"
matTooltip="{{ 'Enter live conference' | translate }}" matTooltip="{{ 'Enter live conference' | translate }}"
> >
<mat-icon color="">meeting_room</mat-icon> <mat-icon color="primary">meeting_room</mat-icon>
</button> </button>
<mat-icon *ngIf="enableJitsi && !isAccessPermitted" class="indicator">no_meeting_room</mat-icon> <mat-icon *ngIf="enableJitsi && !isAccessPermitted" class="indicator">no_meeting_room</mat-icon>
@ -172,7 +172,7 @@
<os-vjs-player <os-vjs-player
[videoUrl]="videoStreamUrl" [videoUrl]="videoStreamUrl"
(started)="onSteamStarted()" (started)="onSteamStarted()"
*ngIf="!streamActiveInAnotherTab || streamRunning" *ngIf="canSeeLiveStream && !streamActiveInAnotherTab || streamRunning"
></os-vjs-player> ></os-vjs-player>
<div class="disconnected" *ngIf="streamActiveInAnotherTab && !streamRunning"> <div class="disconnected" *ngIf="streamActiveInAnotherTab && !streamRunning">
<span>{{ 'The livestream is already running in your OpenSlides session.' | translate }}</span> <span>{{ 'The livestream is already running in your OpenSlides session.' | translate }}</span>

View File

@ -272,9 +272,9 @@ export class JitsiComponent extends BaseComponent implements OnInit, OnDestroy {
.pipe(distinctUntilChanged()) .pipe(distinctUntilChanged())
.subscribe((confState: ConferenceState) => { .subscribe((confState: ConferenceState) => {
if (confState in ConferenceState) { if (confState in ConferenceState) {
if (this.enableJitsi && !this.videoStreamUrl) { if (this.enableJitsi && (!this.videoStreamUrl || !this.canSeeLiveStream)) {
this.currentState = ConferenceState.jitsi; this.currentState = ConferenceState.jitsi;
} else if (!this.enableJitsi && this.videoStreamUrl) { } else if (!this.enableJitsi && this.videoStreamUrl && this.canSeeLiveStream) {
this.currentState = ConferenceState.stream; this.currentState = ConferenceState.stream;
} else { } else {
this.currentState = confState; this.currentState = confState;
@ -496,7 +496,7 @@ export class JitsiComponent extends BaseComponent implements OnInit, OnDestroy {
} }
private setDefaultConfState(): void { private setDefaultConfState(): void {
this.videoStreamUrl this.videoStreamUrl && this.canSeeLiveStream
? this.setConferenceState(ConferenceState.stream) ? this.setConferenceState(ConferenceState.stream)
: this.setConferenceState(ConferenceState.jitsi); : this.setConferenceState(ConferenceState.jitsi);
} }