OpenVidu SDKs: use new paths to consume REST API

pull/550/head
pabloFuente 2020-10-02 16:40:03 +02:00
parent 2d8216fb0d
commit 0e3e82d7e1
5 changed files with 125 additions and 103 deletions

View File

@ -70,16 +70,19 @@ public class OpenVidu {
protected HttpClient httpClient; protected HttpClient httpClient;
protected Map<String, Session> activeSessions = new ConcurrentHashMap<>(); protected Map<String, Session> activeSessions = new ConcurrentHashMap<>();
protected final static String API_SESSIONS = "api/sessions"; protected final static String API_PATH = "openvidu/api";
protected final static String API_TOKENS = "api/tokens"; protected final static String API_SESSIONS = API_PATH + "/sessions";
protected final static String API_RECORDINGS = "api/recordings"; protected final static String API_TOKENS = API_PATH + "/tokens";
protected final static String API_RECORDINGS_START = "/start"; protected final static String API_RECORDINGS = API_PATH + "/recordings";
protected final static String API_RECORDINGS_STOP = "/stop"; protected final static String API_RECORDINGS_START = API_RECORDINGS + "/start";
protected final static String API_RECORDINGS_STOP = API_RECORDINGS + "/stop";
/** /**
* @param urlOpenViduServer Public accessible IP where your instance of OpenVidu * @param hostname URL where your instance of OpenVidu Server is up an running.
* Server is up an running * It must be the full URL (e.g.
* @param secret Secret used on OpenVidu Server initialization * <code>https://12.34.56.78:1234/</code>)
*
* @param secret Secret used on OpenVidu Server initialization
*/ */
public OpenVidu(String hostname, String secret) { public OpenVidu(String hostname, String secret) {
@ -192,7 +195,7 @@ public class OpenVidu {
public Recording startRecording(String sessionId, RecordingProperties properties) public Recording startRecording(String sessionId, RecordingProperties properties)
throws OpenViduJavaClientException, OpenViduHttpException { throws OpenViduJavaClientException, OpenViduHttpException {
HttpPost request = new HttpPost(this.hostname + API_RECORDINGS + API_RECORDINGS_START); HttpPost request = new HttpPost(this.hostname + API_RECORDINGS_START);
JsonObject json = new JsonObject(); JsonObject json = new JsonObject();
json.addProperty("session", sessionId); json.addProperty("session", sessionId);
@ -201,7 +204,8 @@ public class OpenVidu {
json.addProperty("hasAudio", properties.hasAudio()); json.addProperty("hasAudio", properties.hasAudio());
json.addProperty("hasVideo", properties.hasVideo()); json.addProperty("hasVideo", properties.hasVideo());
if ((Recording.OutputMode.COMPOSED.equals(properties.outputMode()) || (Recording.OutputMode.COMPOSED_QUICK_START.equals(properties.outputMode()))) if ((Recording.OutputMode.COMPOSED.equals(properties.outputMode())
|| (Recording.OutputMode.COMPOSED_QUICK_START.equals(properties.outputMode())))
&& properties.hasVideo()) { && properties.hasVideo()) {
json.addProperty("resolution", properties.resolution()); json.addProperty("resolution", properties.resolution());
json.addProperty("recordingLayout", json.addProperty("recordingLayout",
@ -236,8 +240,9 @@ public class OpenVidu {
if (activeSession != null) { if (activeSession != null) {
activeSession.setIsBeingRecorded(true); activeSession.setIsBeingRecorded(true);
} else { } else {
log.warn("No active session found for sessionId '" + r.getSessionId() log.warn(
+ "'. This instance of OpenVidu Java Client didn't create this session"); "No active session found for sessionId '{}'. This instance of OpenVidu Java Client didn't create this session",
r.getSessionId());
} }
return r; return r;
} else { } else {
@ -352,7 +357,7 @@ public class OpenVidu {
* </ul> * </ul>
*/ */
public Recording stopRecording(String recordingId) throws OpenViduJavaClientException, OpenViduHttpException { public Recording stopRecording(String recordingId) throws OpenViduJavaClientException, OpenViduHttpException {
HttpPost request = new HttpPost(this.hostname + API_RECORDINGS + API_RECORDINGS_STOP + "/" + recordingId); HttpPost request = new HttpPost(this.hostname + API_RECORDINGS_STOP + "/" + recordingId);
HttpResponse response; HttpResponse response;
try { try {
response = this.httpClient.execute(request); response = this.httpClient.execute(request);
@ -368,8 +373,9 @@ public class OpenVidu {
if (activeSession != null) { if (activeSession != null) {
activeSession.setIsBeingRecorded(false); activeSession.setIsBeingRecorded(false);
} else { } else {
log.warn("No active session found for sessionId '" + r.getSessionId() log.warn(
+ "'. This instance of OpenVidu Java Client didn't create this session"); "No active session found for sessionId '{}'. This instance of OpenVidu Java Client didn't create this session",
r.getSessionId());
} }
return r; return r;
} else { } else {

View File

@ -48,9 +48,8 @@ public class Recording {
stopped, stopped,
/** /**
* The recording has finished OK and is available for download through OpenVidu * The recording has finished being processed and is available for download
* Server recordings endpoint: * through property {@link Recording#getUrl}
* https://YOUR_OPENVIDUSERVER_IP/recordings/{RECORDING_ID}/{RECORDING_NAME}.{EXTENSION}
*/ */
ready, ready,
@ -77,25 +76,23 @@ public class Recording {
INDIVIDUAL, INDIVIDUAL,
/** /**
* Works the same way as COMPOSED mode, but the necessary recorder * Works the same way as COMPOSED mode, but the necessary recorder service
* service module will start some time in advance and won't be terminated * module will start some time in advance and won't be terminated once a
* once a specific session recording has ended. This module will remain * specific session recording has ended. This module will remain up and running
* up and running as long as the session remains active.<br><br> * as long as the session remains active.<br>
* <br>
* *
* <ul> * <ul>
* <li> * <li><strong>Pros vs COMPOSED</strong>: the process of starting the recording
* <strong>Pros vs COMPOSED</strong>: the process of starting the recording will be noticeably * will be noticeably faster. This can be very useful in use cases where a
* faster. This can be very useful in use cases where a session needs to be * session needs to be recorded multiple times over time, when a better response
* recorded multiple times over time, when a better response time is usually * time is usually desirable.</li>
* desirable. * <li><strong>Cons vs COMPOSED</strong>: for every session initialized with
* </li> * COMPOSED_QUICK_START recording output mode, extra CPU power will be required
* <li> * in OpenVidu Server. The recording module will be continuously rendering all
* <strong>Cons vs COMPOSED</strong>: for every session initialized with COMPOSED_QUICK_START * of the streams being published to the session even when the session is not
* recording output mode, extra CPU power will be required in OpenVidu Server. * being recorded. And that is for every session configured with
* The recording module will be continuously rendering all of the streams being * COMPOSED_QUICK_START.</li>
* published to the session even when the session is not being recorded. And that
* is for every session configured with COMPOSED_QUICK_START.
* </li>
* </ul> * </ul>
*/ */
COMPOSED_QUICK_START; COMPOSED_QUICK_START;
@ -129,7 +126,8 @@ public class Recording {
OutputMode outputMode = OutputMode.valueOf(json.get("outputMode").getAsString()); OutputMode outputMode = OutputMode.valueOf(json.get("outputMode").getAsString());
RecordingProperties.Builder builder = new RecordingProperties.Builder().name(json.get("name").getAsString()) RecordingProperties.Builder builder = new RecordingProperties.Builder().name(json.get("name").getAsString())
.outputMode(outputMode).hasAudio(hasAudio).hasVideo(hasVideo); .outputMode(outputMode).hasAudio(hasAudio).hasVideo(hasVideo);
if ((OutputMode.COMPOSED.equals(outputMode) || OutputMode.COMPOSED_QUICK_START.equals(outputMode)) && hasVideo) { if ((OutputMode.COMPOSED.equals(outputMode) || OutputMode.COMPOSED_QUICK_START.equals(outputMode))
&& hasVideo) {
builder.resolution(json.get("resolution").getAsString()); builder.resolution(json.get("resolution").getAsString());
builder.recordingLayout(RecordingLayout.valueOf(json.get("recordingLayout").getAsString())); builder.recordingLayout(RecordingLayout.valueOf(json.get("recordingLayout").getAsString()));
JsonElement customLayout = json.get("customLayout"); JsonElement customLayout = json.get("customLayout");
@ -219,8 +217,8 @@ public class Recording {
/** /**
* URL of the recording. You can access the file from there. It is * URL of the recording. You can access the file from there. It is
* <code>null</code> until recording reaches "ready" or "failed" status. If * <code>null</code> until recording reaches "ready" or "failed" status. If
* <a href="https://docs.openvidu.io/en/stable/reference-docs/openvidu-config/" target= * <a href="https://docs.openvidu.io/en/stable/reference-docs/openvidu-config/"
* "_blank">OpenVidu Server configuration</a> property * target= "_blank">OpenVidu Server configuration</a> property
* <code>OPENVIDU_RECORDING_PUBLIC_ACCESS</code> is false, this path will be * <code>OPENVIDU_RECORDING_PUBLIC_ACCESS</code> is false, this path will be
* secured with OpenVidu credentials * secured with OpenVidu credentials
*/ */
@ -230,7 +228,8 @@ public class Recording {
/** /**
* Resolution of the video file. Only defined if OutputMode of the Recording is * Resolution of the video file. Only defined if OutputMode of the Recording is
* set to {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED} or {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED_QUICK_START} * set to {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED} or
* {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED_QUICK_START}
*/ */
public String getResolution() { public String getResolution() {
return this.recordingProperties.resolution(); return this.recordingProperties.resolution();

View File

@ -52,7 +52,8 @@ public class RecordingProperties {
* Builder for {@link io.openvidu.java.client.RecordingProperties} * Builder for {@link io.openvidu.java.client.RecordingProperties}
*/ */
public RecordingProperties build() { public RecordingProperties build() {
if (OutputMode.COMPOSED.equals(this.outputMode) || OutputMode.COMPOSED_QUICK_START.equals(this.outputMode)) { if (OutputMode.COMPOSED.equals(this.outputMode)
|| OutputMode.COMPOSED_QUICK_START.equals(this.outputMode)) {
this.recordingLayout = this.recordingLayout != null ? this.recordingLayout : RecordingLayout.BEST_FIT; this.recordingLayout = this.recordingLayout != null ? this.recordingLayout : RecordingLayout.BEST_FIT;
this.resolution = this.resolution != null ? this.resolution : "1920x1080"; this.resolution = this.resolution != null ? this.resolution : "1920x1080";
if (RecordingLayout.CUSTOM.equals(this.recordingLayout)) { if (RecordingLayout.CUSTOM.equals(this.recordingLayout)) {
@ -102,11 +103,14 @@ public class RecordingProperties {
* method to set the relative path to the specific custom layout you want to * method to set the relative path to the specific custom layout you want to
* use.<br> * use.<br>
* Will only have effect if * Will only have effect if
* {@link io.openvidu.java.client.RecordingProperties.Builder#outputMode(Recording.OutputMode)} * {@link io.openvidu.java.client.RecordingProperties.Builder#outputMode(Recording.OutputMode)
* has been called with value * Builder.outputMode()} has been called with value
* {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED} or * {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED
* {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED_QUICK_START}.<br> * OutputMode.COMPOSED} or
* See <a href="https://docs.openvidu.io/en/stable/advanced-features/recording#custom-recording-layouts" * {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED_QUICK_START
* OutputMode.COMPOSED_QUICK_START}.<br>
* See <a href=
* "https://docs.openvidu.io/en/stable/advanced-features/recording#custom-recording-layouts"
* target="_blank">Custom recording layouts</a> to learn more * target="_blank">Custom recording layouts</a> to learn more
*/ */
public RecordingProperties.Builder customLayout(String path) { public RecordingProperties.Builder customLayout(String path) {
@ -119,13 +123,15 @@ public class RecordingProperties {
* format "WIDTHxHEIGHT", being both WIDTH and HEIGHT the number of pixels * format "WIDTHxHEIGHT", being both WIDTH and HEIGHT the number of pixels
* between 100 and 1999.<br> * between 100 and 1999.<br>
* Will only have effect if * Will only have effect if
* {@link io.openvidu.java.client.RecordingProperties.Builder#outputMode(Recording.OutputMode)} * {@link io.openvidu.java.client.RecordingProperties.Builder#outputMode(Recording.OutputMode)
* has been called with value * Builder.outputMode()} has been called with value
* {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED} or * {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED
* {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED_QUICK_START}. For * OutputMode.COMPOSED} or
* {@link io.openvidu.java.client.Recording.OutputMode#INDIVIDUAL} all * {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED_QUICK_START
* individual video files will have the native resolution of the published * OutputMode.COMPOSED_QUICK_START}. For
* stream * {@link io.openvidu.java.client.Recording.OutputMode#INDIVIDUAL
* OutputMode.INDIVIDUAL} all individual video files will have the native
* resolution of the published stream
*/ */
public RecordingProperties.Builder resolution(String resolution) { public RecordingProperties.Builder resolution(String resolution) {
this.resolution = resolution; this.resolution = resolution;
@ -134,7 +140,8 @@ public class RecordingProperties {
/** /**
* Call this method to specify whether to record audio or not. Cannot be set to * Call this method to specify whether to record audio or not. Cannot be set to
* false at the same time as {@link hasVideo(boolean)} * false at the same time as
* {@link RecordingProperties.Builder#hasVideo(boolean)}
*/ */
public RecordingProperties.Builder hasAudio(boolean hasAudio) { public RecordingProperties.Builder hasAudio(boolean hasAudio) {
this.hasAudio = hasAudio; this.hasAudio = hasAudio;
@ -143,7 +150,8 @@ public class RecordingProperties {
/** /**
* Call this method to specify whether to record video or not. Cannot be set to * Call this method to specify whether to record video or not. Cannot be set to
* false at the same time as {@link hasAudio(boolean)} * false at the same time as
* {@link RecordingProperties.Builder#hasAudio(boolean)}
*/ */
public RecordingProperties.Builder hasVideo(boolean hasVideo) { public RecordingProperties.Builder hasVideo(boolean hasVideo) {
this.hasVideo = hasVideo; this.hasVideo = hasVideo;
@ -185,12 +193,12 @@ public class RecordingProperties {
/** /**
* Defines the mode of recording: {@link Recording.OutputMode#COMPOSED} or * Defines the mode of recording: {@link Recording.OutputMode#COMPOSED} or
* {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED_QUICK_START} for a * {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED_QUICK_START} for
* single archive in a grid layout or {@link Recording.OutputMode#INDIVIDUAL} * a single archive in a grid layout or {@link Recording.OutputMode#INDIVIDUAL}
* for one archive for each stream.<br> * for one archive for each stream.<br>
* <br> * <br>
* *
* Default to {@link Recording.OutputMode#COMPOSED} * Default to {@link Recording.OutputMode#COMPOSED OutputMode.COMPOSED}
*/ */
public Recording.OutputMode outputMode() { public Recording.OutputMode outputMode() {
return this.outputMode; return this.outputMode;
@ -199,12 +207,14 @@ public class RecordingProperties {
/** /**
* Defines the layout to be used in the recording.<br> * Defines the layout to be used in the recording.<br>
* Will only have effect if * Will only have effect if
* {@link io.openvidu.java.client.RecordingProperties.Builder#outputMode(Recording.OutputMode)} * {@link io.openvidu.java.client.RecordingProperties.Builder#outputMode(Recording.OutputMode)
* has been called with value {@link Recording.OutputMode#COMPOSED} or * Builder.outputMode()} has been called with value
* {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED_QUICK_START}.<br> * {@link Recording.OutputMode#COMPOSED OutputMode.COMPOSED} or
* {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED_QUICK_START
* OutputMode.COMPOSED_QUICK_START}.<br>
* <br> * <br>
* *
* Default to {@link RecordingLayout#BEST_FIT} * Default to {@link RecordingLayout#BEST_FIT RecordingLayout.BEST_FIT}
*/ */
public RecordingLayout recordingLayout() { public RecordingLayout recordingLayout() {
return this.recordingLayout; return this.recordingLayout;
@ -214,7 +224,8 @@ public class RecordingProperties {
* If {@link io.openvidu.java.client.RecordingProperties#recordingLayout()} is * If {@link io.openvidu.java.client.RecordingProperties#recordingLayout()} is
* set to {@link io.openvidu.java.client.RecordingLayout#CUSTOM}, this property * set to {@link io.openvidu.java.client.RecordingLayout#CUSTOM}, this property
* defines the relative path to the specific custom layout you want to use.<br> * defines the relative path to the specific custom layout you want to use.<br>
* See <a href="https://docs.openvidu.io/en/stable/advanced-features/recording#custom-recording-layouts" * See <a href=
* "https://docs.openvidu.io/en/stable/advanced-features/recording#custom-recording-layouts"
* target="_blank">Custom recording layouts</a> to learn more * target="_blank">Custom recording layouts</a> to learn more
*/ */
public String customLayout() { public String customLayout() {
@ -227,8 +238,8 @@ public class RecordingProperties {
* {@link io.openvidu.java.client.RecordingProperties.Builder#outputMode(Recording.OutputMode)} * {@link io.openvidu.java.client.RecordingProperties.Builder#outputMode(Recording.OutputMode)}
* has been called with value * has been called with value
* {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED} or * {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED} or
* {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED_QUICK_START}. For * {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED_QUICK_START}.
* {@link io.openvidu.java.client.Recording.OutputMode#INDIVIDUAL} all * For {@link io.openvidu.java.client.Recording.OutputMode#INDIVIDUAL} all
* individual video files will have the native resolution of the published * individual video files will have the native resolution of the published
* stream.<br> * stream.<br>
* <br> * <br>
@ -241,7 +252,7 @@ public class RecordingProperties {
/** /**
* Defines whether to record audio or not. Cannot be set to false at the same * Defines whether to record audio or not. Cannot be set to false at the same
* time as {@link hasVideo()}.<br> * time as {@link RecordingProperties#hasVideo()}.<br>
* <br> * <br>
* *
* Default to true * Default to true
@ -252,7 +263,7 @@ public class RecordingProperties {
/** /**
* Defines whether to record video or not. Cannot be set to false at the same * Defines whether to record video or not. Cannot be set to false at the same
* time as {@link hasAudio()}.<br> * time as {@link RecordingProperties#hasAudio()}.<br>
* <br> * <br>
* *
* Default to true * Default to true

View File

@ -47,23 +47,29 @@ export class OpenVidu {
/** /**
* @hidden * @hidden
*/ */
static readonly API_RECORDINGS: string = '/api/recordings'; static readonly API_PATH: string = '/openvidu/api';
/** /**
* @hidden * @hidden
*/ */
static readonly API_RECORDINGS_START: string = '/start'; static readonly API_SESSIONS = OpenVidu.API_PATH + '/sessions';
/** /**
* @hidden * @hidden
*/ */
static readonly API_RECORDINGS_STOP: string = '/stop'; static readonly API_TOKENS = OpenVidu.API_PATH + '/tokens';
/** /**
* @hidden * @hidden
*/ */
static readonly API_SESSIONS = '/api/sessions'; static readonly API_RECORDINGS: string = OpenVidu.API_PATH + '/recordings';
/** /**
* @hidden * @hidden
*/ */
static readonly API_TOKENS = '/api/tokens'; static readonly API_RECORDINGS_START: string = OpenVidu.API_RECORDINGS + '/start';
/**
* @hidden
*/
static readonly API_RECORDINGS_STOP: string = OpenVidu.API_RECORDINGS + '/stop';
/** /**
@ -83,7 +89,8 @@ export class OpenVidu {
activeSessions: Session[] = []; activeSessions: Session[] = [];
/** /**
* @param urlOpenViduServer Public accessible IP where your instance of OpenVidu Server is up an running * @param urlOpenViduServer URL where your instance of OpenVidu Server is up an running.
* It must be the full URL (e.g. `https://12.34.56.78:1234/`)
* @param secret Secret used on OpenVidu Server initialization * @param secret Secret used on OpenVidu Server initialization
*/ */
constructor(private urlOpenViduServer: string, secret: string) { constructor(private urlOpenViduServer: string, secret: string) {
@ -145,7 +152,7 @@ export class OpenVidu {
hasVideo: !!(properties.hasVideo) hasVideo: !!(properties.hasVideo)
}; };
if (data.outputMode.toString() === Recording.OutputMode[Recording.OutputMode.COMPOSED] if (data.outputMode.toString() === Recording.OutputMode[Recording.OutputMode.COMPOSED]
|| data.outputMode.toString() === Recording.OutputMode[Recording.OutputMode.COMPOSED_QUICK_START]) { || data.outputMode.toString() === Recording.OutputMode[Recording.OutputMode.COMPOSED_QUICK_START]) {
data.resolution = !!properties.resolution ? properties.resolution : '1920x1080'; data.resolution = !!properties.resolution ? properties.resolution : '1920x1080';
data.recordingLayout = !!properties.recordingLayout ? properties.recordingLayout : RecordingLayout.BEST_FIT; data.recordingLayout = !!properties.recordingLayout ? properties.recordingLayout : RecordingLayout.BEST_FIT;
if (data.recordingLayout.toString() === RecordingLayout[RecordingLayout.CUSTOM]) { if (data.recordingLayout.toString() === RecordingLayout[RecordingLayout.CUSTOM]) {
@ -169,7 +176,7 @@ export class OpenVidu {
} }
axios.post( axios.post(
this.host + OpenVidu.API_RECORDINGS + OpenVidu.API_RECORDINGS_START, this.host + OpenVidu.API_RECORDINGS_START,
data, data,
{ {
headers: { headers: {
@ -223,7 +230,7 @@ export class OpenVidu {
return new Promise<Recording>((resolve, reject) => { return new Promise<Recording>((resolve, reject) => {
axios.post( axios.post(
this.host + OpenVidu.API_RECORDINGS + OpenVidu.API_RECORDINGS_STOP + '/' + recordingId, this.host + OpenVidu.API_RECORDINGS_STOP + '/' + recordingId,
undefined, undefined,
{ {
headers: { headers: {

View File

@ -83,7 +83,7 @@ export class Recording {
hasVideo: !!json['hasVideo'] hasVideo: !!json['hasVideo']
}; };
if (this.properties.outputMode.toString() === Recording.OutputMode[Recording.OutputMode.COMPOSED] if (this.properties.outputMode.toString() === Recording.OutputMode[Recording.OutputMode.COMPOSED]
|| this.properties.outputMode.toString() === Recording.OutputMode[Recording.OutputMode.COMPOSED_QUICK_START]) { || this.properties.outputMode.toString() === Recording.OutputMode[Recording.OutputMode.COMPOSED_QUICK_START]) {
this.properties.resolution = !!(json['resolution']) ? json['resolution'] : '1920x1080'; this.properties.resolution = !!(json['resolution']) ? json['resolution'] : '1920x1080';
this.properties.recordingLayout = !!(json['recordingLayout']) ? json['recordingLayout'] : RecordingLayout.BEST_FIT; this.properties.recordingLayout = !!(json['recordingLayout']) ? json['recordingLayout'] : RecordingLayout.BEST_FIT;
if (this.properties.recordingLayout.toString() === RecordingLayout[RecordingLayout.CUSTOM]) { if (this.properties.recordingLayout.toString() === RecordingLayout[RecordingLayout.CUSTOM]) {
@ -103,7 +103,7 @@ export namespace Recording {
/** /**
* The recording is starting (cannot be stopped). Some recording may not go * The recording is starting (cannot be stopped). Some recording may not go
* through this status and directly reach "started" status * through this status and directly reach "started" status
*/ */
starting = 'starting', starting = 'starting',
@ -113,21 +113,20 @@ export namespace Recording {
started = 'started', started = 'started',
/** /**
* The recording has stopped and is being processed. At some point it will reach * The recording has stopped and is being processed. At some point it will reach
* "ready" status * "ready" status
*/ */
stopped = 'stopped', stopped = 'stopped',
/** /**
* The recording has finished OK and is available for download through OpenVidu * The recording has finished being processed and is available for download through
* Server recordings endpoint: * property [[Recording.url]]
* https://YOUR_OPENVIDUSERVER_IP/recordings/{RECORDING_ID}/{RECORDING_NAME}.{EXTENSION}
*/ */
ready = 'ready', ready = 'ready',
/** /**
* The recording has failed. This status may be reached from "starting", * The recording has failed. This status may be reached from "starting",
* "started" and "stopped" status * "started" and "stopped" status
*/ */
failed = 'failed' failed = 'failed'
} }
@ -142,23 +141,23 @@ export namespace Recording {
*/ */
COMPOSED = 'COMPOSED', COMPOSED = 'COMPOSED',
/** /**
* Works the same way as COMPOSED mode, but the necessary recorder * Works the same way as COMPOSED mode, but the necessary recorder
* service module will start some time in advance and won't be terminated * service module will start some time in advance and won't be terminated
* once a specific session recording has ended. This module will remain * once a specific session recording has ended. This module will remain
* up and running as long as the session remains active. * up and running as long as the session remains active.
* *
* - **Pros vs COMPOSED**: the process of starting the recording will be noticeably * - **Pros vs COMPOSED**: the process of starting the recording will be noticeably
* faster. This can be very useful in use cases where a session needs to be * faster. This can be very useful in use cases where a session needs to be
* recorded multiple times over time, when a better response time is usually * recorded multiple times over time, when a better response time is usually
* desirable. * desirable.
* - **Cons vs COMPOSED**: for every session initialized with COMPOSED_QUICK_START * - **Cons vs COMPOSED**: for every session initialized with COMPOSED_QUICK_START
* recording output mode, extra CPU power will be required in OpenVidu Server. * recording output mode, extra CPU power will be required in OpenVidu Server.
* The recording module will be continuously rendering all of the streams being * The recording module will be continuously rendering all of the streams being
* published to the session even when the session is not being recorded. And that * published to the session even when the session is not being recorded. And that
* is for every session configured with COMPOSED_QUICK_START. * is for every session configured with COMPOSED_QUICK_START.
*/ */
COMPOSED_QUICK_START = 'COMPOSED_QUICK_START', COMPOSED_QUICK_START = 'COMPOSED_QUICK_START',
/** /**