Recording doesn't work on iOS 13 and above

Hi,

I have setup my app to record and with Android and iPhones (Safari) < iOS 13, it works perfectly. No issues. But when I try it on an iPhone with iOS > 12 it shows an error in the log and the recording is always 0KB in size.

Here is the log:

openvidu-server_1  | [INFO] 2020-08-16 22:43:11,917 [http-nio-0.0.0.0-5443-exec-7] io.openvidu.server.rest.SessionRestController - REST API: DELETE /api/sessions/1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:12,018 [http-nio-0.0.0.0-5443-exec-8] io.openvidu.server.rest.SessionRestController - REST API: POST /api/recordings/stop/1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:12,118 [http-nio-0.0.0.0-5443-exec-9] io.openvidu.server.rest.SessionRestController - REST API: DELETE /api/recordings/1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:12,119 [http-nio-0.0.0.0-5443-exec-9] io.openvidu.server.recording.service.RecordingManager - /opt/openvidu/recordings/1597617791698/.recording.1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:12,120 [http-nio-0.0.0.0-5443-exec-9] io.openvidu.server.recording.service.RecordingManager - File exists: false
openvidu-server_1  | [INFO] 2020-08-16 22:43:12,222 [http-nio-0.0.0.0-5443-exec-1] io.openvidu.server.rest.SessionRestController - REST API: POST /api/sessions {customSessionId=1597617791698, recordingMode=MANUAL, defaultOutputMode=INDIVIDUAL, mediaMode=ROUTED}
openvidu-server_1  | [INFO] 2020-08-16 22:43:12,227 [http-nio-0.0.0.0-5443-exec-1] io.openvidu.server.rest.SessionRestController - New session 1597617791698 initialized [1597617791698]
openvidu-server_1  | [INFO] 2020-08-16 22:43:12,326 [http-nio-0.0.0.0-5443-exec-10] io.openvidu.server.rest.SessionRestController - REST API: POST /api/tokens {session=1597617791698}
openvidu-server_1  | [INFO] 2020-08-16 22:43:12,327 [http-nio-0.0.0.0-5443-exec-10] io.openvidu.server.coturn.CoturnCredentialsService - Creating COTURN user
openvidu-server_1  | [INFO] 2020-08-16 22:43:12,340 [http-nio-0.0.0.0-5443-exec-10] io.openvidu.server.coturn.CoturnCredentialsService - COTURN user created: true
openvidu-server_1  | [INFO] 2020-08-16 22:43:12,341 [http-nio-0.0.0.0-5443-exec-10] io.openvidu.server.core.Session - Token created { Session: 1597617791698 | Tokens: [wss://nginxfix.qhigh.com?sessionId=1597617791698&token=tok_LmUC1GX2QMHRFJgd&role=PUBLISHER&version=2.15.0&coturnIp=167.172.218.122&turnUsername=8MS37Y&turnCredential=regjqr] }
openvidu-server_1  | [INFO] 2020-08-16 22:43:13,075 [http-nio-0.0.0.0-5443-exec-3] io.openvidu.server.config.HttpHandshakeInterceptor - New HttpSession C6FCFF56F48192B6AC31A6B4332AF2D3
openvidu-server_1  | [INFO] 2020-08-16 22:43:13,306 [http-nio-0.0.0.0-5443-exec-5] io.openvidu.server.rpc.RpcHandler - After connection established for WebSocket session: udbr8bqh2tcicug2qjs3d1h40m
openvidu-server_1  | [INFO] 2020-08-16 22:43:13,307 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.core.Session - Token consumed { Session: 1597617791698 | Tokens: [] }
openvidu-server_1  | [INFO] 2020-08-16 22:43:13,308 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.core.SessionManager - Participant con_T1tXN4VNxp of session 1597617791698 is a final user connecting to this session for the first time
openvidu-server_1  | [INFO] 2020-08-16 22:43:13,308 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.kurento.core.KurentoSessionManager - KMS less loaded is ws://localhost:8888/kurento with a load of 1.0
openvidu-server_1  | [INFO] 2020-08-16 22:43:13,309 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.kurento.core.KurentoSessionManager - No session '1597617791698' exists yet. Created one on KMS 'kms_PZVMQLwQ' with ip 'localhost'
openvidu-server_1  | [INFO] 2020-08-16 22:43:13,309 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.cdr.CDRLoggerFile - {"sessionCreated":{"sessionId":"1597617791698","timestamp":1597617792227}}
openvidu-server_1  | [INFO] 2020-08-16 22:43:13,310 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.kurento.core.KurentoSession - SESSION 1597617791698: Creating MediaPipeline
openvidu-server_1  | [INFO] 2020-08-16 22:43:13,312 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.kurento.core.KurentoSession - SESSION 1597617791698: Added participant [participantPrivateId=udbr8bqh2tcicug2qjs3d1h40m, participantPublicId=con_T1tXN4VNxp, streaming=false]
openvidu-server_1  | [INFO] 2020-08-16 22:43:13,313 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.cdr.CDRLoggerFile - {"participantJoined":{"sessionId":"1597617791698","timestamp":1597617793308,"participantId":"con_T1tXN4VNxp","location":"unknown","platform":"Safari 13.0.1 on Apple iPhone (iOS 13.1.3)","clientData":"","serverData":""}}
openvidu-server_1  | [INFO] 2020-08-16 22:43:16,403 [http-nio-0.0.0.0-5443-exec-4] io.openvidu.server.rest.SessionRestController - REST API: POST /api/recordings/start {session=1597617791698, outputMode=INDIVIDUAL}
openvidu-server_1  | [INFO] 2020-08-16 22:43:16,406 [http-nio-0.0.0.0-5443-exec-4] io.openvidu.server.recording.service.RecordingService - New recording id (1597617791698) and final name (1597617791698)
openvidu-server_1  | [INFO] 2020-08-16 22:43:16,406 [http-nio-0.0.0.0-5443-exec-4] io.openvidu.server.recording.service.SingleStreamRecordingService - Starting individual (video+audio) recording 1597617791698 of session 1597617791698
openvidu-server_1  | [WARN] 2020-08-16 22:43:16,407 [http-nio-0.0.0.0-5443-exec-4] io.openvidu.server.recording.service.RecordingService - New folder /opt/openvidu/recordings/1597617791698 created. This means A) Cluster mode is enabled B) The recording started for a session with no publishers or C) No media type compatible publishers
openvidu-server_1  | [INFO] 2020-08-16 22:43:16,408 [http-nio-0.0.0.0-5443-exec-4] io.openvidu.server.recording.service.RecordingService - Generated recording metadata file at /opt/openvidu/recordings/1597617791698/.recording.1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:16,408 [http-nio-0.0.0.0-5443-exec-4] io.openvidu.server.cdr.CDRLoggerFile - {"recordingStarted":{"sessionId":"1597617791698","timestamp":1597617796407,"id":"1597617791698","name":"1597617791698","outputMode":"INDIVIDUAL","hasAudio":true,"hasVideo":true,"size":0,"duration":0.0}}
openvidu-server_1  | [INFO] 2020-08-16 22:43:16,408 [http-nio-0.0.0.0-5443-exec-4] io.openvidu.server.cdr.CDRLoggerFile - {"recordingStatusChanged":{"sessionId":"1597617791698","timestamp":1597617796407,"startTime":1597617796407,"duration":0.0,"id":"1597617791698","name":"1597617791698","outputMode":"INDIVIDUAL","hasAudio":true,"hasVideo":true,"size":0,"status":"started"}}
openvidu-server_1  | [INFO] 2020-08-16 22:43:16,409 [http-nio-0.0.0.0-5443-exec-4] io.openvidu.server.recording.service.RecordingManager - No publisher in session 1597617791698. Starting 1800 seconds countdown for stopping recording
openvidu-server_1  | [INFO] 2020-08-16 22:43:16,974 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - Participant con_T1tXN4VNxp is calling method 'publish' in session 1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:16,987 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.kurento.core.KurentoParticipant - PARTICIPANT con_T1tXN4VNxp: Request to publish video in room 1597617791698 (sdp type OFFER)
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,000 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.kurento.core.KurentoParticipant - PARTICIPANT con_T1tXN4VNxp: Is now publishing video in room 1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,001 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.recording.service.RecordingManager - Starting new RecorderEndpoint in session 1597617791698 for new stream of participant con_T1tXN4VNxp
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,002 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.recording.service.SingleStreamRecordingService - Starting single stream recorder for stream str_CAM_N7Zp_con_T1tXN4VNxp in session 1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,064 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t606] io.openvidu.server.kurento.core.KurentoParticipantEndpointConfig - KMS event [IceComponentStateChange]: -> endpoint: str_CAM_N7Zp_con_T1tXN4VNxp (publisher) | state: GATHERING | componentId: 1 | streamId: 1 | timestamp: 1597617797009
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,067 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t601] io.openvidu.server.kurento.core.KurentoParticipantEndpointConfig - KMS event [IceComponentStateChange]: -> endpoint: str_CAM_N7Zp_con_T1tXN4VNxp (publisher) | state: GATHERING | componentId: 2 | streamId: 1 | timestamp: 1597617797045
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,072 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.cdr.CDRLoggerFile - {"webrtcConnectionCreated":{"sessionId":"1597617791698","timestamp":1597617796989,"streamId":"str_CAM_N7Zp_con_T1tXN4VNxp","participantId":"con_T1tXN4VNxp","connection":"OUTBOUND","videoSource":"CAMERA","videoFramerate":30,"videoDimensions":"{\"width\":1080,\"height\":1920}","audioEnabled":true,"videoEnabled":true}}
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,073 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.kurento.core.KurentoSessionManager - Participant con_T1tXN4VNxp published before timeout finished. Aborting automatic recording stop
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,074 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.kurento.core.KurentoSessionManager - Automatic recording stopped successfully aborted
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,075 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - Participant con_T1tXN4VNxp is calling method 'onIceCandidate' in session 1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,075 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - New candidate received from participant con_T1tXN4VNxp: {connectionId: "con_T1tXN4VNxp", sdpMid: 0, sdpMLineIndex: 0, candidate: "candidate:1710952079 1 udp 2113937151 192.168.2.82 49711 typ host generation 0 ufrag HmRF network-cost 999"}
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,077 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - Participant con_T1tXN4VNxp is calling method 'onIceCandidate' in session 1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,077 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - New candidate received from participant con_T1tXN4VNxp: {connectionId: "con_T1tXN4VNxp", sdpMid: 1, sdpMLineIndex: 1, candidate: "candidate:1710952079 1 udp 2113937151 192.168.2.82 60535 typ host generation 0 ufrag HmRF network-cost 999"}
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,079 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t604] io.openvidu.server.kurento.core.KurentoParticipantEndpointConfig - KMS event [IceComponentStateChange]: -> endpoint: str_CAM_N7Zp_con_T1tXN4VNxp (publisher) | state: CONNECTING | componentId: 1 | streamId: 1 | timestamp: 1597617797077
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,079 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - Participant con_T1tXN4VNxp is calling method 'onIceCandidate' in session 1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,080 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - New candidate received from participant con_T1tXN4VNxp: {connectionId: "con_T1tXN4VNxp", sdpMid: 2, sdpMLineIndex: 2, candidate: "candidate:1710952079 1 udp 2113937151 192.168.2.82 62918 typ host generation 0 ufrag HmRF network-cost 999"}
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,082 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - Participant con_T1tXN4VNxp is calling method 'onIceCandidate' in session 1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,082 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - New candidate received from participant con_T1tXN4VNxp: {connectionId: "con_T1tXN4VNxp", sdpMid: 3, sdpMLineIndex: 3, candidate: "candidate:1710952079 1 udp 2113937151 192.168.2.82 52103 typ host generation 0 ufrag HmRF network-cost 999"}
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,083 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - Participant con_T1tXN4VNxp is calling method 'onIceCandidate' in session 1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,084 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - New candidate received from participant con_T1tXN4VNxp: {connectionId: "con_T1tXN4VNxp", sdpMid: 0, sdpMLineIndex: 0, candidate: "candidate:842163049 1 udp 1677729535 154.83.3.220 62695 typ srflx raddr 192.168.2.82 rport 49711 generation 0 ufrag HmRF network-cost 999"}
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,085 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - Participant con_T1tXN4VNxp is calling method 'onIceCandidate' in session 1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,086 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - New candidate received from participant con_T1tXN4VNxp: {connectionId: "con_T1tXN4VNxp", sdpMid: 3, sdpMLineIndex: 3, candidate: "candidate:842163049 1 udp 1677729535 154.83.3.220 47746 typ srflx raddr 192.168.2.82 rport 52103 generation 0 ufrag HmRF network-cost 999"}
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,087 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - Participant con_T1tXN4VNxp is calling method 'onIceCandidate' in session 1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,087 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - New candidate received from participant con_T1tXN4VNxp: {connectionId: "con_T1tXN4VNxp", sdpMid: 2, sdpMLineIndex: 2, candidate: "candidate:842163049 1 udp 1677729535 154.83.3.220 50848 typ srflx raddr 192.168.2.82 rport 62918 generation 0 ufrag HmRF network-cost 999"}
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,088 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - Participant con_T1tXN4VNxp is calling method 'onIceCandidate' in session 1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,089 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - New candidate received from participant con_T1tXN4VNxp: {connectionId: "con_T1tXN4VNxp", sdpMid: 1, sdpMLineIndex: 1, candidate: "candidate:842163049 1 udp 1677729535 154.83.3.220 55729 typ srflx raddr 192.168.2.82 rport 60535 generation 0 ufrag HmRF network-cost 999"}
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,368 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - Participant con_T1tXN4VNxp is calling method 'onIceCandidate' in session 1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,370 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - New candidate received from participant con_T1tXN4VNxp: {connectionId: "con_T1tXN4VNxp", sdpMid: 3, sdpMLineIndex: 3, candidate: "candidate:3620724703 1 udp 33562623 167.172.218.122 59237 typ relay raddr 154.83.3.220 rport 47746 generation 0 ufrag HmRF network-cost 999"}
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,375 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - Participant con_T1tXN4VNxp is calling method 'onIceCandidate' in session 1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,375 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - New candidate received from participant con_T1tXN4VNxp: {connectionId: "con_T1tXN4VNxp", sdpMid: 1, sdpMLineIndex: 1, candidate: "candidate:3620724703 1 udp 33562623 167.172.218.122 57516 typ relay raddr 154.83.3.220 rport 55729 generation 0 ufrag HmRF network-cost 999"}
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,379 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - Participant con_T1tXN4VNxp is calling method 'onIceCandidate' in session 1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,379 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - New candidate received from participant con_T1tXN4VNxp: {connectionId: "con_T1tXN4VNxp", sdpMid: 0, sdpMLineIndex: 0, candidate: "candidate:3620724703 1 udp 33562623 167.172.218.122 63130 typ relay raddr 154.83.3.220 rport 62695 generation 0 ufrag HmRF network-cost 999"}
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,382 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - Participant con_T1tXN4VNxp is calling method 'onIceCandidate' in session 1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,382 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - New candidate received from participant con_T1tXN4VNxp: {connectionId: "con_T1tXN4VNxp", sdpMid: 2, sdpMLineIndex: 2, candidate: "candidate:3620724703 1 udp 33562623 167.172.218.122 59562 typ relay raddr 154.83.3.220 rport 50848 generation 0 ufrag HmRF network-cost 999"}
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,725 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - Participant con_T1tXN4VNxp is calling method 'onIceCandidate' in session 1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:17,727 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - New candidate received from participant con_T1tXN4VNxp: {connectionId: "con_T1tXN4VNxp", sdpMid: 0, sdpMLineIndex: 0, candidate: "candidate:2571903791 1 udp 16785151 167.172.218.122 59269 typ relay raddr 154.83.3.220 rport 51271 generation 0 ufrag HmRF network-cost 999"}
openvidu-server_1  | [INFO] 2020-08-16 22:43:18,084 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t607] io.openvidu.server.kurento.core.KurentoParticipantEndpointConfig - KMS event [IceComponentStateChange]: -> endpoint: str_CAM_N7Zp_con_T1tXN4VNxp (publisher) | state: CONNECTED | componentId: 1 | streamId: 1 | timestamp: 1597617798083
openvidu-server_1  | [INFO] 2020-08-16 22:43:18,085 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t608] io.openvidu.server.kurento.core.KurentoParticipantEndpointConfig - KMS event [NewCandidatePairSelected]: -> endpoint: str_CAM_N7Zp_con_T1tXN4VNxp (publisher) | local: candidate:1 1 UDP 2015363327 167.172.218.122 45301 typ host | remote: candidate:remote1 1 UDP 1845501695 154.83.3.220 50091 typ prflx | timestamp: 1597617798083
openvidu-server_1  | [INFO] 2020-08-16 22:43:19,097 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t608] io.openvidu.server.kurento.core.KurentoParticipantEndpointConfig - KMS event [IceGatheringDone] -> endpoint: str_CAM_N7Zp_con_T1tXN4VNxp (publisher) | timestamp: 1597617799096
openvidu-server_1  | [INFO] 2020-08-16 22:43:20,490 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t608] io.openvidu.server.kurento.core.KurentoParticipantEndpointConfig - KMS event [ConnectionStateChanged]: -> endpoint: str_CAM_N7Zp_con_T1tXN4VNxp (publisher) | oldState: DISCONNECTED | newState: CONNECTED | timestamp: 1597617800489
openvidu-server_1  | [INFO] 2020-08-16 22:43:20,532 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t608] io.openvidu.server.kurento.core.KurentoParticipantEndpointConfig - KMS event [MediaFlowOutStateChange] -> endpoint: str_CAM_N7Zp_con_T1tXN4VNxp (publisher) | state: FLOWING | pad: default | mediaType: AUDIO | timestamp: 1597617800530
openvidu-server_1  | [INFO] 2020-08-16 22:43:20,533 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t608] io.openvidu.server.kurento.core.KurentoParticipantEndpointConfig - KMS event [MediaTranscodingStateChange]: -> endpoint: str_CAM_N7Zp_con_T1tXN4VNxp (publisher) | state: NOT_TRANSCODING | mediaType: AUDIO | binName: kmsagnosticbin2-137 | timestamp: 1597617800533
openvidu-server_1  | [INFO] 2020-08-16 22:43:20,797 [jsonrpcTaskScheduler-1] io.openvidu.server.rpc.RpcHandler - After connection closed for WebSocket session: 1u5eg267ij5hhvqpj1oe1r9spd - Status: null
openvidu-server_1  | [INFO] 2020-08-16 22:43:21,122 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t608] io.openvidu.server.kurento.core.KurentoParticipantEndpointConfig - KMS event [IceComponentStateChange]: -> endpoint: str_CAM_N7Zp_con_T1tXN4VNxp (publisher) | state: READY | componentId: 1 | streamId: 1 | timestamp: 1597617801121
openvidu-server_1  | [INFO] 2020-08-16 22:43:22,678 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t608] io.openvidu.server.kurento.core.KurentoParticipantEndpointConfig - KMS event [MediaStateChangedEvent]: -> endpoint: str_CAM_N7Zp_con_T1tXN4VNxp (publisher) | oldState: DISCONNECTED | newState: CONNECTED | timestamp: 1597617802677
openvidu-server_1  | [INFO] 2020-08-16 22:43:27,960 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - Participant con_T1tXN4VNxp is calling method 'disconnect' in session 1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:27,961 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.kurento.core.KurentoSessionManager - Request [LEAVE_ROOM] for participant con_T1tXN4VNxp of session 1597617791698 with reason disconnect
openvidu-server_1  | [INFO] 2020-08-16 22:43:27,961 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.kurento.core.KurentoSession - PARTICIPANT con_T1tXN4VNxp: Leaving session 1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:27,962 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.recording.service.RecordingManager - Stopping RecorderEndpoint in session 1597617791698 for stream of participant str_CAM_N7Zp_con_T1tXN4VNxp
openvidu-server_1  | [INFO] 2020-08-16 22:43:27,962 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.recording.service.SingleStreamRecordingService - Stopping single stream recorder for stream str_CAM_N7Zp_con_T1tXN4VNxp in session 1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:30,532 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t608] io.openvidu.server.kurento.core.KurentoParticipantEndpointConfig - KMS event [MediaFlowOutStateChange] -> endpoint: str_CAM_N7Zp_con_T1tXN4VNxp (publisher) | state: NOT_FLOWING | pad: default | mediaType: AUDIO | timestamp: 1597617810531
openvidu-server_1  | [ERROR] 2020-08-16 22:43:32,968 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.recording.service.RecordingManager - Error waiting for recorder endpoint of stream str_CAM_N7Zp_con_T1tXN4VNxp to stop in session 1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:32,971 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.cdr.CDRLoggerFile - {"webrtcConnectionDestroyed":{"sessionId":"1597617791698","timestamp":1597617812971,"startTime":1597617796989,"duration":15,"reason":"disconnect","streamId":"str_CAM_N7Zp_con_T1tXN4VNxp","participantId":"con_T1tXN4VNxp","connection":"OUTBOUND","videoSource":"CAMERA","videoFramerate":30,"videoDimensions":"{\"width\":1080,\"height\":1920}","audioEnabled":true,"videoEnabled":true}}
openvidu-server_1  | [INFO] 2020-08-16 22:43:32,972 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.coturn.CoturnCredentialsService - Deleting COTURN user
openvidu-server_1  | [INFO] 2020-08-16 22:43:32,996 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.coturn.CoturnCredentialsService - COTURN user deleted: true
openvidu-server_1  | [INFO] 2020-08-16 22:43:32,998 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.cdr.CDRLoggerFile - {"participantLeft":{"sessionId":"1597617791698","timestamp":1597617812998,"startTime":1597617793308,"duration":19,"reason":"disconnect","participantId":"con_T1tXN4VNxp","location":"unknown","platform":"Safari 13.0.1 on Apple iPhone (iOS 13.1.3)","clientData":"","serverData":""}}
openvidu-server_1  | [INFO] 2020-08-16 22:43:32,999 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.kurento.core.KurentoSessionManager - Last participant left. Starting 1800 seconds countdown for stopping recording of session 1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:33,001 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcNotificationService - Closed session for participant with private id udbr8bqh2tcicug2qjs3d1h40m
openvidu-server_1  | [INFO] 2020-08-16 22:43:33,002 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcNotificationService - <PRIVATE_ID, RPC_CONNECTION>: {}
openvidu-server_1  | [INFO] 2020-08-16 22:43:33,003 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.rpc.RpcHandler - Participant con_T1tXN4VNxp has left session 1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:34,303 [http-nio-0.0.0.0-5443-exec-7] io.openvidu.server.rest.SessionRestController - REST API: POST /api/recordings/stop/1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:34,304 [http-nio-0.0.0.0-5443-exec-7] io.openvidu.server.cdr.CDRLoggerFile - {"recordingStatusChanged":{"sessionId":"1597617791698","timestamp":1597617814304,"startTime":1597617796407,"duration":0.0,"reason":"recordingStoppedByServer","id":"1597617791698","name":"1597617791698","outputMode":"INDIVIDUAL","hasAudio":true,"hasVideo":true,"size":0,"status":"stopped"}}
openvidu-server_1  | [INFO] 2020-08-16 22:43:34,305 [http-nio-0.0.0.0-5443-exec-7] io.openvidu.server.cdr.CDRLoggerFile - {"recordingStopped":{"sessionId":"1597617791698","timestamp":1597617814304,"startTime":1597617796407,"duration":0.0,"reason":"recordingStoppedByServer","id":"1597617791698","name":"1597617791698","outputMode":"INDIVIDUAL","hasAudio":true,"hasVideo":true,"size":0}}
openvidu-server_1  | [INFO] 2020-08-16 22:43:34,306 [http-nio-0.0.0.0-5443-exec-7] io.openvidu.server.recording.service.RecordingService - Sealed recording metadata file at /opt/openvidu/recordings/1597617791698/.recording.1597617791698 with status [stopped]
openvidu-server_1  | [INFO] 2020-08-16 22:43:34,306 [http-nio-0.0.0.0-5443-exec-7] io.openvidu.server.recording.service.SingleStreamRecordingService - Stopping individual (video+audio) recording 1597617791698 of session 1597617791698. Reason: recordingStoppedByServer
openvidu-server_1  | [INFO] 2020-08-16 22:43:34,307 [http-nio-0.0.0.0-5443-exec-7] io.openvidu.server.recording.service.SingleStreamRecordingService - Stopping single stream recorder for stream str_CAM_N7Zp_con_T1tXN4VNxp in session 1597617791698
openvidu-server_1  | [INFO] 2020-08-16 22:43:34,307 [http-nio-0.0.0.0-5443-exec-7] io.openvidu.server.recording.service.SingleStreamRecordingService - Stream str_CAM_N7Zp_con_T1tXN4VNxp recording of session 1597617791698 was already stopped
openvidu-server_1  | [INFO] 2020-08-16 22:43:34,312 [http-nio-0.0.0.0-5443-exec-7] io.openvidu.server.recording.service.RecordingService - KMS recording file permissions successfully updated
openvidu-server_1  | [INFO] 2020-08-16 22:43:34,312 [http-nio-0.0.0.0-5443-exec-7] io.openvidu.server.recording.service.RecordingService - Sealed recording metadata file at /opt/openvidu/recordings/1597617791698/.recording.1597617791698 with status [ready]
openvidu-server_1  | [INFO] 2020-08-16 22:43:34,313 [http-nio-0.0.0.0-5443-exec-7] io.openvidu.server.cdr.CDRLoggerFile - {"recordingStatusChanged":{"sessionId":"1597617791698","timestamp":1597617814313,"startTime":1597617796407,"duration":0.0,"reason":"recordingStoppedByServer","id":"1597617791698","name":"1597617791698","outputMode":"INDIVIDUAL","hasAudio":true,"hasVideo":true,"size":0,"status":"ready"}}
openvidu-server_1  | [INFO] 2020-08-16 22:43:34,314 [http-nio-0.0.0.0-5443-exec-7] io.openvidu.server.recording.service.RecordingManager - Ongoing recording of session 1597617791698 was explicetly stopped within timeout for automatic recording stop. Closing session
openvidu-server_1  | [INFO] 2020-08-16 22:43:34,314 [http-nio-0.0.0.0-5443-exec-7] io.openvidu.server.cdr.CDRLoggerFile - {"sessionDestroyed":{"sessionId":"1597617791698","timestamp":1597617814314,"startTime":1597617792227,"duration":22,"reason":"recordingStoppedByServer"}}
openvidu-server_1  | [INFO] 2020-08-16 22:43:34,317 [http-nio-0.0.0.0-5443-exec-7] io.openvidu.server.core.SessionManager - Session '1597617791698' removed and closed
openvidu-server_1  | [INFO] 2020-08-16 22:43:43,002 [jsonrpcTaskScheduler-1] io.openvidu.server.rpc.RpcHandler - After connection closed for WebSocket session: udbr8bqh2tcicug2qjs3d1h40m - Status: null

You can see the [ERROR] above.
Can anyone help please. Thanks

Please, could you describe more details?

Which is your OpenVidu version?
Which is the openvidu-recorder version?

Version: 2.15.0 (https://docs.openvidu.io/en/2.15.0/)
Used: https://docs.openvidu.io/en/2.15.0/reference-docs/openvidu-browser/
Used Rest API: https://docs.openvidu.io/en/2.15.0/reference-docs/REST-API/

I don’t know what you mean by openvidu-recorder version. But this is what I did to successfully record a video: https://docs.openvidu.io/en/2.15.0/advanced-features/recording/

Coming back to the original issue, I want to let you know that after making the following change, I was able to record videos on my iOS 13 Safari iPhone as well. The change was to remove the resolution property:

 var publisher = OV.initPublisher("vidCamera", {
                    audioSource: undefined,     // The source of audio. If undefined default microphone
                    videoSource: undefined,     // The source of video. If undefined default webcam
                    publishAudio: true,         // Whether you want to start publishing with your audio unmuted or not
                    publishVideo: true,         // Whether you want to start publishing with your video enabled or not
                    //resolution: '1920x1080',  // The resolution of your video
                    frameRate: 30,              // The frame rate of your video
                    insertMode: 'APPEND',       // How the video is inserted in the target element 'video-container'
                    mirror: false               // Whether to mirror your local video or not
                });

Apparently, when I set the resolution to 1920x1080, it works on Android and iOS < 13 phones but when I try recording on an iPhone with iOS 13, the resolution needs to be either commented out or set as “640x480”. It restricts the recording to this resolution which reduces the quality of the output but I don’t see another solution to it. Let me know if you have any other solution for the problem. Thanks

Ok, we’ll check it out.

Thanks

Hi @aboutabdullah,

Are you recording with COMPOSED or INDIVIDUAL mode?

In your setup, are 2 users able to see each other? I mean, appart from recording one Publisher from a Safari browser in iOS 13, if you add another user to the session, is this user able to successfully subscribe to the Publisher as well?

Can you post the Safari logs of the iPhone iOS 13 when initializing and publishing the Publisher with both resolution set to 1920x1080 and without it? Maybe there’s something there telling us what could be wrong.

If you can answer this questions, it will help us a lot. Thank you.

Hi,

The recording was with INDIVIDUAL. Please check the CDR logs for the session below.

In our setup, there were NO 2 users. The requirement of our setup was to record a video so we connected only one user to the session and started recording. No other users were allowed to connect to the session. I am afraid I do not have the access to this setup anymore because I was doing this for a client and he was fine with the solution I provided him (commenting out the resolution for iOS 13). But I can answer any question related to the setup so please ask if you have any more questions. The logs below will also be able to help you I think. I don’t have the Safari logs but the CDR logs below shows the result when I tried 1920x1080 with iOS 13, the resultant webm file was 0KB. And the logs shared above shows the ERROR as well.

Just remember, the requirement was to create a session with only one user and record that session (in INDIVIDUAL mode). There was no second user.

{"sessionCreated":{"sessionId":"1597614745131","timestamp":1597614745608}}
{"participantJoined":{"sessionId":"1597614745131","timestamp":1597614745904,"participantId":"con_XF90bqI12L","location":"unknown","platform":"Safari 13.1.2 on Apple iPhone (iOS 13.6)","clientData":"","serverData":""}}
{"recordingStarted":{"sessionId":"1597614745131","timestamp":1597614754864,"id":"1597614745131","name":"1597614745131","outputMode":"INDIVIDUAL","hasAudio":true,"hasVideo":true,"size":0,"duration":0.0}}
{"recordingStatusChanged":{"sessionId":"1597614745131","timestamp":1597614754864,"startTime":1597614754864,"duration":0.0,"id":"1597614745131","name":"1597614745131","outputMode":"INDIVIDUAL","hasAudio":true,"hasVideo":true,"size":0,"status":"started"}}
{"webrtcConnectionCreated":{"sessionId":"1597614745131","timestamp":1597614755564,"streamId":"str_CAM_O5sK_con_XF90bqI12L","participantId":"con_XF90bqI12L","connection":"OUTBOUND","videoSource":"CAMERA","videoFramerate":30,"videoDimensions":"{\"width\":960,\"height\":1280}","audioEnabled":true,"videoEnabled":true}}
{"webrtcConnectionDestroyed":{"sessionId":"1597614745131","timestamp":1597614785496,"startTime":1597614755564,"duration":29,"reason":"disconnect","streamId":"str_CAM_O5sK_con_XF90bqI12L","participantId":"con_XF90bqI12L","connection":"OUTBOUND","videoSource":"CAMERA","videoFramerate":30,"videoDimensions":"{\"width\":960,\"height\":1280}","audioEnabled":true,"videoEnabled":true}}
{"participantLeft":{"sessionId":"1597614745131","timestamp":1597614785515,"startTime":1597614745904,"duration":39,"reason":"disconnect","participantId":"con_XF90bqI12L","location":"unknown","platform":"Safari 13.1.2 on Apple iPhone (iOS 13.6)","clientData":"","serverData":""}}
{"recordingStatusChanged":{"sessionId":"1597614745131","timestamp":1597614790270,"startTime":1597614754864,"duration":0.0,"reason":"recordingStoppedByServer","id":"1597614745131","name":"1597614745131","outputMode":"INDIVIDUAL","hasAudio":true,"hasVideo":true,"size":0,"status":"stopped"}}
{"recordingStopped":{"sessionId":"1597614745131","timestamp":1597614790270,"startTime":1597614754864,"duration":0.0,"reason":"recordingStoppedByServer","id":"1597614745131","name":"1597614745131","outputMode":"INDIVIDUAL","hasAudio":true,"hasVideo":true,"size":0}}
{"recordingStatusChanged":{"sessionId":"1597614745131","timestamp":1597614790283,"startTime":1597614754864,"duration":0.0,"reason":"recordingStoppedByServer","id":"1597614745131","name":"1597614745131","outputMode":"INDIVIDUAL","hasAudio":true,"hasVideo":true,"size":0,"status":"ready"}}
{"sessionDestroyed":{"sessionId":"1597614745131","timestamp":1597614790285,"startTime":1597614745608,"duration":44,"reason":"recordingStoppedByServer"}}

Yes, my theory is that this has nothing to do with recording at all. I’m pretty sure that if you would have connected a second user to receive the Publisher’s video, that user would have received nothing.
But maybe I’m wrong and in fact the recording module is the one failing. We will perform some tests to see if we’re able to reproduce the issue.

Hi @pabloFuente,

Thank you for input. If you are trying to reproduce the issue, please note the options passed to initPublisher like so:

var publisher = OV.initPublisher("vidCamera", {
                    audioSource: undefined,     // The source of audio. If undefined default microphone
                    videoSource: undefined,     // The source of video. If undefined default webcam
                    publishAudio: true,         // Whether you want to start publishing with your audio unmuted or not
                    publishVideo: true,         // Whether you want to start publishing with your video enabled or not
                    resolution: '1920x1080',  // The resolution of your video
                    frameRate: 30,              // The frame rate of your video
                    insertMode: 'APPEND',       // How the video is inserted in the target element 'video-container'
                    mirror: false               // Whether to mirror your local video or not
                });

And then just connect one user with a single session. The mode needs to be INDIVIDUAL and the iOS version needs to be iOS > 12 (you can check the exact iOS version in the logs above. Please note that I used “MANUAL” recording using the REST API instead of “ALWAYS”. You will see that the video file (webm) gets generated but the file size is always zero. My theory is that when I tried to stop the recording using the REST API, it threw the error (as seen in the CDR log below). This error didn’t allow the stop of recording and did not produce the desired video file. This error is also visible in the first log contents I shared above.

openvidu-server_1 | [ERROR] 2020-08-16 22:43:32,968 [SessionHandler-udbr8bqh2tcicug2qjs3d1h40m-e90-t0] io.openvidu.server.recording.service.RecordingManager - Error waiting for recorder endpoint of stream str_CAM_N7Zp_con_T1tXN4VNxp to stop in session 1597617791698

I hope this helps in resolving the issue.