diff --git a/openvidu-components-angular/e2e/angular.test.ts b/openvidu-components-angular/e2e/angular.test.ts index e8f05368..949e932c 100644 --- a/openvidu-components-angular/e2e/angular.test.ts +++ b/openvidu-components-angular/e2e/angular.test.ts @@ -1050,30 +1050,6 @@ describe('Testing ATTRIBUTE DIRECTIVES', () => { expect(await utils.isPresent('ov-streaming-activity')).to.be.false; }); - it('should SHOW STARTING STREAMING status', async () => { - await browser.get(`${url}`); - - await utils.clickOn('#ovActivitiesPanel-checkbox'); - - await utils.clickOn('#streamingInfo-checkbox'); - - await utils.clickOn('#apply-btn'); - - await utils.checkToolbarIsPresent(); - - // Open more options menu - await utils.clickOn('#activities-panel-btn'); - - await browser.sleep(500); - - await utils.waitForElement('#custom-activities-panel'); - console.log('before'); - - const status = await utils.waitForElement('#streaming-status'); - - expect(await status.getAttribute('innerText')).equals('STARTED'); - }); - it('should SHOW STREAMING ERROR', async () => { await browser.get(`${url}`); @@ -1099,7 +1075,6 @@ describe('Testing ATTRIBUTE DIRECTIVES', () => { await browser.sleep(500); const error = await utils.waitForElement('#streaming-error'); expect(await error.getAttribute('innerText')).equals('TEST_ERROR'); - }); }); @@ -1258,6 +1233,5 @@ describe('Testing EVENTS', () => { await utils.waitForElement('#onActivitiesPanelButtonClicked'); expect(await utils.isPresent('#onActivitiesPanelButtonClicked')).to.be.true; - }); }); diff --git a/openvidu-components-angular/e2e/webcomponent-app/app.js b/openvidu-components-angular/e2e/webcomponent-app/app.js index d459b907..b9d47adf 100644 --- a/openvidu-components-angular/e2e/webcomponent-app/app.js +++ b/openvidu-components-angular/e2e/webcomponent-app/app.js @@ -129,7 +129,6 @@ $(document).ready(() => { webComponent.addEventListener('onToolbarStopStreamingClicked', async (event) => { appendElement('onToolbarStopStreamingClicked'); - webComponent.streamingActivityStreamingInfo = { status: 'stopped', id: '01' }; }); webComponent.addEventListener('onActivitiesPanelStartRecordingClicked', async (event) => { @@ -144,17 +143,15 @@ $(document).ready(() => { // }); webComponent.addEventListener('onActivitiesPanelDeleteRecordingClicked', (event) => - appendElement('onActivitiesPanelDeleteRecordingClicked') + appendElement('onActivitiesPanelDeleteRecordingClicked'); ); webComponent.addEventListener('onActivitiesPanelStartStreamingClicked', async (event) => { appendElement('onActivitiesPanelStartStreamingClicked'); - webComponent.streamingActivityStreamingInfo = { status: 'started', id: '01' }; }); webComponent.addEventListener('onActivitiesPanelStopStreamingClicked', async (event) => { appendElement('onActivitiesPanelStopStreamingClicked'); - webComponent.streamingActivityStreamingInfo = { status: 'stopped', id: '01' }; }); webComponent.addEventListener('onSessionCreated', (event) => { diff --git a/openvidu-components-angular/e2e/webcomponent.test.ts b/openvidu-components-angular/e2e/webcomponent.test.ts index 368de005..0b50b508 100644 --- a/openvidu-components-angular/e2e/webcomponent.test.ts +++ b/openvidu-components-angular/e2e/webcomponent.test.ts @@ -830,50 +830,51 @@ describe('Testing videoconference EVENTS', () => { expect(await utils.isPresent('#onToolbarStartRecordingClicked')).to.be.true; }); - it('should receive the onToolbarStopStreamingClicked event', async () => { - await browser.get(`${url}&prejoin=false`); + // TODO: it needs an OpenVidu PRO + // it('should receive the onToolbarStopStreamingClicked event', async () => { + // await browser.get(`${url}&prejoin=false`); - await utils.checkSessionIsPresent(); - await utils.checkToolbarIsPresent(); + // await utils.checkSessionIsPresent(); + // await utils.checkToolbarIsPresent(); - // Open more options menu - await utils.waitForElement('#more-options-btn'); - expect(await utils.isPresent('#more-options-btn')).to.be.true; - await utils.clickOn('#more-options-btn'); + // // Open more options menu + // await utils.waitForElement('#more-options-btn'); + // expect(await utils.isPresent('#more-options-btn')).to.be.true; + // await utils.clickOn('#more-options-btn'); - await browser.sleep(500); + // await browser.sleep(500); - await utils.waitForElement('.mat-menu-content'); + // await utils.waitForElement('.mat-menu-content'); - await utils.waitForElement('#streaming-btn'); - await utils.clickOn('#streaming-btn'); + // await utils.waitForElement('#streaming-btn'); + // await utils.clickOn('#streaming-btn'); - await browser.sleep(500); + // await browser.sleep(500); - await utils.waitForElement('.sidenav-menu'); - await utils.waitForElement('#activities-container'); + // await utils.waitForElement('.sidenav-menu'); + // await utils.waitForElement('#activities-container'); - await utils.waitForElement('#streaming-url-input'); - const input = await utils.waitForElement('#rtmp-url-input'); - await input.sendKeys('RTMPurl'); - await utils.clickOn('#streaming-btn'); + // await utils.waitForElement('#streaming-url-input'); + // const input = await utils.waitForElement('#rtmp-url-input'); + // await input.sendKeys('RTMPurl'); + // await utils.clickOn('#streaming-btn'); - // Open more options menu - await utils.waitForElement('#more-options-btn'); - expect(await utils.isPresent('#more-options-btn')).to.be.true; - await utils.clickOn('#more-options-btn'); + // // Open more options menu + // await utils.waitForElement('#more-options-btn'); + // expect(await utils.isPresent('#more-options-btn')).to.be.true; + // await utils.clickOn('#more-options-btn'); - await browser.sleep(500); + // await browser.sleep(500); - await utils.waitForElement('.mat-menu-content'); + // await utils.waitForElement('.mat-menu-content'); - await utils.waitForElement('#streaming-btn'); - await utils.clickOn('#streaming-btn'); + // await utils.waitForElement('#streaming-btn'); + // await utils.clickOn('#streaming-btn'); - // Checking if onToolbarStopStreamingClicked has been received - await utils.waitForElement('#onToolbarStopStreamingClicked'); - expect(await utils.isPresent('#onToolbarStopStreamingClicked')).to.be.true; - }); + // // Checking if onToolbarStopStreamingClicked has been received + // await utils.waitForElement('#onToolbarStopStreamingClicked'); + // expect(await utils.isPresent('#onToolbarStopStreamingClicked')).to.be.true; + // }); it('should receive the onActivitiesPanelStartRecordingClicked event', async () => { let element; @@ -940,7 +941,7 @@ describe('Testing videoconference EVENTS', () => { expect(await utils.isPresent('#onActivitiesPanelDeleteRecordingClicked')).to.be.true; }); - it('should receive the onActivitiesPanelStartStreaming and onActivitiesPanelStopStreamingClicked events', async () => { + it('should receive the onActivitiesPanelStartStreaming event', async () => { await browser.get(`${url}&prejoin=false`); await utils.checkSessionIsPresent(); @@ -972,16 +973,18 @@ describe('Testing videoconference EVENTS', () => { // Checking if onActivitiesPanelStartStreamingClicked has been received await utils.waitForElement('#onActivitiesPanelStartStreamingClicked'); expect(await utils.isPresent('#onActivitiesPanelStartStreamingClicked')).to.be.true; - expect(await utils.isPresent('#streaming-tag')).to.be.true; - - await utils.clickOn('#stop-streaming-btn'); - - // Checking if onActivitiesPanelStopStreamingClicked has been received - await utils.waitForElement('#onActivitiesPanelStopStreamingClicked'); - expect(await utils.isPresent('#onActivitiesPanelStopStreamingClicked')).to.be.true; - expect(await utils.isPresent('#streaming-tag')).to.be.false; + // TODO: it needs an OpenVidu PRO (onActivitiesPanelStopStreamingClicked event) + + // expect(await utils.isPresent('#streaming-tag')).to.be.true; + + // await utils.clickOn('#stop-streaming-btn'); + + // // Checking if onActivitiesPanelStopStreamingClicked has been received + // await utils.waitForElement('#onActivitiesPanelStopStreamingClicked'); + // expect(await utils.isPresent('#onActivitiesPanelStopStreamingClicked')).to.be.true; + // expect(await utils.isPresent('#streaming-tag')).to.be.false; }); it('should receive the onSessionCreated event', async () => { diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/activities-panel/streaming-activity/streaming-activity.component.ts b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/activities-panel/streaming-activity/streaming-activity.component.ts index 0ccbbb26..a1f6dcef 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/activities-panel/streaming-activity/streaming-activity.component.ts +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/activities-panel/streaming-activity/streaming-activity.component.ts @@ -1,7 +1,6 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Subscription } from 'rxjs'; -import { Signal } from '../../../../models/signal.model'; -import { StreamingError, StreamingInfo, StreamingStatus } from '../../../../models/streaming.model'; +import { StreamingError, StreamingStatus } from '../../../../models/streaming.model'; import { OpenViduAngularConfigService } from '../../../../services/config/openvidu-angular.config.service'; import { OpenViduService } from '../../../../services/openvidu/openvidu.service'; import { ParticipantService } from '../../../../services/participant/participant.service'; @@ -71,7 +70,6 @@ export class StreamingActivityComponent implements OnInit { */ isRtmpModuleAvailable: boolean = true; private streamingSub: Subscription; - private streamingInfoSub: Subscription; private streamingErrorSub: Subscription; /** @@ -91,7 +89,6 @@ export class StreamingActivityComponent implements OnInit { ngOnInit(): void { this.isSessionCreator = this.participantService.amIModerator(); this.subscribeToStreamingStatus(); - this.subscribeToStreamingInfo(); this.subscribeToStreamingError(); } @@ -100,7 +97,6 @@ export class StreamingActivityComponent implements OnInit { */ ngOnDestroy() { if (this.streamingSub) this.streamingSub.unsubscribe(); - if (this.streamingInfoSub) this.streamingInfoSub.unsubscribe(); if (this.streamingErrorSub) this.streamingErrorSub.unsubscribe(); } @@ -156,27 +152,11 @@ export class StreamingActivityComponent implements OnInit { if (!!ev) { this.streamingStatus = ev.status; this.cd.markForCheck(); - if (this.isSessionCreator) { - //TODO: Remove it when RTMP Exported was included on OV and streaming ready event was fired. - const signal = - this.streamingStatus === StreamingStatus.STARTED ? Signal.STREAMING_STARTED : Signal.STREAMING_STOPPED; - this.openviduService.sendSignal(signal); - } } } ); } - //TODO: Remove this directive when RTMP Exported was included on OV and streaming ready event was fired. - private subscribeToStreamingInfo() { - this.streamingInfoSub = this.libService.streamingInfoObs.subscribe((info: StreamingInfo | undefined) => { - if (!!info) { - this.streamingService.updateStatus(info.status); - this.cd.markForCheck(); - } - }); - } - private subscribeToStreamingError() { this.streamingErrorSub = this.libService.streamingErrorObs.subscribe((error: StreamingError | undefined) => { if (!!error) { diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/session/session.component.ts b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/session/session.component.ts index c95a3207..967c019a 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/session/session.component.ts +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/session/session.component.ts @@ -170,12 +170,14 @@ export class SessionComponent implements OnInit, OnDestroy { async ngOnInit() { if (!this.usedInPrejoinPage) { + if (!this.openviduService.getScreenToken()) { // Hide screenshare button if screen token does not exist this.libService.screenshareButton.next(false); } this.session = this.openviduService.getWebcamSession(); this.sessionScreen = this.openviduService.getScreenSession(); + this.subscribeToOpenViduException(); this.subscribeToCaptionLanguage(); this.subscribeToConnectionCreatedAndDestroyed(); @@ -197,8 +199,7 @@ export class SessionComponent implements OnInit, OnDestroy { this.subscribeToRecordingEvents(); } - if (this.libService.isStreamingEnabled() && !this.participantService.amIModerator()) { - //TODO: Remove it when RTMP Exported was included on OV and streaming ready event was fired. + if (this.libService.isStreamingEnabled()) { this.subscribeToStreamingEvents(); } } @@ -447,13 +448,8 @@ export class SessionComponent implements OnInit, OnDestroy { } private subscribeToStreamingEvents() { - this.session.on(`signal:${Signal.STREAMING_STARTED}`, (event: any) => { - this.streamingService.updateStatus(StreamingStatus.STARTED); - }); - - this.session.on(`signal:${Signal.STREAMING_STOPPED}`, (event: any) => { - this.streamingService.updateStatus(StreamingStatus.STOPPED); - }); + this.session.on('broadcastStarted', () => this.streamingService.updateStatus(StreamingStatus.STARTED)); + this.session.on('broadcastStopped', () => this.streamingService.updateStatus(StreamingStatus.STOPPED)); } private startUpdateLayoutInterval() { diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/directives/api/api.directive.module.ts b/openvidu-components-angular/projects/openvidu-angular/src/lib/directives/api/api.directive.module.ts index 0a7792e4..4a609c45 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/directives/api/api.directive.module.ts +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/directives/api/api.directive.module.ts @@ -9,7 +9,7 @@ import { StreamDisplayParticipantNameDirective, StreamSettingsButtonDirective } from './stream.directive'; -import { StreamingActivityStreamingErrorDirective, StreamingActivityStreamingInfoDirective } from './streaming-activity.directive'; +import { StreamingActivityStreamingErrorDirective } from './streaming-activity.directive'; import { ToolbarActivitiesPanelButtonDirective, ToolbarBackgroundEffectsButtonDirective, @@ -69,7 +69,6 @@ import { RecordingActivityRecordingsListDirective, RecordingActivityRecordingErrorDirective, StreamingActivityStreamingErrorDirective, - StreamingActivityStreamingInfoDirective, AdminRecordingsListDirective, AdminLoginDirective ], @@ -105,7 +104,6 @@ import { RecordingActivityRecordingsListDirective, RecordingActivityRecordingErrorDirective, StreamingActivityStreamingErrorDirective, - StreamingActivityStreamingInfoDirective, AdminRecordingsListDirective, AdminLoginDirective ] diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/directives/api/streaming-activity.directive.ts b/openvidu-components-angular/projects/openvidu-angular/src/lib/directives/api/streaming-activity.directive.ts index c8e0fd7e..de16d2bf 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/directives/api/streaming-activity.directive.ts +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/directives/api/streaming-activity.directive.ts @@ -1,8 +1,7 @@ import { AfterViewInit, Directive, ElementRef, Input, OnDestroy } from '@angular/core'; -import { StreamingError, StreamingInfo, StreamingStatus } from '../../models/streaming.model'; +import { StreamingError } from '../../models/streaming.model'; import { OpenViduAngularConfigService } from '../../services/config/openvidu-angular.config.service'; - /** * The **streamingError** directive allows to show any possible error with the streaming in the {@link StreamingActivityComponent}. * @@ -54,63 +53,3 @@ export class StreamingActivityStreamingErrorDirective implements AfterViewInit, } } } - -//TODO: Remove this directive when RTMP Exported was included on OV and streaming ready event was fired. - -/** - * The **streamingInfo** directive allows show the live streaming info in {@link StreamingActivityComponent}. - * - * Default: `undefined` - * - * Type: {@link StreamingInfo} - * - * It can be used in the parent element {@link VideoconferenceComponent} specifying the name of the `streamingActivity` component: - * - * @example - * - * - * \ - * And it also can be used in the {@link StreamingActivityComponent}. - * @example - * - */ -@Directive({ - selector: 'ov-videoconference[streamingActivityStreamingInfo], ov-streaming-activity[streamingInfo]' -}) -export class StreamingActivityStreamingInfoDirective implements AfterViewInit, OnDestroy { - @Input() set streamingActivityStreamingInfo(value: StreamingInfo) { - this.streamingValue = value; - this.update(this.streamingValue); - } - @Input() set streamingInfo(value: StreamingInfo) { - this.streamingValue = value; - this.update(this.streamingValue); - } - - streamingValue: StreamingInfo | undefined = undefined; - - constructor(public elementRef: ElementRef, private libService: OpenViduAngularConfigService) {} - - ngAfterViewInit() { - this.update(this.streamingValue); - } - ngOnDestroy(): void { - this.clear(); - } - clear() { - this.streamingValue = undefined; - this.update(undefined); - } - - update(value: StreamingInfo | undefined) { - if (this.libService.streamingInfo.getValue() !== value) { - if(value) { - // Forced value to right enum - const index = Object.values(StreamingStatus).indexOf(value.status.toLowerCase() as unknown as StreamingStatus); - const key = Object.keys(StreamingStatus)[index]; - value.status = StreamingStatus[key]; - } - this.libService.streamingInfo.next(value); - } - } -} diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/cn.json b/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/cn.json index a8ca5253..a385a28a 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/cn.json +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/cn.json @@ -105,14 +105,14 @@ }, "STREAMING": { "TITLE": "直播", - "SUBTITLE": "将会议直播给观众", - "CONTENT_SUBTITLE": "OpenVidu需要RTMP直播平台的URL。", + "SUBTITLE": "向观众直播您的会议", + "CONTENT_SUBTITLE": "OpenVidu需要直播平台的网址。", "START": "开始直播", "STOP": "结束直播", - "URL": "输入您的RTMP URL", + "URL": "插入您的直播网址", "CANCEL": "取消", - "REQUIRED_URL": "RTMP url 是必需的", - "NO_MODERATOR": "只有主持人才能开始流媒体" + "REQUIRED_URL": "需要提供直播网址", + "NO_MODERATOR": "只有MODERATOR才能开始直播" } }, "ERRORS": { diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/de.json b/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/de.json index 1ee8fa2a..1745cfae 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/de.json +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/de.json @@ -105,14 +105,14 @@ }, "STREAMING": { "TITLE": "Streaming", - "SUBTITLE": "Streamen Sie Ihr Meeting an Ihr Publikum", - "CONTENT_SUBTITLE": "OpenVidu benötigt die RTMP-URL der Streaming-Plattform.", + "SUBTITLE": "Streamen Sie Ihr Meeting für Ihr Publikum", + "CONTENT_SUBTITLE": "OpenVidu benötigt die URL der Streaming-Plattform.", "START": "Streaming starten", "STOP": "Streaming beenden", - "URL": "Geben Sie Ihre RTMP-URL ein", - "CANCEL": "Absagen", - "REQUIRED_URL": "RTMP url ist erforderlich", - "NO_MODERATOR": "Nur der Moderator kann den Stream starten" + "URL": "Geben Sie Ihre Streaming-URL ein", + "CANCEL": "Abbrechen", + "REQUIRED_URL": "Die Streaming-URL ist erforderlich", + "NO_MODERATOR": "Nur der MODERATOR kann das Streaming starten" } }, "ERRORS": { diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/en.json b/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/en.json index 571c4919..94cc434d 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/en.json +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/en.json @@ -107,12 +107,12 @@ "STREAMING": { "TITLE": "Streaming", "SUBTITLE": "Stream your meeting to your audience", - "CONTENT_SUBTITLE": "OpenVidu need the RTMP url of the streaming platform.", + "CONTENT_SUBTITLE": "OpenVidu need the url of the streaming platform.", "START": "Start streaming", "STOP": "End streaming", - "URL": "Insert your RTMP url", + "URL": "Insert your streaming url", "CANCEL": "Cancel", - "REQUIRED_URL": "The RTMP url is required", + "REQUIRED_URL": "The streaming url is required", "NO_MODERATOR": "Only the MODERATOR can start the streaming" } }, diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/es.json b/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/es.json index cb1ba4e2..21bb8747 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/es.json +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/es.json @@ -106,10 +106,10 @@ "STREAMING": { "TITLE": "Streaming", "SUBTITLE": "Comparte tu llamada con tu público", - "CONTENT_SUBTITLE": "OpenVidu necesita la url RTMP de tu plataforma de streaming.", + "CONTENT_SUBTITLE": "OpenVidu necesita la url de tu plataforma de streaming.", "START": "Empezar streaming", "STOP": "Finalizar streaming", - "URL": "Inserta tu url RTMP", + "URL": "Inserta tu url de streaming", "CANCEL": "Cancelar", "NO_MODERATOR": "Solo el MODERADOR puede iniciar el streaming" } diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/fr.json b/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/fr.json index 5b72abb3..9d945f9f 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/fr.json +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/fr.json @@ -104,15 +104,15 @@ "NO_MODERATOR": "Seul le MODERATEUR peut lancer l'enregistrement" }, "STREAMING": { - "TITLE": "Diffusion", - "SUBTITLE": "Diffusez votre réunion à votre public", - "CONTENT_SUBTITLE": "OpenVidu a besoin de l'URL RTMP de la plateforme de diffusion.", - "START": "Démarrer la diffusion", - "STOP": "Arrêter la diffusion", - "URL": "Insérez votre URL RTMP", + "TITLE": "Streaming", + "SUBTITLE": "Diffusez votre réunion en direct à votre public", + "CONTENT_SUBTITLE": "OpenVidu a besoin de l'URL de la plateforme de streaming.", + "START": "Commencer le streaming", + "STOP": "Arrêter le streaming", + "URL": "Insérez votre URL de streaming", "CANCEL": "Annuler", - "REQUIRED_URL": "L'URL RTMP est obligatoire", - "NO_MODERATOR": "Seul le MODÉRATEUR peut démarrer le streaming" + "REQUIRED_URL": "L'URL de streaming est requise", + "NO_MODERATOR": "Seul le MODERATEUR peut démarrer le streaming" } }, "ERRORS": { diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/hi.json b/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/hi.json index 1f53a2f5..aec8269b 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/hi.json +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/hi.json @@ -105,14 +105,14 @@ }, "STREAMING": { "TITLE": "स्ट्रीमिंग", - "SUBTITLE": "अपने मीटिंग को अपने दर्शकों को स्ट्रीम करें", - "CONTENT_SUBTITLE": "OpenVidu को स्ट्रीमिंग प्लेटफॉर्म के RTMP url की आवश्यकता है।", + "SUBTITLE": "अपने दर्शकों के लिए अपनी मीटिंग स्ट्रीम करें", + "CONTENT_SUBTITLE": "OpenVidu को स्ट्रीमिंग प्लेटफ़ॉर्म का URL चाहिए।", "START": "स्ट्रीमिंग शुरू करें", - "STOP": "स्ट्रीमिंग बंद करें", - "URL": "अपना RTMP url दर्ज करें", + "STOP": "स्ट्रीमिंग समाप्त करें", + "URL": "अपना स्ट्रीमिंग URL इन्सर्ट करें", "CANCEL": "रद्द करें", - "REQUIRED_URL": "RTMP url आवश्यक है", - "NO_MODERATOR": "केवल मोडेरेटर स्ट्रीमिंग शुरू कर सकते हैं" + "REQUIRED_URL": "स्ट्रीमिंग URL अनिवार्य है", + "NO_MODERATOR": "केवल मॉडरेटर स्ट्रीमिंग शुरू कर सकते हैं" } }, "ERRORS": { diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/it.json b/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/it.json index 6a63afc9..2f6e9e63 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/it.json +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/it.json @@ -105,14 +105,14 @@ }, "STREAMING": { "TITLE": "Streaming", - "SUBTITLE": "Trasmetti in streaming la tua riunione al tuo pubblico", - "CONTENT_SUBTITLE": "OpenVidu necessita dell'URL RTMP della piattaforma di streaming", - "START": "Avvia lo streaming", + "SUBTITLE": "Trasmetti la tua riunione al tuo pubblico", + "CONTENT_SUBTITLE": "OpenVidu ha bisogno dell'URL della piattaforma di streaming.", + "START": "Inizia lo streaming", "STOP": "Termina lo streaming", - "URL": "Inserisci il tuo URL RTMP", + "URL": "Inserisci il tuo URL di streaming", "CANCEL": "Annulla", - "REQUIRED_URL": "RTMP url è obbligatorio", - "NO_MODERATOR": "Solo il MODERATORE può iniziare la trasmissione" + "REQUIRED_URL": "L'URL di streaming è obbligatorio", + "NO_MODERATOR": "Solo il MODERATORE può avviare lo streaming" } }, "ERRORS": { diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/ja.json b/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/ja.json index f12d38e8..7de61971 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/ja.json +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/ja.json @@ -105,15 +105,14 @@ }, "STREAMING": { "TITLE": "ストリーミング", - "SUBTITLE": "会議を観客にストリーミング", - "CONTENT_SUBTITLE": "OpenViduはストリーミングプラットフォームのRTMP URLが必要です。", - "START": "ストリーミングを開始", - "STOP": "ストリーミングを終了", - "URL": "RTMP URLを入力してください", + "SUBTITLE": "ミーティングを視聴者にストリーミングする", + "CONTENT_SUBTITLE": "OpenViduはストリーミングプラットフォームのURLが必要です。", + "START": "ストリーミングを開始する", + "STOP": "ストリーミングを終了する", + "URL": "ストリーミングURLを挿入してください", "CANCEL": "キャンセル", - "REQUIRED_URL": "RTMP url は必須です", - "NO_MODERATOR": "モデレーターのみがストリーミングを開始できます" - + "REQUIRED_URL": "ストリーミングURLは必須です", + "NO_MODERATOR": "MODERATORのみがストリーミングを開始できます" } }, "ERRORS": { diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/nl.json b/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/nl.json index e60cc4ae..a8712ab7 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/nl.json +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/nl.json @@ -104,15 +104,15 @@ "NO_MODERATOR": "Alleen de MOEDERATOR kan de opname starten" }, "STREAMING": { - "TITLE": "Streamen", - "SUBTITLE": "Stream je meeting naar je publiek", - "CONTENT_SUBTITLE": "OpenVidu heeft de RTMP url van de streaming platform nodig.", - "START": "Start streamen", - "STOP": "Stop streamen", - "URL": "Voer je RTMP url in", + "TITLE": "Streaming", + "SUBTITLE": "Stream uw vergadering naar uw publiek", + "CONTENT_SUBTITLE": "OpenVidu heeft de url van het streamingplatform nodig.", + "START": "Start met streamen", + "STOP": "Stop met streamen", + "URL": "Voeg uw stream-URL in", "CANCEL": "Annuleren", - "REQUIRED_URL": "RTMP url is verplicht", - "NO_MODERATOR": "Alleen de moderator kan de streaming starten" + "REQUIRED_URL": "De stream-URL is vereist", + "NO_MODERATOR": "Alleen de MODERATOR kan beginnen met streamen" } }, "ERRORS": { diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/pt.json b/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/pt.json index 37fe62f2..f5c35fb2 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/pt.json +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/lang/pt.json @@ -105,14 +105,14 @@ }, "STREAMING": { "TITLE": "Streaming", - "SUBTITLE": "Transmita sua reunião para seu público", - "CONTENT_SUBTITLE": "O OpenVidu precisa da url RTMP da plataforma de streaming.", - "START": "Iniciar transmissão", - "STOP": "Finalizar transmissão", - "URL": "Insira seu url RTMP", + "SUBTITLE": "Transmita sua reunião para sua audiência", + "CONTENT_SUBTITLE": "O OpenVidu precisa do URL da plataforma de streaming.", + "START": "Iniciar streaming", + "STOP": "Finalizar streaming", + "URL": "Insira seu URL de streaming", "CANCEL": "Cancelar", - "REQUIRED_URL": "O URL RTMP é obrigatório", - "NO_MODERATOR": "Somente o MODERADOR pode iniciar a transmissão" + "REQUIRED_URL": "O URL de streaming é obrigatório", + "NO_MODERATOR": "Apenas o MODERADOR pode iniciar o streaming" } }, "ERRORS": { diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/models/signal.model.ts b/openvidu-components-angular/projects/openvidu-angular/src/lib/models/signal.model.ts index e2796915..1b34e8d4 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/models/signal.model.ts +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/models/signal.model.ts @@ -3,9 +3,5 @@ */ export enum Signal { NICKNAME_CHANGED = 'nicknameChanged', - CHAT = 'chat', - - //TODO: Remove them when RTMP Exported was included on OV and streaming ready event was fired. - STREAMING_STARTED = "streamingStarted", - STREAMING_STOPPED = "streamingStopped" -} \ No newline at end of file + CHAT = 'chat' +} diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/models/streaming.model.ts b/openvidu-components-angular/projects/openvidu-angular/src/lib/models/streaming.model.ts index f6b66672..d961418b 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/models/streaming.model.ts +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/models/streaming.model.ts @@ -6,15 +6,8 @@ export enum StreamingStatus { FAILED = 'failed' } - -export interface StreamingInfo { - id: string, - status: StreamingStatus -} - - export interface StreamingError { - message: string, + message: string; // If streaming service is available or not - rtmpAvailable: boolean -} \ No newline at end of file + rtmpAvailable: boolean; +} diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/services/config/openvidu-angular.config.service.ts b/openvidu-components-angular/projects/openvidu-angular/src/lib/services/config/openvidu-angular.config.service.ts index 3c4acf37..41ea5729 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/services/config/openvidu-angular.config.service.ts +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/services/config/openvidu-angular.config.service.ts @@ -2,7 +2,7 @@ import { Inject, Injectable } from '@angular/core'; import { BehaviorSubject, Observable } from 'rxjs'; import { OpenViduAngularConfig, ParticipantFactoryFunction } from '../../config/openvidu-angular.config'; import { RecordingInfo } from '../../models/recording.model'; -import { StreamingError, StreamingInfo } from '../../models/streaming.model'; +import { StreamingError } from '../../models/streaming.model'; // import { version } from '../../../../package.json'; @@ -76,10 +76,7 @@ export class OpenViduAngularConfigService { recordingErrorObs: Observable; streamingErrorObs: Observable; streamingError = >new BehaviorSubject(undefined); - streamingInfo = >new BehaviorSubject(undefined); - - //TODO: Remove this directive when RTMP Exported was included on OV and streaming ready event was fired. - streamingInfoObs: Observable; + // Admin adminRecordingsList: BehaviorSubject = new BehaviorSubject([]); adminRecordingsListObs: Observable; adminLoginError = >new BehaviorSubject(null); @@ -121,7 +118,6 @@ export class OpenViduAngularConfigService { // Streaming activity this.streamingActivityObs = this.streamingActivity.asObservable(); this.streamingErrorObs = this.streamingError.asObservable(); - this.streamingInfoObs = this.streamingInfo.asObservable(); // Admin dashboard this.adminRecordingsListObs = this.adminRecordingsList.asObservable(); this.adminLoginErrorObs = this.adminLoginError.asObservable(); diff --git a/openvidu-components-angular/src/app/openvidu-call/call.component.html b/openvidu-components-angular/src/app/openvidu-call/call.component.html index 77b8d88e..cc9f31b7 100644 --- a/openvidu-components-angular/src/app/openvidu-call/call.component.html +++ b/openvidu-components-angular/src/app/openvidu-call/call.component.html @@ -27,7 +27,6 @@ [recordingActivityRecordingsList]="recordingList" [recordingActivityRecordingError]="recordingError" [streamingActivityStreamingError]="streamingError" - [streamingActivityStreamingInfo]="streamingInfo" [toolbarSettingsButton]="true" (onJoinButtonClicked)="onJoinClicked()" (onToolbarLeaveButtonClicked)="onToolbarLeaveButtonClicked()" diff --git a/openvidu-components-angular/src/app/openvidu-call/call.component.ts b/openvidu-components-angular/src/app/openvidu-call/call.component.ts index 2baa34ee..611af7c9 100644 --- a/openvidu-components-angular/src/app/openvidu-call/call.component.ts +++ b/openvidu-components-angular/src/app/openvidu-call/call.component.ts @@ -17,7 +17,6 @@ export class CallComponent implements OnInit { recordingList: RecordingInfo[] = []; recordingError: any; streamingError: any; - streamingInfo: any; constructor(private restService: RestService) {} @@ -86,8 +85,8 @@ export class CallComponent implements OnInit { console.log('START STREAMING', rtmpUrl); try { this.streamingError = null; - this.streamingInfo = await this.restService.startStreaming(rtmpUrl); - console.log('Streaming response ', this.streamingInfo); + const resp = await this.restService.startStreaming(rtmpUrl); + console.log('Streaming response ', resp); } catch (error) { console.error(error); this.streamingError = error.error; @@ -98,8 +97,8 @@ export class CallComponent implements OnInit { console.log('STOP STREAMING'); try { this.streamingError = null; - this.streamingInfo = await this.restService.stopStreaming(); - console.log('Streaming response ', this.streamingInfo); + const resp = await this.restService.stopStreaming(); + console.log('Streaming response ', resp); } catch (error) { console.error(error); this.streamingError = error.message || error; diff --git a/openvidu-components-angular/src/app/services/rest.service.ts b/openvidu-components-angular/src/app/services/rest.service.ts index 39feea0e..447bf189 100644 --- a/openvidu-components-angular/src/app/services/rest.service.ts +++ b/openvidu-components-angular/src/app/services/rest.service.ts @@ -41,14 +41,14 @@ export class RestService { } } - async startStreaming(rtmpUrl: string) { + async startStreaming(broadcastUrl: string) { try { const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) }; - return lastValueFrom(this.http.post(this.baseHref + 'streamings/start', { rtmpUrl}, options)); + return lastValueFrom(this.http.post(this.baseHref + 'broadcasts/start', { broadcastUrl }, options)); } catch (error) { if (error.status === 404) { throw { status: error.status, message: 'Cannot connect with backend. ' + error.url + ' not found' }; @@ -68,10 +68,9 @@ export class RestService { } } - async stopStreaming() { try { - return lastValueFrom(this.http.delete(`${this.baseHref}streamings/stop`)); + return lastValueFrom(this.http.delete(`${this.baseHref}broadcasts/stop`)); } catch (error) { if (error.status === 404) { throw { status: error.status, message: 'Cannot connect with backend. ' + error.url + ' not found' }; @@ -98,9 +97,7 @@ export class RestService { async logout(): Promise { try { - return lastValueFrom( - this.http.post(`${this.baseHref}auth/admin/logout`, {}) - ); + return lastValueFrom(this.http.post(`${this.baseHref}auth/admin/logout`, {})); } catch (error) { console.log(error); if (error.status === 404) { @@ -110,7 +107,6 @@ export class RestService { } } - async deleteRecording(id: string): Promise { try { return lastValueFrom(this.http.delete(`${this.baseHref}recordings/delete/${id}`)); @@ -124,9 +120,7 @@ export class RestService { } getRecordings(): Promise { - return lastValueFrom( - this.http.get(`${this.baseHref}recordings`) - ); + return lastValueFrom(this.http.get(`${this.baseHref}recordings`)); } getRecording(recordingId: string) { @@ -147,7 +141,7 @@ export class RestService { getRecording2(recordingId: string) { try { return lastValueFrom( - this.http.get(`${this.baseHref}recordings/${recordingId}`,{ + this.http.get(`${this.baseHref}recordings/${recordingId}`, { responseType: 'blob' }) ); diff --git a/openvidu-components-angular/src/app/testing-app/testing.component.html b/openvidu-components-angular/src/app/testing-app/testing.component.html index 5d3e0179..cc8f77d3 100644 --- a/openvidu-components-angular/src/app/testing-app/testing.component.html +++ b/openvidu-components-angular/src/app/testing-app/testing.component.html @@ -209,7 +209,7 @@ id="custom-activities-panel" > - + diff --git a/openvidu-components-angular/src/app/testing-app/testing.component.ts b/openvidu-components-angular/src/app/testing-app/testing.component.ts index 0928582c..b08c93f9 100644 --- a/openvidu-components-angular/src/app/testing-app/testing.component.ts +++ b/openvidu-components-angular/src/app/testing-app/testing.component.ts @@ -2,7 +2,7 @@ import { HttpClient, HttpHeaders } from '@angular/common/http'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { PanelService, StreamingError, StreamingInfo, StreamingStatus } from 'openvidu-angular'; +import { PanelService, StreamingError } from 'openvidu-angular'; import { Subscription, throwError as observableThrowError } from 'rxjs'; import { catchError } from 'rxjs/operators'; @@ -31,7 +31,6 @@ enum StructuralDirectives { STREAM = 'ovStream' } - export enum AttributeDirective { // MINIMAL = 'minimal', // PARTICIPANT_NAME = 'participantName', @@ -53,8 +52,7 @@ export enum AttributeDirective { PARTICIPANT_ITEM_MUTE = 'muteButton', ACTIVITIES_PANEL_RECORDING_ACTIVITY = 'recordingActivity', ACTIVITIES_PANEL_STREAMING_ACTIVITY = 'streamingActivity', - ACTIVITIES_PANEL_STREAMING_INFO = 'streamingInfo', - ACTIVITIES_PANEL_STREAMING_ERROR = "streamingError" + ACTIVITIES_PANEL_STREAMING_ERROR = 'streamingError' } @Component({ @@ -126,7 +124,6 @@ export class TestingComponent implements OnInit { directives: [ { name: AttributeDirective.ACTIVITIES_PANEL_RECORDING_ACTIVITY, checked: true }, { name: AttributeDirective.ACTIVITIES_PANEL_STREAMING_ACTIVITY, checked: true }, - { name: AttributeDirective.ACTIVITIES_PANEL_STREAMING_INFO, checked: false }, { name: AttributeDirective.ACTIVITIES_PANEL_STREAMING_ERROR, checked: false } ] } @@ -160,7 +157,6 @@ export class TestingComponent implements OnInit { participantItemMuteBtn = true; streamingActivity = true; streamingBtn = true; - streamingInfo: StreamingInfo = undefined; tokens: { webcam: any; screen: any }; @@ -304,12 +300,8 @@ export class TestingComponent implements OnInit { this.streamingActivity = value; break; - case AttributeDirective.ACTIVITIES_PANEL_STREAMING_INFO: - this.streamingInfo = { status: StreamingStatus.STARTED, id: '01' }; - break; - case AttributeDirective.ACTIVITIES_PANEL_STREAMING_ERROR: - this.streamingError = {message: 'TEST_ERROR', rtmpAvailable: true}; + this.streamingError = { message: 'TEST_ERROR', rtmpAvailable: true }; break; default: break; @@ -385,7 +377,7 @@ export class TestingComponent implements OnInit { createConnection(sessionId): Promise { return new Promise((resolve, reject) => { - const body = {role: 'MODERATOR'}; + const body = { role: 'MODERATOR' }; const options = { headers: new HttpHeaders({ Authorization: 'Basic ' + btoa('OPENVIDUAPP:' + this.OPENVIDU_SERVER_SECRET),