mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: set createdAt property of endpoints before ICE processing
parent
6e19337260
commit
439cf60798
|
@ -184,6 +184,7 @@ public class PublisherEndpoint extends MediaEndpoint {
|
||||||
} else {
|
} else {
|
||||||
innerConnect();
|
innerConnect();
|
||||||
}
|
}
|
||||||
|
this.createdAt = System.currentTimeMillis();
|
||||||
String sdpResponse = null;
|
String sdpResponse = null;
|
||||||
switch (sdpType) {
|
switch (sdpType) {
|
||||||
case ANSWER:
|
case ANSWER:
|
||||||
|
@ -196,7 +197,6 @@ public class PublisherEndpoint extends MediaEndpoint {
|
||||||
throw new OpenViduException(Code.MEDIA_SDP_ERROR_CODE, "Sdp type not supported: " + sdpType);
|
throw new OpenViduException(Code.MEDIA_SDP_ERROR_CODE, "Sdp type not supported: " + sdpType);
|
||||||
}
|
}
|
||||||
gatherCandidates();
|
gatherCandidates();
|
||||||
this.createdAt = System.currentTimeMillis();
|
|
||||||
return sdpResponse;
|
return sdpResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,12 +49,12 @@ public class SubscriberEndpoint extends MediaEndpoint {
|
||||||
|
|
||||||
public synchronized String subscribe(String sdpOffer, PublisherEndpoint publisher) {
|
public synchronized String subscribe(String sdpOffer, PublisherEndpoint publisher) {
|
||||||
registerOnIceCandidateEventListener(publisher.getOwner().getParticipantPublicId());
|
registerOnIceCandidateEventListener(publisher.getOwner().getParticipantPublicId());
|
||||||
|
this.createdAt = System.currentTimeMillis();
|
||||||
String sdpAnswer = processOffer(sdpOffer);
|
String sdpAnswer = processOffer(sdpOffer);
|
||||||
gatherCandidates();
|
gatherCandidates();
|
||||||
publisher.connect(this.getEndpoint());
|
publisher.connect(this.getEndpoint());
|
||||||
setConnectedToPublisher(true);
|
setConnectedToPublisher(true);
|
||||||
setPublisher(publisher);
|
setPublisher(publisher);
|
||||||
this.createdAt = System.currentTimeMillis();
|
|
||||||
return sdpAnswer;
|
return sdpAnswer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue