mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: return "customSessionId" property on Session fetch
parent
04cf3f3630
commit
c917164657
|
@ -570,7 +570,7 @@ export class OpenVidu {
|
|||
let changed = !storedSession.equalTo(fetchedSession);
|
||||
fetchedSession.activeConnections.forEach((connection, index1) => {
|
||||
addWebRtcStatsToConnections(connection, session.connections.content);
|
||||
if (!changed) { // Check if server information has changed in any Publisher/Subscriber
|
||||
if (!changed) { // Check if server webrtc information has changed in any Publisher/Subscriber
|
||||
for (let index2 = 0; (index2 < connection['publishersWebRtc'].length && !changed); index2++) {
|
||||
changed = changed || JSON.stringify(connection['publishersWebRtc'][index2]['webRtc']) !== JSON.stringify(storedSession.activeConnections[index1]['publishersWebRtc'][index2]['webRtc']);
|
||||
}
|
||||
|
|
|
@ -444,6 +444,8 @@ export class Session {
|
|||
};
|
||||
if (!!customSessionId) {
|
||||
this.properties.customSessionId = customSessionId;
|
||||
} else if (!!json.customSessionId) {
|
||||
this.properties.customSessionId = json.customSessionId;
|
||||
}
|
||||
if (!!defaultCustomLayout) {
|
||||
this.properties.defaultCustomLayout = defaultCustomLayout;
|
||||
|
|
|
@ -83,9 +83,9 @@ public class KurentoSession implements Session {
|
|||
|
||||
public final ConcurrentHashMap<String, String> publishedStreamIds = new ConcurrentHashMap<>();
|
||||
|
||||
public KurentoSession(String sessionId, Long startTime, SessionProperties sessionProperties, KurentoClient kurentoClient,
|
||||
KurentoSessionEventsHandler kurentoSessionHandler, boolean destroyKurentoClient, CallDetailRecord CDR,
|
||||
OpenviduConfig openviduConfig) {
|
||||
public KurentoSession(String sessionId, Long startTime, SessionProperties sessionProperties,
|
||||
KurentoClient kurentoClient, KurentoSessionEventsHandler kurentoSessionHandler,
|
||||
boolean destroyKurentoClient, CallDetailRecord CDR, OpenviduConfig openviduConfig) {
|
||||
this.sessionId = sessionId;
|
||||
this.sessionProperties = sessionProperties;
|
||||
this.kurentoClient = kurentoClient;
|
||||
|
@ -387,6 +387,9 @@ public class KurentoSession implements Session {
|
|||
if (RecordingLayout.CUSTOM.equals(this.sessionProperties.defaultRecordingLayout())) {
|
||||
json.addProperty("defaultCustomLayout", this.sessionProperties.defaultCustomLayout());
|
||||
}
|
||||
if (this.sessionProperties.customSessionId() != null) {
|
||||
json.addProperty("customSessionId", this.sessionProperties.customSessionId());
|
||||
}
|
||||
JsonObject connections = new JsonObject();
|
||||
JsonArray participants = new JsonArray();
|
||||
this.participants.values().forEach(p -> {
|
||||
|
|
Loading…
Reference in New Issue