From 51728ec2d1c46a0e0e2d6e4e1806727d2e7e6840 Mon Sep 17 00:00:00 2001 From: Carlos Santos <4a.santos@gmail.com> Date: Fri, 17 Feb 2023 17:39:14 +0100 Subject: [PATCH] openvidu-components: Renamed streaming by broadcasting on webcomponent --- .../e2e/webcomponent-app/app.js | 18 +++--- .../e2e/webcomponent.test.ts | 6 +- .../openvidu-webcomponent.component.html | 14 ++--- .../openvidu-webcomponent.component.ts | 56 +++++++++---------- 4 files changed, 47 insertions(+), 47 deletions(-) diff --git a/openvidu-components-angular/e2e/webcomponent-app/app.js b/openvidu-components-angular/e2e/webcomponent-app/app.js index 27c95058..dfa6caeb 100644 --- a/openvidu-components-angular/e2e/webcomponent-app/app.js +++ b/openvidu-components-angular/e2e/webcomponent-app/app.js @@ -10,7 +10,7 @@ var SCREENSHARE_BUTTON; var FULLSCREEN_BUTTON; var ACTIVITIES_PANEL_BUTTON; var RECORDING_BUTTON; -var STREAMING_BUTTON; +var BROADCASTING_BUTTON; var CHAT_PANEL_BUTTON; var DISPLAY_LOGO; var DISPLAY_SESSION_NAME; @@ -21,9 +21,9 @@ var LEAVE_BUTTON; var PARTICIPANT_MUTE_BUTTON; var PARTICIPANTS_PANEL_BUTTON; var ACTIVITIES_RECORDING_ACTIVITY; -var ACTIVITIES_STREAMING_ACTIVITY; +var ACTIVITIES_BROADCASTING_ACTIVITY; var RECORDING_ERROR; -var STREAMING_ERROR; +var BROADCASTING_ERROR; var TOOLBAR_SETTINGS_BUTTON; var CAPTIONS_BUTTON; @@ -57,11 +57,11 @@ $(document).ready(() => { RECORDING_BUTTON = url.searchParams.get('toolbarRecordingButton') === null ? true : url.searchParams.get('toolbarRecordingButton') === 'true'; FULLSCREEN_BUTTON = url.searchParams.get('fullscreenBtn') === null ? true : url.searchParams.get('fullscreenBtn') === 'true'; - STREAMING_BUTTON = + BROADCASTING_BUTTON = url.searchParams.get('toolbarBroadcastingButton') === null ? true : url.searchParams.get('toolbarBroadcastingButton') === 'true'; if (url.searchParams.get('broadcastingError') !== null) { - STREAMING_ERROR = url.searchParams.get('broadcastingError'); + BROADCASTING_ERROR = url.searchParams.get('broadcastingError'); } TOOLBAR_SETTINGS_BUTTON = @@ -74,7 +74,7 @@ $(document).ready(() => { CHAT_PANEL_BUTTON = url.searchParams.get('chatPanelBtn') === null ? true : url.searchParams.get('chatPanelBtn') === 'true'; PARTICIPANTS_PANEL_BUTTON = url.searchParams.get('participantsPanelBtn') === null ? true : url.searchParams.get('participantsPanelBtn') === 'true'; - ACTIVITIES_STREAMING_ACTIVITY = + ACTIVITIES_BROADCASTING_ACTIVITY = url.searchParams.get('activitiesPanelBroadcastingActivity') === null ? true : url.searchParams.get('activitiesPanelBroadcastingActivity') === 'true'; @@ -220,7 +220,7 @@ async function joinSession(sessionName, participantName) { webComponent.toolbarCaptionsButton = CAPTIONS_BUTTON; webComponent.toolbarLeaveButton = LEAVE_BUTTON; webComponent.toolbarRecordingButton = RECORDING_BUTTON; - webComponent.toolbarBroadcastingButton = STREAMING_BUTTON; + webComponent.toolbarBroadcastingButton = BROADCASTING_BUTTON; webComponent.toolbarActivitiesPanelButton = ACTIVITIES_PANEL_BUTTON; webComponent.toolbarChatPanelButton = CHAT_PANEL_BUTTON; webComponent.toolbarParticipantsPanelButton = PARTICIPANTS_PANEL_BUTTON; @@ -233,10 +233,10 @@ async function joinSession(sessionName, participantName) { webComponent.recordingActivityRecordingsList = [{ status: 'ready' }]; webComponent.activitiesPanelRecordingActivity = ACTIVITIES_RECORDING_ACTIVITY; - webComponent.activitiesPanelBroadcastingActivity = ACTIVITIES_STREAMING_ACTIVITY; + webComponent.activitiesPanelBroadcastingActivity = ACTIVITIES_BROADCASTING_ACTIVITY; webComponent.recordingActivityRecordingError = RECORDING_ERROR; - webComponent.broadcastingActivityBroadcastingError = { message: STREAMING_ERROR, broadcastAvailable: true }; + webComponent.broadcastingActivityBroadcastingError = { message: BROADCASTING_ERROR, broadcastAvailable: true }; webComponent.participantName = participantName; webComponent.tokens = tokens; diff --git a/openvidu-components-angular/e2e/webcomponent.test.ts b/openvidu-components-angular/e2e/webcomponent.test.ts index 4ea8e8e7..26164b59 100644 --- a/openvidu-components-angular/e2e/webcomponent.test.ts +++ b/openvidu-components-angular/e2e/webcomponent.test.ts @@ -307,7 +307,7 @@ describe('Testing API Directives', () => { expect(await utils.isPresent('#recording-btn')).to.be.false; }); - it('should HIDE the TOOLBAR STREAMING button', async () => { + it('should HIDE the TOOLBAR BROADCASTING button', async () => { await browser.get(`${url}&prejoin=false&toolbarBroadcastingButton=false`); await utils.checkSessionIsPresent(); @@ -570,7 +570,7 @@ describe('Testing API Directives', () => { expect(await utils.isPresent('.recording-error')).to.be.true; }); - it('should SHOW a STREAMING ERROR in activities panel', async () => { + it('should SHOW a BROADCASTING ERROR in activities panel', async () => { let element; const fixedUrl = `${url}&prejoin=false&broadcastingError=TEST_ERROR`; await browser.get(fixedUrl); @@ -605,7 +605,7 @@ describe('Testing API Directives', () => { expect(await element.getAttribute('innerText')).equal('TEST_ERROR'); }); - it('should HIDE the STREAMING ACTIVITY in activities panel', async () => { + it('should HIDE the BROADCASTING ACTIVITY in activities panel', async () => { await browser.get(`${url}&prejoin=false&activitiesPanelBroadcastingActivity=false`); await utils.checkSessionIsPresent(); 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 629b4b58..ed60f57d 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 @@ -11,7 +11,7 @@ [audioMuted]="_audioMuted" [toolbarScreenshareButton]="_toolbarScreenshareButton" [toolbarRecordingButton]="_toolbarRecordingButton" - [toolbarStreamingButton]="_toolbarStreamingButton" + [toolbarBroadcastingButton]="_toolbarBroadcastingButton" [toolbarFullscreenButton]="_toolbarFullscreenButton" [toolbarBackgroundEffectsButton]="_toolbarBackgroundEffectsButton" [toolbarSettingsButton]="_toolbarSettingsButton" @@ -27,11 +27,11 @@ [streamSettingsButton]="_streamSettingsButton" [participantPanelItemMuteButton]="_participantPanelItemMuteButton" [activitiesPanelRecordingActivity]="_activitiesPanelRecordingActivity" - [activitiesPanelStreamingActivity]="_activitiesPanelStreamingActivity" + [activitiesPanelBroadcastingActivity]="_activitiesPanelBroadcastingActivity" [recordingActivityRecordingsList]="_recordingActivityRecordingsList" [recordingActivityRecordingError]="_recordingActivityRecordingError" - [streamingActivityStreamingInfo]="_streamingActivityStreamingInfo" - [streamingActivityStreamingError]="_streamingActivityStreamingError" + [broadcastingActivityBroadcastingInfo]="_broadcastingActivityBroadcastingInfo" + [broadcastingActivityBroadcastingError]="_broadcastingActivityBroadcastingError" (onJoinButtonClicked)="_onJoinButtonClicked()" (onToolbarLeaveButtonClicked)="_onToolbarLeaveButtonClicked()" (onToolbarCameraButtonClicked)="_onToolbarCameraButtonClicked()" @@ -43,13 +43,13 @@ (onToolbarFullscreenButtonClicked)="_onToolbarFullscreenButtonClicked()" (onToolbarStartRecordingClicked)="onStartRecordingClicked('toolbar')" (onToolbarStopRecordingClicked)="onStopRecordingClicked('toolbar')" - (onToolbarStopStreamingClicked)="onStopStreamingClicked('toolbar')" + (onToolbarStopBroadcastingClicked)="onStopBroadcastingClicked('toolbar')" (onActivitiesPanelStartRecordingClicked)="onStartRecordingClicked('panel')" (onActivitiesPanelStopRecordingClicked)="onStopRecordingClicked('panel')" (onActivitiesPanelDownloadRecordingClicked)="_onActivitiesDownloadRecordingClicked($event)" (onActivitiesPanelDeleteRecordingClicked)="_onActivitiesDeleteRecordingClicked($event)" - (onActivitiesPanelStartStreamingClicked)="onStartStreamingClicked($event)" - (onActivitiesPanelStopStreamingClicked)="onStopStreamingClicked('panel')" + (onActivitiesPanelStartBroadcastingClicked)="onStartBroadcastingClicked($event)" + (onActivitiesPanelStopBroadcastingClicked)="onStopBroadcastingClicked('panel')" (onSessionCreated)="_onSessionCreated($event)" (onParticipantCreated)="_onParticipantCreated($event)" > 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 d77dab53..a9f98c22 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 @@ -66,7 +66,7 @@ export class OpenviduWebComponentComponent implements OnInit { /** * @internal */ - _toolbarStreamingButton: boolean = true; + _toolbarBroadcastingButton: boolean = true; /** * @internal */ @@ -134,7 +134,7 @@ export class OpenviduWebComponentComponent implements OnInit { /** * @internal */ - _activitiesPanelStreamingActivity: boolean = true; + _activitiesPanelBroadcastingActivity: boolean = true; /** * @internal @@ -144,7 +144,7 @@ export class OpenviduWebComponentComponent implements OnInit { /** * @internal */ - _streamingActivityStreamingError: any; + _broadcastingActivityBroadcastingError: any; /** * The **minimal** attribute applies a minimal UI hiding all controls except for cam and mic. @@ -288,7 +288,7 @@ export class OpenviduWebComponentComponent implements OnInit { } /** - * The **toolbarStreamingButton** attribute allows show/hide the start/stop streaming toolbar button. + * The **toolbarBroadcastingButton** attribute allows show/hide the start/stop broadcasting toolbar button. * * Default: `true` * @@ -296,10 +296,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 toolbarStreamingButton(value: string | boolean) { - this._toolbarStreamingButton = this.castToBoolean(value); + @Input() set toolbarBroadcastingButton(value: string | boolean) { + this._toolbarBroadcastingButton = this.castToBoolean(value); } /** * The **toolbarFullscreenButton** attribute allows show/hide the fullscreen toolbar button. @@ -526,27 +526,27 @@ export class OpenviduWebComponentComponent implements OnInit { } /** - * The **activitiesPanelStreamingActivity** attribute allows show/hide the streaming activity in {@link ActivitiesPanelComponent}. + * The **activitiesPanelBroadcastingActivity** attribute allows show/hide the broadcasting activity in {@link ActivitiesPanelComponent}. * * Default: `true` * * @example - * + * */ - @Input() set activitiesPanelStreamingActivity(value: string | boolean) { - this._activitiesPanelStreamingActivity = this.castToBoolean(value); + @Input() set activitiesPanelBroadcastingActivity(value: string | boolean) { + this._activitiesPanelBroadcastingActivity = this.castToBoolean(value); } /** - * The **streamingActivityStreamingError** attribute allows to show any possible error with the streaming in the {@link StreamingActivityComponent}. + * The **broadcastingActivityBroadcastingError** attribute allows to show any possible error with the broadcasting in the {@link BroadcastingActivityComponent}. * * Default: `undefined` * * @example - * + * */ - @Input() set streamingActivityStreamingError(value: any) { - this._streamingActivityStreamingError = value; + @Input() set broadcastingActivityBroadcastingError(value: any) { + this._broadcastingActivityBroadcastingError = value; } /** @@ -618,10 +618,10 @@ export class OpenviduWebComponentComponent implements OnInit { @Output() onToolbarStopRecordingClicked: EventEmitter = new EventEmitter(); /** - * Provides event notifications that fire when stop streaming button is clicked from {@link ToolbarComponent}. + * Provides event notifications that fire when stop broadcasting button is clicked from {@link ToolbarComponent}. * The recording should be stopped using the REST API. */ - @Output() onToolbarStopStreamingClicked: EventEmitter = new EventEmitter(); + @Output() onToolbarStopBroadcastingClicked: EventEmitter = new EventEmitter(); /** * Provides event notifications that fire when start recording button is clicked {@link ActivitiesPanelComponent}. @@ -647,16 +647,16 @@ export class OpenviduWebComponentComponent implements OnInit { @Output() onActivitiesPanelDeleteRecordingClicked: EventEmitter = new EventEmitter(); /** - * Provides event notifications that fire when start streaming button is clicked {@link ActivitiesPanelComponent}. - * The streaming should be started using the REST API. + * Provides event notifications that fire when start broadcasting button is clicked {@link ActivitiesPanelComponent}. + * The broadcasting should be started using the REST API. */ - @Output() onActivitiesPanelStartStreamingClicked: EventEmitter = new EventEmitter(); + @Output() onActivitiesPanelStartBroadcastingClicked: EventEmitter = new EventEmitter(); /** - * Provides event notifications that fire when stop streaming button is clicked {@link ActivitiesPanelComponent}. - * The streaming should be stopped using the REST API. + * Provides event notifications that fire when stop broadcasting button is clicked {@link ActivitiesPanelComponent}. + * The broadcasting should be stopped using the REST API. */ - @Output() onActivitiesPanelStopStreamingClicked: EventEmitter = new EventEmitter(); + @Output() onActivitiesPanelStopBroadcastingClicked: EventEmitter = new EventEmitter(); /** * Provides event notifications that fire when OpenVidu Session is created. @@ -811,22 +811,22 @@ export class OpenviduWebComponentComponent implements OnInit { /** * @internal */ - onStartStreamingClicked(rtmpUrl: string) { + onStartBroadcastingClicked(rtmpUrl: string) { // if (from === 'toolbar') { // this.onToolbarStartRecordingClicked.emit(); // } else if (from === 'panel') { - this.onActivitiesPanelStartStreamingClicked.emit(rtmpUrl); + this.onActivitiesPanelStartBroadcastingClicked.emit(rtmpUrl); // } } /** * @internal */ - onStopStreamingClicked(from: string) { + onStopBroadcastingClicked(from: string) { if (from === 'toolbar') { - this.onToolbarStopStreamingClicked.emit(); + this.onToolbarStopBroadcastingClicked.emit(); } else if (from === 'panel') { - this.onActivitiesPanelStopStreamingClicked.emit(); + this.onActivitiesPanelStopBroadcastingClicked.emit(); } }