public class OpenVidu extends Object
| Constructor and Description |
|---|
OpenVidu(String urlOpenViduServer,
String secret) |
| Modifier and Type | Method and Description |
|---|---|
Session |
createSession()
Creates an OpenVidu session with the default settings
|
Session |
createSession(SessionProperties properties)
Creates an OpenVidu session
|
void |
deleteRecording(String recordingId)
Deletes a recording.
|
Recording |
getRecording(String recordingId)
Gets an existing recording
|
List<Recording> |
listRecordings()
Lists all existing recordings
|
Recording |
startRecording(String sessionId)
Starts the recording of a
Session |
Recording |
startRecording(String sessionId,
RecordingProperties properties)
Starts the recording of a
Session |
Recording |
startRecording(String sessionId,
String name)
Starts the recording of a
Session |
Recording |
stopRecording(String recordingId)
Stops the recording of a
Session |
public Session createSession() throws OpenViduJavaClientException, OpenViduHttpException
OpenViduJavaClientExceptionOpenViduHttpExceptionpublic Session createSession(SessionProperties properties) throws OpenViduJavaClientException, OpenViduHttpException
properties - The specific configuration for this sessionOpenViduJavaClientExceptionOpenViduHttpException - Value returned from
OpenViduHttpException.getStatus()
409: you are trying to assign an already-in-use
custom sessionId to the session. See
SessionProperties.customSessionId()public Recording startRecording(String sessionId, RecordingProperties properties) throws OpenViduJavaClientException, OpenViduHttpException
SessionsessionId - The sessionId of the session you want to start recordingproperties - The configuration for this recordingOpenViduJavaClientExceptionOpenViduHttpException - Value returned from
OpenViduHttpException.getStatus()
404: no session exists for the passed
sessionId400: the session has no connected
participants409: the session is not configured for using
MediaMode.ROUTED or it is already
being recorded501: OpenVidu Server recording module is
disabled (openvidu.recording property set to
false)public Recording startRecording(String sessionId, String name) throws OpenViduJavaClientException, OpenViduHttpException
SessionsessionId - The sessionId of the session you want to start recordingname - The name you want to give to the video file. You can access this
same value in your clients on recording events (recordingStarted,
recordingStopped)OpenViduJavaClientExceptionOpenViduHttpException - Value returned from
OpenViduHttpException.getStatus()
404: no session exists for the passed
sessionId400: the session has no connected
participants409: the session is not configured for using
MediaMode.ROUTED or it is already
being recorded501: OpenVidu Server recording module is
disabled (openvidu.recording property set to
false)public Recording startRecording(String sessionId) throws OpenViduJavaClientException, OpenViduHttpException
SessionsessionId - The sessionId of the session you want to start recordingOpenViduJavaClientExceptionOpenViduHttpException - Value returned from
OpenViduHttpException.getStatus()
404: no session exists for the passed
sessionId400: the session has no connected
participants409: the session is not configured for using
MediaMode.ROUTED or it is already
being recorded501: OpenVidu Server recording module is
disabled (openvidu.recording property set to
false)public Recording stopRecording(String recordingId) throws OpenViduJavaClientException, OpenViduHttpException
SessionrecordingId - The id property of the recording you want to stopOpenViduJavaClientExceptionOpenViduHttpException - Value returned from
OpenViduHttpException.getStatus()
404: no recording exists for the passed
recordingId406: recording has starting status. Wait
until started status before stopping the recordingpublic Recording getRecording(String recordingId) throws OpenViduJavaClientException, OpenViduHttpException
recordingId - The id property of the recording you want to retrieveOpenViduJavaClientExceptionOpenViduHttpException - Value returned from
OpenViduHttpException.getStatus()
404: no recording exists for the passed
recordingIdpublic List<Recording> listRecordings() throws OpenViduJavaClientException, OpenViduHttpException
List with all existing recordingsOpenViduJavaClientExceptionOpenViduHttpExceptionpublic void deleteRecording(String recordingId) throws OpenViduJavaClientException, OpenViduHttpException
Recording.Status.stopped or
Recording.Status.availablerecordingId - OpenViduJavaClientExceptionOpenViduHttpException - Value returned from
OpenViduHttpException.getStatus()
404: no recording exists for the passed
recordingId409: the recording has started status.
Stop it before deletionCopyright © 2018 OpenVidu. All rights reserved.