mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: Added publishedAt property to participant
parent
4c93cb7a7f
commit
e20db3f503
|
@ -63,6 +63,7 @@ public class Participant {
|
||||||
protected Integer videoHeight = 0;
|
protected Integer videoHeight = 0;
|
||||||
protected Boolean videoActive = false;
|
protected Boolean videoActive = false;
|
||||||
protected Boolean audioActive = false;
|
protected Boolean audioActive = false;
|
||||||
|
protected Long publishedAt = null; // Timestamp when this participant was published
|
||||||
|
|
||||||
protected boolean streaming = false;
|
protected boolean streaming = false;
|
||||||
protected volatile boolean closed = false;
|
protected volatile boolean closed = false;
|
||||||
|
@ -196,6 +197,14 @@ public class Participant {
|
||||||
return audioActive;
|
return audioActive;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setPublishedAt(Long publishedAt) {
|
||||||
|
this.publishedAt = publishedAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getPublishedAt() {
|
||||||
|
return publishedAt;
|
||||||
|
}
|
||||||
|
|
||||||
public void setAudioActive(Boolean audioActive) {
|
public void setAudioActive(Boolean audioActive) {
|
||||||
this.audioActive = audioActive;
|
this.audioActive = audioActive;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@ import java.io.IOException;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
import java.sql.Timestamp;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
@ -467,6 +468,7 @@ public class KurentoSessionManager extends SessionManager {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
participant.setPublishedAt(new Timestamp(System.currentTimeMillis()).getTime());
|
||||||
kSession.newPublisher(participant);
|
kSession.newPublisher(participant);
|
||||||
|
|
||||||
participants = kParticipant.getSession().getParticipants();
|
participants = kParticipant.getSession().getParticipants();
|
||||||
|
|
Loading…
Reference in New Issue