mirror of https://github.com/OpenVidu/openvidu.git
openvidu-java-client: protect "duration" property from long value
parent
24279cb337
commit
eed1ed6c63
|
@ -58,7 +58,11 @@ public class Recording {
|
||||||
this.sessionId = (String) json.get("sessionId");
|
this.sessionId = (String) json.get("sessionId");
|
||||||
this.createdAt = (long) json.get("createdAt");
|
this.createdAt = (long) json.get("createdAt");
|
||||||
this.size = (long) json.get("size");
|
this.size = (long) json.get("size");
|
||||||
this.duration = (double) json.get("duration");
|
try {
|
||||||
|
this.duration = (double) json.get("duration");
|
||||||
|
} catch (Exception e) {
|
||||||
|
this.duration = new Long((long) json.get("duration")).doubleValue();
|
||||||
|
}
|
||||||
this.url = (String) json.get("url");
|
this.url = (String) json.get("url");
|
||||||
this.hasAudio = (boolean) json.get("hasAudio");
|
this.hasAudio = (boolean) json.get("hasAudio");
|
||||||
this.hasVideo = (boolean) json.get("hasVideo");
|
this.hasVideo = (boolean) json.get("hasVideo");
|
||||||
|
|
Loading…
Reference in New Issue