openvidu-components: Added settings directive to webcomponent

pull/739/head
csantosm 2022-06-16 15:55:40 +02:00
parent c8264fdb1b
commit 12ad515e5b
3 changed files with 21 additions and 1 deletions

View File

@ -106,7 +106,7 @@
<mat-divider class="divider" *ngIf="!isMinimal && showSettingsButton"></mat-divider> <mat-divider class="divider" *ngIf="!isMinimal && showSettingsButton"></mat-divider>
<!-- Settings button --> <!-- Settings button -->
<button *ngIf="!isMinimal && showSettingsButton" mat-menu-item id="settings-btn" (click)="toggleSettings()"> <button *ngIf="!isMinimal && showSettingsButton" mat-menu-item id="toolbar-settings-btn" (click)="toggleSettings()">
<mat-icon>settings</mat-icon> <mat-icon>settings</mat-icon>
<span>{{ 'TOOLBAR.SETTINGS' | translate }}</span> <span>{{ 'TOOLBAR.SETTINGS' | translate }}</span>
</button> </button>

View File

@ -9,6 +9,7 @@
[toolbarScreenshareButton]="_toolbarScreenshareButton" [toolbarScreenshareButton]="_toolbarScreenshareButton"
[toolbarRecordingButton]="_toolbarRecordingButton" [toolbarRecordingButton]="_toolbarRecordingButton"
[toolbarFullscreenButton]="_toolbarFullscreenButton" [toolbarFullscreenButton]="_toolbarFullscreenButton"
[toolbarSettingsButton]="_toolbarSettingsButton"
[toolbarLeaveButton]="_toolbarLeaveButton" [toolbarLeaveButton]="_toolbarLeaveButton"
[toolbarActivitiesPanelButton]="_toolbarActivitiesPanelButton" [toolbarActivitiesPanelButton]="_toolbarActivitiesPanelButton"
[toolbarChatPanelButton]="_toolbarChatPanelButton" [toolbarChatPanelButton]="_toolbarChatPanelButton"

View File

@ -51,6 +51,10 @@ export class OpenviduWebComponentComponent implements OnInit {
* @internal * @internal
*/ */
_toolbarBackgroundEffectsButton: boolean = true; _toolbarBackgroundEffectsButton: boolean = true;
/**
* @internal
*/
_toolbarSettingsButton: boolean = true;
/** /**
* @internal * @internal
*/ */
@ -226,6 +230,21 @@ export class OpenviduWebComponentComponent implements OnInit {
@Input() set toolbarBackgroundEffectsButton(value: string | boolean) { @Input() set toolbarBackgroundEffectsButton(value: string | boolean) {
this._toolbarBackgroundEffectsButton = this.castToBoolean(value); this._toolbarBackgroundEffectsButton = this.castToBoolean(value);
} }
/**
* The **toolbarSettingsButton** attribute allows show/hide the settings toolbar button.
*
* Default: `true`
*
* <div class="warn-container">
* <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
* <openvidu-webcomponent toolbar-settings-button="false"></openvidu-webcomponent>
*/
@Input() set toolbarSettingsButton(value: string | boolean) {
this._toolbarSettingsButton = this.castToBoolean(value);
}
/** /**
* The **toolbarLeaveButton** attribute allows show/hide the leave toolbar button. * The **toolbarLeaveButton** attribute allows show/hide the leave toolbar button.
* *