Merge pull request #5544 from tsiegleauq/firefox-80-state-issues

Fix Firefox indexedDB state change issue
This commit is contained in:
Emanuel Schütze 2020-09-04 14:43:47 +02:00 committed by GitHub
commit 392c32fd92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -315,26 +315,23 @@ export class JitsiComponent extends BaseViewComponent implements OnInit, OnDestr
await this.configsLoaded;
this.subscriptions.push(
this.storageMap
.watch(this.CONFERENCE_STATE_STORAGE_KEY)
.pipe(distinctUntilChanged())
.subscribe((confState: ConferenceState) => {
if (confState in ConferenceState) {
if (this.enableJitsi && (!this.videoStreamUrl || !this.canSeeLiveStream)) {
this.currentState = ConferenceState.jitsi;
} else if (!this.enableJitsi && this.videoStreamUrl && this.canSeeLiveStream) {
this.currentState = ConferenceState.stream;
} else {
this.currentState = confState;
}
this.storageMap.watch(this.CONFERENCE_STATE_STORAGE_KEY).subscribe((confState: ConferenceState) => {
if (confState in ConferenceState) {
if (this.enableJitsi && (!this.videoStreamUrl || !this.canSeeLiveStream)) {
this.currentState = ConferenceState.jitsi;
} else if (!this.enableJitsi && this.videoStreamUrl && this.canSeeLiveStream) {
this.currentState = ConferenceState.stream;
} else {
this.setDefaultConfState();
this.currentState = confState;
}
// show stream window when the state changes to stream
if (this.currentState === ConferenceState.stream && !this.streamActiveInAnotherTab) {
this.showJitsiWindow = true;
}
}),
} else {
this.setDefaultConfState();
}
// show stream window when the state changes to stream
if (this.currentState === ConferenceState.stream && !this.streamActiveInAnotherTab) {
this.showJitsiWindow = true;
}
}),
// check if the operator is on the clos, remove from room if not permitted
this.closService.currentListOfSpeakersObservable
.pipe(