Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
localhost
encode zstd gzip
root * /usr/share/caddy/html
Original file line number Diff line number Diff line change
Expand Up @@ -26,32 +26,10 @@ export class VoiceFooterComponent implements OnInit {
constructor(private store: Store<VoiceState>, private audioProvider: AudioProvider,
public openViduService: OpenViduService, private ref: ChangeDetectorRef) {
this.voiceState$ = this.store.select(selectVoiceState);
this.availableChannels$ = this.store.select(selectAvailableChannelsState);
}

ngOnInit(): void {
this.availableChannelsSubscription = this.availableChannels$.subscribe((channels) => {
if (channels) {
this.selectedChannel = channels[0];
}
});

this.voiceSubscription = this.voiceState$.subscribe((state) => {
if (state) {
if (state.currentActiveVoipChannel) {
this.selectedChannel = state.currentActiveVoipChannel;
} else if (state.channels) {
this.selectedChannel = state.channels[0];
}

this.isTransmitting = state.isTransmitting;

if (this.participants !== state.participants) {
this.ref.detectChanges();
this.participants = state.participants;
}
}
});
}

ngOnDestroy(): void {
Expand All @@ -65,34 +43,4 @@ export class VoiceFooterComponent implements OnInit {
this.availableChannelsSubscription = null;
}
}

public toggleTransmitting() {
if (this.isTransmitting) {
this.stopTransmitting();
} else {
this.startTransmitting();
}
}

public startTransmitting(): void {
this.audioProvider.playTransmitStart();
this.store.dispatch(new VoiceActions.StartTransmitting());
}

public stopTransmitting(): void {
this.store.dispatch(new VoiceActions.StopTransmitting());
this.audioProvider.playTransmitEnd();
}

public stopTransmittingLeave(): void {
this.store.dispatch(new VoiceActions.StopTransmitting());
}

public onChannelChange(channel) {
if (channel.Id === '') {
this.store.dispatch(new VoiceActions.SetNoChannel());
} else {
this.store.dispatch(new VoiceActions.SetActiveChannel(channel));
}
}
}