mirror of https://github.com/OpenVidu/openvidu.git
openvidu-components: Renamed subtitles components to captions
parent
085d659363
commit
b4080fedea
|
@ -20,7 +20,7 @@ var PARTICIPANTS_PANEL_BUTTON;
|
||||||
var ACTIVITIES_RECORDING_ACTIVITY;
|
var ACTIVITIES_RECORDING_ACTIVITY;
|
||||||
var RECORDING_ERROR;
|
var RECORDING_ERROR;
|
||||||
var TOOLBAR_SETTINGS_BUTTON;
|
var TOOLBAR_SETTINGS_BUTTON;
|
||||||
var SUBTITLES_BUTTON;
|
var CAPTIONS_BUTTON;
|
||||||
|
|
||||||
var SESSION_NAME;
|
var SESSION_NAME;
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ $(document).ready(() => {
|
||||||
RECORDING_BUTTON = url.searchParams.get("recordingBtn") === null ? true : url.searchParams.get("recordingBtn") === 'true';
|
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';
|
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';
|
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';
|
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';
|
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.toolbarFullscreenButton = FULLSCREEN_BUTTON;
|
||||||
webComponent.toolbarSettingsButton = TOOLBAR_SETTINGS_BUTTON;
|
webComponent.toolbarSettingsButton = TOOLBAR_SETTINGS_BUTTON;
|
||||||
webComponent.toolbarSubtitlesButton = SUBTITLES_BUTTON;
|
webComponent.toolbarCaptionsButton = CAPTIONS_BUTTON;
|
||||||
webComponent.toolbarLeaveButton = LEAVE_BUTTON;
|
webComponent.toolbarLeaveButton = LEAVE_BUTTON;
|
||||||
webComponent.toolbarRecordingButton = RECORDING_BUTTON;
|
webComponent.toolbarRecordingButton = RECORDING_BUTTON;
|
||||||
webComponent.toolbarActivitiesPanelButton = ACTIVITIES_PANEL_BUTTON;
|
webComponent.toolbarActivitiesPanelButton = ACTIVITIES_PANEL_BUTTON;
|
||||||
|
|
|
@ -254,7 +254,7 @@ describe('Testing API Directives', () => {
|
||||||
|
|
||||||
it('should HIDE the SUBTITLES button', async () => {
|
it('should HIDE the SUBTITLES button', async () => {
|
||||||
let element;
|
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);
|
element = await browser.wait(until.elementLocated(By.id('session-container')), TIMEOUT);
|
||||||
expect(await element.isDisplayed()).to.be.true;
|
expect(await element.isDisplayed()).to.be.true;
|
||||||
|
|
||||||
|
|
|
@ -12,12 +12,12 @@ import { LoremIpsum } from 'lorem-ipsum';
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ov-subtitles',
|
selector: 'ov-captions',
|
||||||
templateUrl: './subtitles.component.html',
|
templateUrl: './captions.component.html',
|
||||||
styleUrls: ['./subtitles.component.css'],
|
styleUrls: ['./captions.component.css'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush
|
changeDetection: ChangeDetectionStrategy.OnPush
|
||||||
})
|
})
|
||||||
export class SubtitlesComponent implements OnInit {
|
export class CaptionsComponent implements OnInit {
|
||||||
/**
|
/**
|
||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
|
@ -14,5 +14,5 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ov-subtitles *ngIf="subtitlesEnabled" class="OV_ignored"></ov-subtitles>
|
<ov-captions *ngIf="subtitlesEnabled" class="OV_ignored"></ov-captions>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -21,7 +21,7 @@ import {
|
||||||
ToolbarBackgroundEffectsButtonDirective,
|
ToolbarBackgroundEffectsButtonDirective,
|
||||||
ToolbarRecordingButtonDirective,
|
ToolbarRecordingButtonDirective,
|
||||||
ToolbarSettingsButtonDirective,
|
ToolbarSettingsButtonDirective,
|
||||||
ToolbarSubtitleButtonDirective
|
ToolbarCaptionsButtonDirective
|
||||||
} from './toolbar.directive';
|
} from './toolbar.directive';
|
||||||
import {
|
import {
|
||||||
AudioMutedDirective,
|
AudioMutedDirective,
|
||||||
|
@ -42,7 +42,7 @@ import {
|
||||||
ToolbarScreenshareButtonDirective,
|
ToolbarScreenshareButtonDirective,
|
||||||
ToolbarFullscreenButtonDirective,
|
ToolbarFullscreenButtonDirective,
|
||||||
ToolbarBackgroundEffectsButtonDirective,
|
ToolbarBackgroundEffectsButtonDirective,
|
||||||
ToolbarSubtitleButtonDirective,
|
ToolbarCaptionsButtonDirective,
|
||||||
ToolbarLeaveButtonDirective,
|
ToolbarLeaveButtonDirective,
|
||||||
ToolbarRecordingButtonDirective,
|
ToolbarRecordingButtonDirective,
|
||||||
ToolbarParticipantsPanelButtonDirective,
|
ToolbarParticipantsPanelButtonDirective,
|
||||||
|
@ -72,7 +72,7 @@ import {
|
||||||
ToolbarScreenshareButtonDirective,
|
ToolbarScreenshareButtonDirective,
|
||||||
ToolbarFullscreenButtonDirective,
|
ToolbarFullscreenButtonDirective,
|
||||||
ToolbarBackgroundEffectsButtonDirective,
|
ToolbarBackgroundEffectsButtonDirective,
|
||||||
ToolbarSubtitleButtonDirective,
|
ToolbarCaptionsButtonDirective,
|
||||||
ToolbarLeaveButtonDirective,
|
ToolbarLeaveButtonDirective,
|
||||||
ToolbarRecordingButtonDirective,
|
ToolbarRecordingButtonDirective,
|
||||||
ToolbarParticipantsPanelButtonDirective,
|
ToolbarParticipantsPanelButtonDirective,
|
||||||
|
|
|
@ -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`
|
* Default: `true`
|
||||||
*
|
*
|
||||||
* It can be used in the parent element {@link VideoconferenceComponent} specifying the name of the `toolbar` component:
|
* It can be used in the parent element {@link VideoconferenceComponent} specifying the name of the `toolbar` component:
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* <ov-videoconference [toolbarSubtitleButton]="false"></ov-videoconference>
|
* <ov-videoconference [toolbarCaptionsButton]="false"></ov-videoconference>
|
||||||
*
|
*
|
||||||
* \
|
* \
|
||||||
* And it also can be used in the {@link ToolbarComponent}.
|
* And it also can be used in the {@link ToolbarComponent}.
|
||||||
* @example
|
* @example
|
||||||
* <ov-toolbar [subtitleButton]="false"></ov-toolbar>
|
* <ov-toolbar [captionsButton]="false"></ov-toolbar>
|
||||||
*/
|
*/
|
||||||
@Directive({
|
@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
|
* @ignore
|
||||||
*/
|
*/
|
||||||
@Input() set toolbarSubtitlesButton(value: boolean) {
|
@Input() set toolbarCaptionsButton(value: boolean) {
|
||||||
this.subtitlesButtonValue = value;
|
this.captionsButtonValue = value;
|
||||||
this.update(this.subtitlesButtonValue);
|
this.update(this.captionsButtonValue);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
@Input() set subtitlesButton(value: boolean) {
|
@Input() set captionsButton(value: boolean) {
|
||||||
this.subtitlesButtonValue = value;
|
this.captionsButtonValue = value;
|
||||||
this.update(this.subtitlesButtonValue);
|
this.update(this.captionsButtonValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
private subtitlesButtonValue: boolean = true;
|
private captionsButtonValue: boolean = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ignore
|
* @ignore
|
||||||
|
@ -284,13 +284,13 @@ export class ToolbarSubtitleButtonDirective implements AfterViewInit, OnDestroy
|
||||||
constructor(public elementRef: ElementRef, private libService: OpenViduAngularConfigService) {}
|
constructor(public elementRef: ElementRef, private libService: OpenViduAngularConfigService) {}
|
||||||
|
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.update(this.subtitlesButtonValue);
|
this.update(this.captionsButtonValue);
|
||||||
}
|
}
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
this.clear();
|
this.clear();
|
||||||
}
|
}
|
||||||
private clear() {
|
private clear() {
|
||||||
this.subtitlesButtonValue = true;
|
this.captionsButtonValue = true;
|
||||||
this.update(true);
|
this.update(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ import { AudioDevicesComponent } from './components/settings/audio-devices/audio
|
||||||
import { NicknameInputComponent } from './components/settings/nickname-input/nickname-input.component';
|
import { NicknameInputComponent } from './components/settings/nickname-input/nickname-input.component';
|
||||||
import { LangSelectorComponent } from './components/settings/lang-selector/lang-selector.component';
|
import { LangSelectorComponent } from './components/settings/lang-selector/lang-selector.component';
|
||||||
import { SubtitlesSettingComponent } from './components/settings/subtitles/subtitles.component';
|
import { SubtitlesSettingComponent } from './components/settings/subtitles/subtitles.component';
|
||||||
import { SubtitlesComponent } from './components/subtitles/subtitles.component';
|
import { CaptionsComponent } from './components/captions/captions.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
|
@ -68,7 +68,7 @@ import { SubtitlesComponent } from './components/subtitles/subtitles.component';
|
||||||
ChatPanelComponent,
|
ChatPanelComponent,
|
||||||
SessionComponent,
|
SessionComponent,
|
||||||
LayoutComponent,
|
LayoutComponent,
|
||||||
SubtitlesComponent,
|
CaptionsComponent,
|
||||||
StreamComponent,
|
StreamComponent,
|
||||||
DialogTemplateComponent,
|
DialogTemplateComponent,
|
||||||
RecordingDialogComponent,
|
RecordingDialogComponent,
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
[toolbarParticipantsPanelButton]="_toolbarParticipantsPanelButton"
|
[toolbarParticipantsPanelButton]="_toolbarParticipantsPanelButton"
|
||||||
[toolbarDisplayLogo]="_toolbarDisplayLogo"
|
[toolbarDisplayLogo]="_toolbarDisplayLogo"
|
||||||
[toolbarDisplaySessionName]="_toolbarDisplaySessionName"
|
[toolbarDisplaySessionName]="_toolbarDisplaySessionName"
|
||||||
[toolbarSubtitlesButton]="_toolbarSubtitlesButton"
|
[toolbarCaptionsButton]="_toolbarCaptionsButton"
|
||||||
[streamDisplayParticipantName]="_streamDisplayParticipantName"
|
[streamDisplayParticipantName]="_streamDisplayParticipantName"
|
||||||
[streamDisplayAudioDetection]="_streamDisplayAudioDetection"
|
[streamDisplayAudioDetection]="_streamDisplayAudioDetection"
|
||||||
[streamSettingsButton]="_streamSettingsButton"
|
[streamSettingsButton]="_streamSettingsButton"
|
||||||
|
|
|
@ -82,7 +82,7 @@ export class OpenviduWebComponentComponent implements OnInit {
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
_toolbarSubtitlesButton: boolean = true;
|
_toolbarCaptionsButton: boolean = true;
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
@ -335,7 +335,7 @@ export class OpenviduWebComponentComponent implements OnInit {
|
||||||
this._toolbarDisplaySessionName = this.castToBoolean(value);
|
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`
|
* Default: `true`
|
||||||
*
|
*
|
||||||
|
@ -343,10 +343,10 @@ export class OpenviduWebComponentComponent implements OnInit {
|
||||||
* <span>WARNING</span>: If you want to use this parameter to OpenVidu Web Component statically, you have to replace the <strong>camelCase</strong> with a <strong>hyphen between words</strong>.</div>
|
* <span>WARNING</span>: If you want to use this parameter to OpenVidu Web Component statically, you have to replace the <strong>camelCase</strong> with a <strong>hyphen between words</strong>.</div>
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* <openvidu-webcomponent toolbar-display-session-name="false"></openvidu-webcomponent>
|
* <openvidu-webcomponent toolbar-captions-button="false"></openvidu-webcomponent>
|
||||||
*/
|
*/
|
||||||
@Input() set toolbarSubtitlesButton(value: string | boolean) {
|
@Input() set toolbarCaptionsButton(value: string | boolean) {
|
||||||
this._toolbarSubtitlesButton = this.castToBoolean(value);
|
this._toolbarCaptionsButton = this.castToBoolean(value);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The **streamDisplayParticipantName** attribute allows show/hide the participants name in stream component.
|
* The **streamDisplayParticipantName** attribute allows show/hide the participants name in stream component.
|
||||||
|
|
Loading…
Reference in New Issue