diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/material/dialog.component.ts b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/material/dialog.component.ts index 9c6310c5..7054545d 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/material/dialog.component.ts +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/material/dialog.component.ts @@ -19,7 +19,7 @@ export interface DialogData {

{{ data.title }}

{{ data.description }}
- +
` }) diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/background-effects-panel/background-effects-panel.component.html b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/background-effects-panel/background-effects-panel.component.html index 88a7b30b..18a21f31 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/background-effects-panel/background-effects-panel.component.html +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/background-effects-panel/background-effects-panel.component.html @@ -1,14 +1,14 @@
-

Background effects

-
-

No effects and blurred background

+

{{ 'PANEL.BACKGROUND.BLURRED_SECTION' | translate }}

+ + + + + + + +
@@ -15,6 +31,7 @@ - Nickname + {{ 'PREJOIN.NICKNAME' | translate }}
-

Choose your devices

+

{{ 'PREJOIN.DEVICE_SECTION' | translate }}


@@ -77,11 +94,15 @@ [class.warn-btn]="isVideoMuted" (click)="toggleCam()" > - videocam - videocam_off + videocam + videocam_off - Video devices + {{ 'PREJOIN.VIDEO_DEVICE' | translate }} - mic - mic_off + mic + mic_off - Audio devices + {{ 'PREJOIN.AUDIO_DEVICE' | translate }}
- +
diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/pre-join/pre-join.component.ts b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/pre-join/pre-join.component.ts index 71895dca..6eb4d5a0 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/pre-join/pre-join.component.ts +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/pre-join/pre-join.component.ts @@ -20,6 +20,7 @@ import { OpenViduService } from '../../services/openvidu/openvidu.service'; import { PanelService } from '../../services/panel/panel.service'; import { ParticipantService } from '../../services/participant/participant.service'; import { StorageService } from '../../services/storage/storage.service'; +import { TranslateService } from '../../services/translate/translate.service'; import { VirtualBackgroundService } from '../../services/virtual-background/virtual-background.service'; /** @@ -32,6 +33,8 @@ import { VirtualBackgroundService } from '../../services/virtual-background/virt }) export class PreJoinComponent implements OnInit, OnDestroy { @Output() onJoinButtonClicked = new EventEmitter(); + languages: {name: string, ISO: string}[] = []; + langSelected: {name: string, ISO: string}; cameras: CustomDevice[]; microphones: CustomDevice[]; cameraSelected: CustomDevice; @@ -53,11 +56,13 @@ export class PreJoinComponent implements OnInit, OnDestroy { * @ignore */ isMinimal: boolean = false; + showLogo: boolean = true; private log: ILogger; private localParticipantSubscription: Subscription; private screenShareStateSubscription: Subscription; private minimalSub: Subscription; + private displayLogoSub: Subscription; private backgroundEffectsButtonSub: Subscription; @HostListener('window:resize') @@ -75,7 +80,8 @@ export class PreJoinComponent implements OnInit, OnDestroy { protected panelService: PanelService, private libService: OpenViduAngularConfigService, private storageSrv: StorageService, - private backgroundService: VirtualBackgroundService + private backgroundService: VirtualBackgroundService, + private translateService: TranslateService ) { this.log = this.loggerSrv.get('PreJoinComponent'); } @@ -83,6 +89,8 @@ export class PreJoinComponent implements OnInit, OnDestroy { ngOnInit() { this.subscribeToPrejoinDirectives(); this.subscribeToLocalParticipantEvents(); + this.languages = this.translateService.getLanguagesInfo(); + this.langSelected = this.translateService.getLangSelected(); this.windowSize = window.innerWidth; this.hasVideoDevices = this.deviceSrv.hasVideoDeviceAvailable(); @@ -148,6 +156,12 @@ export class PreJoinComponent implements OnInit, OnDestroy { } } + onLangSelected(lang: string){ + this.translateService.setLanguage(lang); + this.storageSrv.setLang(lang); + this.langSelected = this.translateService.getLangSelected(); + } + async toggleCam() { this.videoMuteChanging = true; const publish = this.isVideoMuted; @@ -194,6 +208,10 @@ export class PreJoinComponent implements OnInit, OnDestroy { this.isMinimal = value; // this.cd.markForCheck(); }); + this.displayLogoSub = this.libService.displayLogoObs.subscribe((value: boolean) => { + this.showLogo = value; + // this.cd.markForCheck(); + }); this.backgroundEffectsButtonSub = this.libService.backgroundEffectsButton.subscribe((value: boolean) => { this.showBackgroundEffectsButton = value; // this.cd.markForCheck(); diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/session/session.component.ts b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/session/session.component.ts index 50804483..45b3f1ac 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/session/session.component.ts +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/session/session.component.ts @@ -11,7 +11,15 @@ import { TemplateRef, ViewChild } from '@angular/core'; -import { Subscriber, Session, StreamEvent, StreamPropertyChangedEvent, SessionDisconnectedEvent, ConnectionEvent, RecordingEvent } from 'openvidu-browser'; +import { + Subscriber, + Session, + StreamEvent, + StreamPropertyChangedEvent, + SessionDisconnectedEvent, + ConnectionEvent, + RecordingEvent +} from 'openvidu-browser'; import { VideoType } from '../../models/video-type.model'; import { ILogger } from '../../models/logger.model'; @@ -30,6 +38,7 @@ import { Subscription, skip } from 'rxjs'; import { PanelType } from '../../models/panel.model'; import { PanelService } from '../../services/panel/panel.service'; import { RecordingService } from '../../services/recording/recording.service'; +import { TranslateService } from '../../services/translate/translate.service'; /** * @internal @@ -73,7 +82,8 @@ export class SessionComponent implements OnInit { protected tokenService: TokenService, protected layoutService: LayoutService, protected panelService: PanelService, - private recordingService: RecordingService + private recordingService: RecordingService, + private translateService: TranslateService ) { this.log = this.loggerSrv.get('SessionComponent'); } @@ -98,7 +108,7 @@ export class SessionComponent implements OnInit { }, 0); } - @ViewChild('videoContainer', {static:false, read: ElementRef }) + @ViewChild('videoContainer', { static: false, read: ElementRef }) set videoContainer(container: ElementRef) { setTimeout(() => { if (container && !this.toolbarTemplate) { @@ -110,7 +120,7 @@ export class SessionComponent implements OnInit { } async ngOnInit() { - if(!this.usedInPrejoinPage){ + if (!this.usedInPrejoinPage) { this.session = this.openviduService.getWebcamSession(); this.sessionScreen = this.openviduService.getScreenSession(); this.subscribeToConnectionCreatedAndDestroyed(); @@ -121,7 +131,7 @@ export class SessionComponent implements OnInit { this.chatService.subscribeToChat(); this.subscribeToReconnection(); // if(RecordingEnabled){ - this.subscribeToRecordingEvents(); + this.subscribeToRecordingEvents(); // } this.onSessionCreated.emit(this.session); @@ -166,7 +176,7 @@ export class SessionComponent implements OnInit { this.updateLayoutInterval = setInterval(() => this.layoutService.update(), 50); }); - this.menuSubscription = this.panelService.panelOpenedObs.pipe(skip(1)).subscribe((ev: { opened: boolean, type?: PanelType }) => { + this.menuSubscription = this.panelService.panelOpenedObs.pipe(skip(1)).subscribe((ev: { opened: boolean; type?: PanelType }) => { if (this.sideMenu) { ev.opened ? this.sideMenu.open() : this.sideMenu.close(); } @@ -196,7 +206,7 @@ export class SessionComponent implements OnInit { } catch (error) { // this._error.emit({ error: error.error, messgae: error.message, code: error.code, status: error.status }); this.log.e('There was an error connecting to the session:', error.code, error.message); - this.actionService.openDialog('There was an error connecting to the session:', error?.error || error?.message); + this.actionService.openDialog(this.translateService.translate('ERRORS.SESSION'), error?.error || error?.message || error); } } @@ -277,7 +287,11 @@ export class SessionComponent implements OnInit { private subscribeToReconnection() { this.session.on('reconnecting', () => { this.log.w('Connection lost: Reconnecting'); - this.actionService.openDialog('Connection Problem', 'Oops! Trying to reconnect to the session ...', false); + this.actionService.openDialog( + this.translateService.translate('ERRRORS.CONNECTION'), + this.translateService.translate('ERRRORS.RECONNECT'), + false + ); }); this.session.on('reconnected', () => { this.log.w('Connection lost: Reconnected'); diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/stream/stream.component.html b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/stream/stream.component.html index 215c847e..e0e21694 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/stream/stream.component.html +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/stream/stream.component.html @@ -48,22 +48,22 @@
- @@ -32,8 +32,8 @@ [disabled]="isConnectionLost || !hasVideoDevices || videoMuteChanging" [class.warn-btn]="!isWebcamVideoActive" > - videocam - videocam_off + videocam + videocam_off @@ -45,8 +45,8 @@ [disabled]="isConnectionLost" [class.active-btn]="isScreenShareActive" > - screen_share - screen_share + screen_share + screen_share @@ -58,8 +58,8 @@ [disabled]="isConnectionLost" [class.active-btn]="isFullscreenActive" > - fullscreen_exit - fullscreen + fullscreen_exit + fullscreen @@ -101,7 +101,7 @@ (click)="toggleBackgroundEffects()" > auto_awesome - Background effects + {{ 'TOOLBAR.BACKGROUND' | translate }} @@ -112,7 +112,7 @@