Broadcast events

pull/780/head
pabloFuente 2023-02-06 12:45:17 +01:00
parent cae40f5493
commit a6b9e802c7
10 changed files with 37 additions and 8 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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",

View File

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

View File

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

View File

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