diff --git a/openvidu-components-angular/e2e/webcomponent-app/app.js b/openvidu-components-angular/e2e/webcomponent-app/app.js index 262fc9fb..55f73a9d 100644 --- a/openvidu-components-angular/e2e/webcomponent-app/app.js +++ b/openvidu-components-angular/e2e/webcomponent-app/app.js @@ -20,7 +20,7 @@ var PARTICIPANTS_PANEL_BUTTON; var ACTIVITIES_RECORDING_ACTIVITY; var RECORDING_ERROR; var TOOLBAR_SETTINGS_BUTTON; -var SUBTITLES_BUTTON; +var CAPTIONS_BUTTON; var SESSION_NAME; @@ -38,7 +38,7 @@ $(document).ready(() => { RECORDING_BUTTON = url.searchParams.get("recordingBtn") === null ? true : url.searchParams.get("recordingBtn") === 'true'; FULLSCREEN_BUTTON = url.searchParams.get("fullscreenBtn") === null ? true : url.searchParams.get("fullscreenBtn") === 'true'; TOOLBAR_SETTINGS_BUTTON = url.searchParams.get("toolbarSettingsBtn") === null ? true : url.searchParams.get("toolbarSettingsBtn") === 'true'; - SUBTITLES_BUTTON = url.searchParams.get("toolbarSubtitlesBtn") === null ? true : url.searchParams.get("toolbarSubtitlesBtn") === 'true'; + CAPTIONS_BUTTON = url.searchParams.get("toolbarCaptionsBtn") === null ? true : url.searchParams.get("toolbarCaptionsBtn") === 'true'; LEAVE_BUTTON = url.searchParams.get("leaveBtn") === null ? true : url.searchParams.get("leaveBtn") === 'true'; ACTIVITIES_PANEL_BUTTON = url.searchParams.get("activitiesPanelBtn") === null ? true : url.searchParams.get("activitiesPanelBtn") === 'true'; @@ -149,7 +149,7 @@ async function joinSession(sessionName, participantName) { webComponent.toolbarFullscreenButton = FULLSCREEN_BUTTON; webComponent.toolbarSettingsButton = TOOLBAR_SETTINGS_BUTTON; - webComponent.toolbarSubtitlesButton = SUBTITLES_BUTTON; + webComponent.toolbarCaptionsButton = CAPTIONS_BUTTON; webComponent.toolbarLeaveButton = LEAVE_BUTTON; webComponent.toolbarRecordingButton = RECORDING_BUTTON; webComponent.toolbarActivitiesPanelButton = ACTIVITIES_PANEL_BUTTON; diff --git a/openvidu-components-angular/e2e/webcomponent.test.ts b/openvidu-components-angular/e2e/webcomponent.test.ts index 3758144b..db42cf55 100644 --- a/openvidu-components-angular/e2e/webcomponent.test.ts +++ b/openvidu-components-angular/e2e/webcomponent.test.ts @@ -254,7 +254,7 @@ describe('Testing API Directives', () => { it('should HIDE the SUBTITLES button', async () => { let element; - await browser.get(`${url}?prejoin=false&toolbarSubtitlesBtn=false`); + await browser.get(`${url}?prejoin=false&toolbarCaptionsBtn=false`); element = await browser.wait(until.elementLocated(By.id('session-container')), TIMEOUT); expect(await element.isDisplayed()).to.be.true; diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/subtitles/subtitles.component.css b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/captions/captions.component.css similarity index 100% rename from openvidu-components-angular/projects/openvidu-angular/src/lib/components/subtitles/subtitles.component.css rename to openvidu-components-angular/projects/openvidu-angular/src/lib/components/captions/captions.component.css diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/subtitles/subtitles.component.html b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/captions/captions.component.html similarity index 100% rename from openvidu-components-angular/projects/openvidu-angular/src/lib/components/subtitles/subtitles.component.html rename to openvidu-components-angular/projects/openvidu-angular/src/lib/components/captions/captions.component.html diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/subtitles/subtitles.component.spec.ts b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/captions/captions.component.spec.ts similarity index 100% rename from openvidu-components-angular/projects/openvidu-angular/src/lib/components/subtitles/subtitles.component.spec.ts rename to openvidu-components-angular/projects/openvidu-angular/src/lib/components/captions/captions.component.spec.ts diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/subtitles/subtitles.component.ts b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/captions/captions.component.ts similarity index 92% rename from openvidu-components-angular/projects/openvidu-angular/src/lib/components/subtitles/subtitles.component.ts rename to openvidu-components-angular/projects/openvidu-angular/src/lib/components/captions/captions.component.ts index 0deaffeb..15c02dc9 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/subtitles/subtitles.component.ts +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/captions/captions.component.ts @@ -12,12 +12,12 @@ import { LoremIpsum } from 'lorem-ipsum'; * @internal */ @Component({ - selector: 'ov-subtitles', - templateUrl: './subtitles.component.html', - styleUrls: ['./subtitles.component.css'], + selector: 'ov-captions', + templateUrl: './captions.component.html', + styleUrls: ['./captions.component.css'], changeDetection: ChangeDetectionStrategy.OnPush }) -export class SubtitlesComponent implements OnInit { +export class CaptionsComponent implements OnInit { /** * @ignore */ diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/layout/layout.component.html b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/layout/layout.component.html index a1644fe9..d666ebac 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/layout/layout.component.html +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/layout/layout.component.html @@ -14,5 +14,5 @@ - + diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/directives/api/api.directive.module.ts b/openvidu-components-angular/projects/openvidu-angular/src/lib/directives/api/api.directive.module.ts index 2285ee18..1e0e3daf 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/directives/api/api.directive.module.ts +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/directives/api/api.directive.module.ts @@ -21,7 +21,7 @@ import { ToolbarBackgroundEffectsButtonDirective, ToolbarRecordingButtonDirective, ToolbarSettingsButtonDirective, - ToolbarSubtitleButtonDirective + ToolbarCaptionsButtonDirective } from './toolbar.directive'; import { AudioMutedDirective, @@ -42,7 +42,7 @@ import { ToolbarScreenshareButtonDirective, ToolbarFullscreenButtonDirective, ToolbarBackgroundEffectsButtonDirective, - ToolbarSubtitleButtonDirective, + ToolbarCaptionsButtonDirective, ToolbarLeaveButtonDirective, ToolbarRecordingButtonDirective, ToolbarParticipantsPanelButtonDirective, @@ -72,7 +72,7 @@ import { ToolbarScreenshareButtonDirective, ToolbarFullscreenButtonDirective, ToolbarBackgroundEffectsButtonDirective, - ToolbarSubtitleButtonDirective, + ToolbarCaptionsButtonDirective, ToolbarLeaveButtonDirective, ToolbarRecordingButtonDirective, ToolbarParticipantsPanelButtonDirective, diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/directives/api/toolbar.directive.ts b/openvidu-components-angular/projects/openvidu-angular/src/lib/directives/api/toolbar.directive.ts index c1ffbcfa..9eb929b7 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/directives/api/toolbar.directive.ts +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/directives/api/toolbar.directive.ts @@ -243,40 +243,40 @@ export class ToolbarBackgroundEffectsButtonDirective implements AfterViewInit, O } /** - * The **subtitleButton** directive allows show/hide the subtitle toolbar button. + * The **captionsButton** directive allows show/hide the captions toolbar button. * * Default: `true` * * It can be used in the parent element {@link VideoconferenceComponent} specifying the name of the `toolbar` component: * * @example - * + * * * \ * And it also can be used in the {@link ToolbarComponent}. * @example - * + * */ @Directive({ - selector: 'ov-videoconference[toolbarSubtitlesButton], ov-toolbar[subtitlesButton]' + selector: 'ov-videoconference[toolbarCaptionsButton], ov-toolbar[captionsButton]' }) -export class ToolbarSubtitleButtonDirective implements AfterViewInit, OnDestroy { +export class ToolbarCaptionsButtonDirective implements AfterViewInit, OnDestroy { /** * @ignore */ - @Input() set toolbarSubtitlesButton(value: boolean) { - this.subtitlesButtonValue = value; - this.update(this.subtitlesButtonValue); + @Input() set toolbarCaptionsButton(value: boolean) { + this.captionsButtonValue = value; + this.update(this.captionsButtonValue); } /** * @ignore */ - @Input() set subtitlesButton(value: boolean) { - this.subtitlesButtonValue = value; - this.update(this.subtitlesButtonValue); + @Input() set captionsButton(value: boolean) { + this.captionsButtonValue = value; + this.update(this.captionsButtonValue); } - private subtitlesButtonValue: boolean = true; + private captionsButtonValue: boolean = true; /** * @ignore @@ -284,13 +284,13 @@ export class ToolbarSubtitleButtonDirective implements AfterViewInit, OnDestroy constructor(public elementRef: ElementRef, private libService: OpenViduAngularConfigService) {} ngAfterViewInit() { - this.update(this.subtitlesButtonValue); + this.update(this.captionsButtonValue); } ngOnDestroy(): void { this.clear(); } private clear() { - this.subtitlesButtonValue = true; + this.captionsButtonValue = true; this.update(true); } diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/openvidu-angular.module.ts b/openvidu-components-angular/projects/openvidu-angular/src/lib/openvidu-angular.module.ts index e1414b38..66f2a0e1 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/openvidu-angular.module.ts +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/openvidu-angular.module.ts @@ -59,7 +59,7 @@ import { AudioDevicesComponent } from './components/settings/audio-devices/audio import { NicknameInputComponent } from './components/settings/nickname-input/nickname-input.component'; import { LangSelectorComponent } from './components/settings/lang-selector/lang-selector.component'; import { SubtitlesSettingComponent } from './components/settings/subtitles/subtitles.component'; -import { SubtitlesComponent } from './components/subtitles/subtitles.component'; +import { CaptionsComponent } from './components/captions/captions.component'; @NgModule({ declarations: [ @@ -68,7 +68,7 @@ import { SubtitlesComponent } from './components/subtitles/subtitles.component'; ChatPanelComponent, SessionComponent, LayoutComponent, - SubtitlesComponent, + CaptionsComponent, StreamComponent, DialogTemplateComponent, RecordingDialogComponent, diff --git a/openvidu-components-angular/src/app/openvidu-webcomponent/openvidu-webcomponent.component.html b/openvidu-components-angular/src/app/openvidu-webcomponent/openvidu-webcomponent.component.html index ba32d050..c2a83fce 100644 --- a/openvidu-components-angular/src/app/openvidu-webcomponent/openvidu-webcomponent.component.html +++ b/openvidu-components-angular/src/app/openvidu-webcomponent/openvidu-webcomponent.component.html @@ -17,7 +17,7 @@ [toolbarParticipantsPanelButton]="_toolbarParticipantsPanelButton" [toolbarDisplayLogo]="_toolbarDisplayLogo" [toolbarDisplaySessionName]="_toolbarDisplaySessionName" - [toolbarSubtitlesButton]="_toolbarSubtitlesButton" + [toolbarCaptionsButton]="_toolbarCaptionsButton" [streamDisplayParticipantName]="_streamDisplayParticipantName" [streamDisplayAudioDetection]="_streamDisplayAudioDetection" [streamSettingsButton]="_streamSettingsButton" diff --git a/openvidu-components-angular/src/app/openvidu-webcomponent/openvidu-webcomponent.component.ts b/openvidu-components-angular/src/app/openvidu-webcomponent/openvidu-webcomponent.component.ts index 81b342b3..d54b10f5 100644 --- a/openvidu-components-angular/src/app/openvidu-webcomponent/openvidu-webcomponent.component.ts +++ b/openvidu-components-angular/src/app/openvidu-webcomponent/openvidu-webcomponent.component.ts @@ -82,7 +82,7 @@ export class OpenviduWebComponentComponent implements OnInit { /** * @internal */ - _toolbarSubtitlesButton: boolean = true; + _toolbarCaptionsButton: boolean = true; /** * @internal */ @@ -335,7 +335,7 @@ export class OpenviduWebComponentComponent implements OnInit { this._toolbarDisplaySessionName = this.castToBoolean(value); } /** - * The **toolbarDisplaySessionName** attribute allows show/hide the session name. + * The **toolbarCaptionsButton** attribute allows show/hide the captions toolbar button. * * Default: `true` * @@ -343,10 +343,10 @@ export class OpenviduWebComponentComponent implements OnInit { * WARNING: If you want to use this parameter to OpenVidu Web Component statically, you have to replace the camelCase with a hyphen between words. * * @example - * + * */ - @Input() set toolbarSubtitlesButton(value: string | boolean) { - this._toolbarSubtitlesButton = this.castToBoolean(value); + @Input() set toolbarCaptionsButton(value: string | boolean) { + this._toolbarCaptionsButton = this.castToBoolean(value); } /** * The **streamDisplayParticipantName** attribute allows show/hide the participants name in stream component.