diff --git a/openvidu-server/deployments/ce/docker-compose/.env b/openvidu-server/deployments/ce/docker-compose/.env index 20af6974..61859fe2 100644 --- a/openvidu-server/deployments/ce/docker-compose/.env +++ b/openvidu-server/deployments/ce/docker-compose/.env @@ -150,7 +150,7 @@ OPENVIDU_WEBHOOK=false # List of events that will be sent by OpenVidu Webhook service # Default value is all available events -OPENVIDU_WEBHOOK_EVENTS=[sessionCreated,sessionDestroyed,participantJoined,participantLeft,webrtcConnectionCreated,webrtcConnectionDestroyed,recordingStatusChanged,filterEventDispatched,mediaNodeStatusChanged,nodeCrashed,nodeRecovered] +OPENVIDU_WEBHOOK_EVENTS=[sessionCreated,sessionDestroyed,participantJoined,participantLeft,webrtcConnectionCreated,webrtcConnectionDestroyed,recordingStatusChanged,filterEventDispatched,mediaNodeStatusChanged,nodeCrashed,nodeRecovered,broadcastStarted,broadcastStopped] # How often the garbage collector of non active sessions runs. # This helps cleaning up sessions that have been initialized through diff --git a/openvidu-server/deployments/enterprise/master-node/.env b/openvidu-server/deployments/enterprise/master-node/.env index 8f38f83d..65f2a501 100644 --- a/openvidu-server/deployments/enterprise/master-node/.env +++ b/openvidu-server/deployments/enterprise/master-node/.env @@ -316,7 +316,7 @@ OPENVIDU_WEBHOOK=false # List of events that will be sent by OpenVidu Webhook service # Default value is all available events -OPENVIDU_WEBHOOK_EVENTS=[sessionCreated,sessionDestroyed,participantJoined,participantLeft,webrtcConnectionCreated,webrtcConnectionDestroyed,recordingStatusChanged,filterEventDispatched,mediaNodeStatusChanged,nodeCrashed,nodeRecovered] +OPENVIDU_WEBHOOK_EVENTS=[sessionCreated,sessionDestroyed,participantJoined,participantLeft,webrtcConnectionCreated,webrtcConnectionDestroyed,recordingStatusChanged,filterEventDispatched,mediaNodeStatusChanged,nodeCrashed,nodeRecovered,broadcastStarted,broadcastStopped] # How often the garbage collector of non active sessions runs. # This helps cleaning up sessions that have been initialized through diff --git a/openvidu-server/deployments/pro/docker-compose/mono-node/.env b/openvidu-server/deployments/pro/docker-compose/mono-node/.env index 18ce8d7e..056f15a3 100644 --- a/openvidu-server/deployments/pro/docker-compose/mono-node/.env +++ b/openvidu-server/deployments/pro/docker-compose/mono-node/.env @@ -269,7 +269,7 @@ OPENVIDU_WEBHOOK=false # List of events that will be sent by OpenVidu Webhook service # Default value is all available events -OPENVIDU_WEBHOOK_EVENTS=[sessionCreated,sessionDestroyed,participantJoined,participantLeft,webrtcConnectionCreated,webrtcConnectionDestroyed,recordingStatusChanged,filterEventDispatched,mediaNodeStatusChanged,nodeCrashed,nodeRecovered] +OPENVIDU_WEBHOOK_EVENTS=[sessionCreated,sessionDestroyed,participantJoined,participantLeft,webrtcConnectionCreated,webrtcConnectionDestroyed,recordingStatusChanged,filterEventDispatched,mediaNodeStatusChanged,nodeCrashed,nodeRecovered,broadcastStarted,broadcastStopped] # How often the garbage collector of non active sessions runs. # This helps cleaning up sessions that have been initialized through diff --git a/openvidu-server/deployments/pro/docker-compose/openvidu-server-pro/.env b/openvidu-server/deployments/pro/docker-compose/openvidu-server-pro/.env index 5d4d7966..b542460b 100644 --- a/openvidu-server/deployments/pro/docker-compose/openvidu-server-pro/.env +++ b/openvidu-server/deployments/pro/docker-compose/openvidu-server-pro/.env @@ -312,7 +312,7 @@ OPENVIDU_WEBHOOK=false # List of events that will be sent by OpenVidu Webhook service # Default value is all available events -OPENVIDU_WEBHOOK_EVENTS=[sessionCreated,sessionDestroyed,participantJoined,participantLeft,webrtcConnectionCreated,webrtcConnectionDestroyed,recordingStatusChanged,filterEventDispatched,mediaNodeStatusChanged,nodeCrashed,nodeRecovered] +OPENVIDU_WEBHOOK_EVENTS=[sessionCreated,sessionDestroyed,participantJoined,participantLeft,webrtcConnectionCreated,webrtcConnectionDestroyed,recordingStatusChanged,filterEventDispatched,mediaNodeStatusChanged,nodeCrashed,nodeRecovered,broadcastStarted,broadcastStopped] # How often the garbage collector of non active sessions runs. # This helps cleaning up sessions that have been initialized through diff --git a/openvidu-server/src/main/java/io/openvidu/server/cdr/CDREventName.java b/openvidu-server/src/main/java/io/openvidu/server/cdr/CDREventName.java index 825f28c7..9bf49bf8 100644 --- a/openvidu-server/src/main/java/io/openvidu/server/cdr/CDREventName.java +++ b/openvidu-server/src/main/java/io/openvidu/server/cdr/CDREventName.java @@ -21,6 +21,6 @@ public enum CDREventName { sessionCreated, sessionDestroyed, participantJoined, participantLeft, webrtcConnectionCreated, webrtcConnectionDestroyed, recordingStatusChanged, filterEventDispatched, signalSent, mediaNodeStatusChanged, - autoscaling, nodeCrashed, nodeRecovered + autoscaling, nodeCrashed, nodeRecovered, broadcastStarted, broadcastStopped } diff --git a/openvidu-server/src/main/java/io/openvidu/server/rest/ConfigRestController.java b/openvidu-server/src/main/java/io/openvidu/server/rest/ConfigRestController.java index cbee127f..a195ee5b 100644 --- a/openvidu-server/src/main/java/io/openvidu/server/rest/ConfigRestController.java +++ b/openvidu-server/src/main/java/io/openvidu/server/rest/ConfigRestController.java @@ -110,6 +110,9 @@ public class ConfigRestController { json.addProperty("HTTPS_PORT", openviduConfig.getHttpsPort()); json.addProperty("OPENVIDU_PUBLICURL", openviduConfig.getOpenViduPublicUrl()); json.addProperty("OPENVIDU_CDR", openviduConfig.isCdrEnabled()); + if (openviduConfig.isCdrEnabled()) { + json.addProperty("OPENVIDU_CDR_PATH", openviduConfig.getOpenviduCdrPath()); + } json.addProperty("OPENVIDU_STREAMS_VIDEO_MAX_RECV_BANDWIDTH", openviduConfig.getVideoMaxRecvBandwidth()); json.addProperty("OPENVIDU_STREAMS_VIDEO_MIN_RECV_BANDWIDTH", openviduConfig.getVideoMinRecvBandwidth()); json.addProperty("OPENVIDU_STREAMS_VIDEO_MAX_SEND_BANDWIDTH", openviduConfig.getVideoMaxSendBandwidth()); diff --git a/openvidu-server/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/openvidu-server/src/main/resources/META-INF/additional-spring-configuration-metadata.json index 3dfaf3ec..ff8c5998 100644 --- a/openvidu-server/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/openvidu-server/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -121,7 +121,7 @@ "name": "OPENVIDU_WEBHOOK_EVENTS", "type": "java.lang.String", "description": "List of events that will be sent by OpenVidu Webhook service", - "defaultValue": "[\"sessionCreated\",\"sessionDestroyed\",\"participantJoined\",\"participantLeft\",\"webrtcConnectionCreated\",\"webrtcConnectionDestroyed\",\"recordingStatusChanged\"]" + "defaultValue": "[\"sessionCreated\",\"sessionDestroyed\",\"participantJoined\",\"participantLeft\",\"webrtcConnectionCreated\",\"webrtcConnectionDestroyed\",\"recordingStatusChanged\",\"broadcastStarted\",\"broadcastStopped\"]" }, { "name": "OPENVIDU_STREAMS_VIDEO_MAX_RECV_BANDWIDTH", diff --git a/openvidu-server/src/main/resources/application.properties b/openvidu-server/src/main/resources/application.properties index d5960ccd..01724558 100644 --- a/openvidu-server/src/main/resources/application.properties +++ b/openvidu-server/src/main/resources/application.properties @@ -23,7 +23,7 @@ OPENVIDU_CDR_PATH=/opt/openvidu/cdr OPENVIDU_WEBHOOK=false OPENVIDU_WEBHOOK_ENDPOINT= OPENVIDU_WEBHOOK_HEADERS=[] -OPENVIDU_WEBHOOK_EVENTS=["sessionCreated","sessionDestroyed","participantJoined","participantLeft","webrtcConnectionCreated","webrtcConnectionDestroyed","recordingStatusChanged","filterEventDispatched","signalSent","mediaNodeStatusChanged","autoscaling","nodeCrashed","nodeRecovered"] +OPENVIDU_WEBHOOK_EVENTS=["sessionCreated","sessionDestroyed","participantJoined","participantLeft","webrtcConnectionCreated","webrtcConnectionDestroyed","recordingStatusChanged","filterEventDispatched","signalSent","mediaNodeStatusChanged","autoscaling","nodeCrashed","nodeRecovered","broadcastStarted","broadcastStopped"] OPENVIDU_RECORDING=false OPENVIDU_RECORDING_DEBUG=false diff --git a/openvidu-server/src/test/resources/integration-test.properties b/openvidu-server/src/test/resources/integration-test.properties index e0a56149..efcde688 100644 --- a/openvidu-server/src/test/resources/integration-test.properties +++ b/openvidu-server/src/test/resources/integration-test.properties @@ -22,7 +22,7 @@ OPENVIDU_CDR_PATH=/opt/openvidu/cdr OPENVIDU_WEBHOOK=false OPENVIDU_WEBHOOK_ENDPOINT= OPENVIDU_WEBHOOK_HEADERS=[] -OPENVIDU_WEBHOOK_EVENTS=["sessionCreated","sessionDestroyed","participantJoined","participantLeft","webrtcConnectionCreated","webrtcConnectionDestroyed","recordingStatusChanged","filterEventDispatched","mediaNodeStatusChanged","nodeCrashed","nodeRecovered"] +OPENVIDU_WEBHOOK_EVENTS=["sessionCreated","sessionDestroyed","participantJoined","participantLeft","webrtcConnectionCreated","webrtcConnectionDestroyed","recordingStatusChanged","filterEventDispatched","mediaNodeStatusChanged","nodeCrashed","nodeRecovered","broadcastStarted","broadcastStopped"] OPENVIDU_RECORDING=false OPENVIDU_RECORDING_VERSION=2.25.0 diff --git a/openvidu-testapp/src/app/components/openvidu-instance/openvidu-instance.component.ts b/openvidu-testapp/src/app/components/openvidu-instance/openvidu-instance.component.ts index 8b054127..a531cfce 100644 --- a/openvidu-testapp/src/app/components/openvidu-instance/openvidu-instance.component.ts +++ b/openvidu-testapp/src/app/components/openvidu-instance/openvidu-instance.component.ts @@ -123,6 +123,8 @@ export class OpenviduInstanceComponent implements OnInit, OnChanges, OnDestroy { networkQualityLevelChanged: true, recordingStarted: true, recordingStopped: true, + broadcastStarted: true, + broadcastStopped: true, signal: true, publisherStartSpeaking: false, publisherStopSpeaking: false, @@ -238,6 +240,8 @@ export class OpenviduInstanceComponent implements OnInit, OnChanges, OnDestroy { networkQualityLevelChanged: false, recordingStarted: false, recordingStopped: false, + broadcastStarted: false, + broadcastStopped: false, signal: false, publisherStartSpeaking: true, publisherStopSpeaking: true, @@ -482,6 +486,24 @@ export class OpenviduInstanceComponent implements OnInit, OnChanges, OnDestroy { } } + if (this.sessionEvents.broadcastStarted !== oldValues.broadcastStarted || firstTime) { + this.session.off('broadcastStarted'); + if (this.sessionEvents.broadcastStarted) { + this.session.on('broadcastStarted', () => { + this.updateEventList('broadcastStarted', undefined, undefined); + }); + } + } + + if (this.sessionEvents.broadcastStopped !== oldValues.broadcastStopped || firstTime) { + this.session.off('broadcastStopped'); + if (this.sessionEvents.broadcastStopped) { + this.session.on('broadcastStopped', () => { + this.updateEventList('broadcastStopped', undefined, undefined); + }); + } + } + if (this.sessionEvents.publisherStartSpeaking !== oldValues.publisherStartSpeaking || firstTime) { this.session.off('publisherStartSpeaking'); if (this.sessionEvents.publisherStartSpeaking) { @@ -698,6 +720,8 @@ export class OpenviduInstanceComponent implements OnInit, OnChanges, OnDestroy { networkQualityLevelChanged: this.sessionEvents.networkQualityLevelChanged, recordingStarted: this.sessionEvents.recordingStarted, recordingStopped: this.sessionEvents.recordingStopped, + broadcastStarted: this.sessionEvents.broadcastStarted, + broadcastStopped: this.sessionEvents.broadcastStopped, signal: this.sessionEvents.signal, publisherStartSpeaking: this.sessionEvents.publisherStartSpeaking, publisherStopSpeaking: this.sessionEvents.publisherStopSpeaking, @@ -734,6 +758,8 @@ export class OpenviduInstanceComponent implements OnInit, OnChanges, OnDestroy { networkQualityLevelChanged: result.networkQualityLevelChanged, recordingStarted: result.recordingStarted, recordingStopped: result.recordingStopped, + broadcastStarted: result.broadcastStarted, + broadcastStopped: result.broadcastStopped, signal: result.signal, publisherStartSpeaking: result.publisherStartSpeaking, publisherStopSpeaking: result.publisherStopSpeaking,