From 9a6a4cbf25c964adc7ceee5934d153270a27c699 Mon Sep 17 00:00:00 2001 From: Carlos Santos <4a.santos@gmail.com> Date: Mon, 3 Jul 2023 17:52:26 +0200 Subject: [PATCH] openvidu-components: Added network control directives Allowed frameRate, resolution and simulcast customization --- .../lib/components/stream/stream.component.ts | 13 ++- .../videoconference.component.ts | 10 +- .../directives/api/api.directive.module.ts | 13 ++- .../lib/directives/api/stream.directive.ts | 102 ++++++++++++++++++ .../api/videoconference.directive.ts | 70 ++++++++++-- .../config/openvidu-angular.config.service.ts | 23 ++++ .../lib/services/openvidu/openvidu.service.ts | 48 +++++++-- .../src/app/openvidu-call/call.component.html | 22 +++- .../openvidu-webcomponent.component.html | 3 + .../openvidu-webcomponent.component.ts | 69 ++++++++++-- 10 files changed, 336 insertions(+), 37 deletions(-) diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/stream/stream.component.ts b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/stream/stream.component.ts index e8d28b66..10c0d048 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/stream/stream.component.ts +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/stream/stream.component.ts @@ -30,6 +30,8 @@ import { StorageService } from '../../services/storage/storage.service'; * | **displayParticipantName** | `boolean` | {@link StreamDisplayParticipantNameDirective} | * | **displayAudioDetection** | `boolean` | {@link StreamDisplayAudioDetectionDirective} | * | **settingsButton** | `boolean` | {@link StreamSettingsButtonDirective} | + * | **resolution** | `string` | {@link StreamResolutionDirective} | + * | **frameRate** | `number` | {@link StreamFrameRateDirective} | * *
{{ 'CUSTOM.BUTTON' | translate }}
- + 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 d7fad23e..4dd44d98 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 @@ -1,5 +1,6 @@ + */ + @Input() set simulcast(value: string | boolean) { + this._simulcast = this.castToBoolean(value); + } + /** * The **toolbarScreenshareButton** attribute allows show/hide the screenshare toolbar button. * @@ -524,6 +551,36 @@ export class OpenviduWebComponentComponent implements OnInit { @Input() set streamSettingsButton(value: string | boolean) { this._streamSettingsButton = this.castToBoolean(value); } + + /** + * The **resolution** directive allows to set a specific participant resolution in stream component. + * + * Default: `640x480` + * + *
+ * 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 streamResolution(value: string) { + this._streamResolution = value; + } + + /** + * The **frameRate** directive allows initialize the publisher with a specific frame rate in stream component. + * + * Default: `30` + * + *
+ * 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 streamFrameRate(value: number) { + this._streamFrameRate = Number(value); + } /** * The **participantPanelItemMuteButton** attribute allows show/hide the muted button in participant panel item component. *