openvidu-components: Renamed streaming by broadcasting on webcomponent

pull/780/head
Carlos Santos 2023-02-17 17:39:14 +01:00
parent 54b7f82881
commit 51728ec2d1
4 changed files with 47 additions and 47 deletions

View File

@ -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;

View File

@ -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();

View File

@ -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)"
></ov-videoconference>

View File

@ -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 {
* <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-streaming-button="false"></openvidu-webcomponent>
* <openvidu-webcomponent toolbar-broadcasting-button="false"></openvidu-webcomponent>
*/
@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
* <openvidu-webcomponent activity-panel-streaming-activity="false"></openvidu-webcomponent>
* <openvidu-webcomponent activity-panel-broadcasting-activity="false"></openvidu-webcomponent>
*/
@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
* <openvidu-webcomponent streaming-activity-streaming-error="streamingError"></openvidu-webcomponent>
* <openvidu-webcomponent broadcasting-activity-broadcasting-error="broadcastingError"></openvidu-webcomponent>
*/
@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<void> = new EventEmitter<void>();
/**
* 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<void> = new EventEmitter<void>();
@Output() onToolbarStopBroadcastingClicked: EventEmitter<void> = new EventEmitter<void>();
/**
* 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<string> = new EventEmitter<string>();
/**
* 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<string> = new EventEmitter<string>();
@Output() onActivitiesPanelStartBroadcastingClicked: EventEmitter<string> = new EventEmitter<string>();
/**
* 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<void> = new EventEmitter<void>();
@Output() onActivitiesPanelStopBroadcastingClicked: EventEmitter<void> = new EventEmitter<void>();
/**
* 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();
}
}