Skip to content

Commit

Permalink
CU-3w8ybcw more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ucswift committed Mar 7, 2024
1 parent 5755a99 commit 93a9078
Showing 1 changed file with 2 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,46 +1,21 @@
import { ChangeDetectorRef, Component, OnInit } from "@angular/core";
import { Store } from "@ngrx/store";
import { DepartmentVoiceChannelResultData } from '@resgrid/ngx-resgridlib';
import { Observable, Subscription } from "rxjs";
import { VoiceState } from "src/app/features/voice/store/voice.store";
import { AudioProvider } from "src/app/providers/audio";
import { OpenViduService } from "src/app/providers/openvidu";
import { selectAvailableChannelsState, selectVoiceState } from "src/app/store";
import * as VoiceActions from "../../actions/voice.actions";
import { Component, OnInit } from "@angular/core";

@Component({
selector: "app-voice-footer",
templateUrl: "./voice-footer.component.html",
styleUrls: ["./voice-footer.component.scss"],
})
export class VoiceFooterComponent implements OnInit {
public selectedChannel: DepartmentVoiceChannelResultData;
public isTransmitting: boolean = false;
public voiceState$: Observable<VoiceState | null>;
public availableChannels$: Observable<DepartmentVoiceChannelResultData[] | null>;

private participants: number = 0;
private voiceSubscription: Subscription;
private availableChannelsSubscription: Subscription;
constructor() {

constructor(private store: Store<VoiceState>, private audioProvider: AudioProvider,
public openViduService: OpenViduService, private ref: ChangeDetectorRef) {
this.voiceState$ = this.store.select(selectVoiceState);
}

ngOnInit(): void {

}

ngOnDestroy(): void {
if (this.voiceSubscription) {
this.voiceSubscription.unsubscribe();
this.voiceSubscription = null;
}

if (this.availableChannelsSubscription) {
this.availableChannelsSubscription.unsubscribe();
this.availableChannelsSubscription = null;
}
}
}

0 comments on commit 93a9078

Please sign in to comment.