mirror of https://github.com/OpenVidu/openvidu.git
openvidu-node-client: RecordingProperties#ignoreFailedStream
parent
888cc1bfc5
commit
7e0e460078
|
@ -94,6 +94,9 @@ export class Recording {
|
|||
this.properties.customLayout = (json['customLayout'] != null) ? json['customLayout'] : '';
|
||||
}
|
||||
}
|
||||
if (this.properties.outputMode.toString() === Recording.OutputMode[Recording.OutputMode.INDIVIDUAL]) {
|
||||
this.properties.ignoreFailedStreams = (json['ignoreFailedStreams'] != null) ? !!json['ignoreFailedStreams'] : Recording.DefaultRecordingPropertiesValues.ignoreFailedStreams;
|
||||
}
|
||||
}
|
||||
/* tslint:enable:no-string-literal */
|
||||
}
|
||||
|
@ -181,6 +184,7 @@ export namespace Recording {
|
|||
static readonly resolution: string = "1280x720";
|
||||
static readonly frameRate: number = 25;
|
||||
static readonly shmSize: number = 536870912;
|
||||
static readonly ignoreFailedStreams: boolean = false;
|
||||
}
|
||||
|
||||
}
|
|
@ -53,7 +53,7 @@ export interface RecordingProperties {
|
|||
|
||||
/**
|
||||
* The layout to be used in the recording.<br>
|
||||
* Will only have effect if [[RecordingProperties.outputMode]] is `COMPOSED` or `COMPOSED_QUICK_START`
|
||||
* Will only have effect if [[RecordingProperties.outputMode]] is set to [[Recording.OutputMode.COMPOSED]] or [[Recording.OutputMode.COMPOSED_QUICK_START]]
|
||||
*
|
||||
* Default to [[RecordingLayout.BEST_FIT]]
|
||||
*/
|
||||
|
@ -71,9 +71,8 @@ export interface RecordingProperties {
|
|||
|
||||
/**
|
||||
* Recording video file frame rate.<br>
|
||||
* Will only have effect if [[RecordingProperties.outputMode]]
|
||||
* is set to [[Recording.OutputMode.COMPOSED]] or [[Recording.OutputMode.COMPOSED_QUICK_START]] and [[RecordingProperties.hasVideo]] is set to true.
|
||||
* For [[Recording.OutputMode.INDIVIDUAL]] all individual video files will have the native frame rate of the published stream.
|
||||
* Will only have effect if [[RecordingProperties.outputMode]] is set to [[Recording.OutputMode.COMPOSED]] or [[Recording.OutputMode.COMPOSED_QUICK_START]]
|
||||
* and [[RecordingProperties.hasVideo]] is set to true. For [[Recording.OutputMode.INDIVIDUAL]] all individual video files will have the native frame rate of the published stream.
|
||||
*
|
||||
* Default to 25
|
||||
*/
|
||||
|
@ -91,11 +90,25 @@ export interface RecordingProperties {
|
|||
|
||||
/**
|
||||
* The relative path to the specific custom layout you want to use.<br>
|
||||
* Will only have effect if [[RecordingProperties.outputMode]] is `COMPOSED` (or `COMPOSED_QUICK_START`) and [[RecordingProperties.recordingLayout]] is `CUSTOM`<br>
|
||||
* Will only have effect if [[RecordingProperties.outputMode]] is set to [[Recording.OutputMode.COMPOSED]] or [[Recording.OutputMode.COMPOSED_QUICK_START]]
|
||||
* and [[RecordingProperties.recordingLayout]] is set to [[RecordingLayout.CUSTOM]]<br>
|
||||
* See [Custom recording layouts](/en/stable/advanced-features/recording#custom-recording-layouts) to learn more.
|
||||
*/
|
||||
customLayout?: string;
|
||||
|
||||
/**
|
||||
* Whether to ignore failed streams or not when starting the recording. This property only applies if [[RecordingProperties.outputMode]] is set to [[Recording.OutputMode.INDIVIDUAL]].
|
||||
* For this type of recordings, when calling [[OpenVidu.startRecording]] by default all the streams available at the moment the recording process starts must be healthy
|
||||
* and properly sending media. If some stream that should be sending media is broken, then the recording process fails after a 10s timeout. In this way your application is notified
|
||||
* that some stream is not being recorded, so it can retry the process again.
|
||||
*
|
||||
* But you can disable this rollback behavior and simply ignore any failed stream, which will be susceptible to be recorded in the future if media starts flowing as expected at any point.
|
||||
* The downside of this behavior is that you will have no guarantee that all streams present at the beginning of a recording are actually being recorded.
|
||||
*
|
||||
* Default to false
|
||||
*/
|
||||
ignoreFailedStreams?: boolean;
|
||||
|
||||
/**
|
||||
* **This feature is part of OpenVidu Pro tier** <a href="https://docs.openvidu.io/en/stable/openvidu-pro/" target="_blank" style="display: inline-block; background-color: rgb(0, 136, 170); color: white; font-weight: bold; padding: 0px 5px; margin-right: 5px; border-radius: 3px; font-size: 13px; line-height:21px; font-family: Montserrat, sans-serif">PRO</a>
|
||||
*
|
||||
|
|
|
@ -667,19 +667,22 @@ export class Session {
|
|||
props.defaultRecordingProperties = {};
|
||||
}
|
||||
props.defaultRecordingProperties.name = (props.defaultRecordingProperties?.name != null) ? props.defaultRecordingProperties.name : '';
|
||||
props.defaultRecordingProperties.hasAudio = (props.defaultRecordingProperties?.hasAudio != null) ? props.defaultRecordingProperties.hasAudio : true;
|
||||
props.defaultRecordingProperties.hasVideo = (props.defaultRecordingProperties?.hasVideo != null) ? props.defaultRecordingProperties.hasVideo : true;
|
||||
props.defaultRecordingProperties.outputMode = (props.defaultRecordingProperties?.outputMode != null) ? props.defaultRecordingProperties.outputMode : Recording.OutputMode.COMPOSED;
|
||||
props.defaultRecordingProperties.hasAudio = (props.defaultRecordingProperties?.hasAudio != null) ? props.defaultRecordingProperties.hasAudio : Recording.DefaultRecordingPropertiesValues.hasAudio;
|
||||
props.defaultRecordingProperties.hasVideo = (props.defaultRecordingProperties?.hasVideo != null) ? props.defaultRecordingProperties.hasVideo : Recording.DefaultRecordingPropertiesValues.hasVideo;
|
||||
props.defaultRecordingProperties.outputMode = (props.defaultRecordingProperties?.outputMode != null) ? props.defaultRecordingProperties.outputMode : Recording.DefaultRecordingPropertiesValues.outputMode;
|
||||
props.defaultRecordingProperties.mediaNode = props.defaultRecordingProperties?.mediaNode;
|
||||
if ((props.defaultRecordingProperties.outputMode === Recording.OutputMode.COMPOSED || props.defaultRecordingProperties.outputMode == Recording.OutputMode.COMPOSED_QUICK_START) && props.defaultRecordingProperties.hasVideo) {
|
||||
props.defaultRecordingProperties.recordingLayout = (props.defaultRecordingProperties.recordingLayout != null) ? props.defaultRecordingProperties.recordingLayout : RecordingLayout.BEST_FIT;
|
||||
props.defaultRecordingProperties.resolution = (props.defaultRecordingProperties.resolution != null) ? props.defaultRecordingProperties.resolution : '1280x720';
|
||||
props.defaultRecordingProperties.frameRate = (props.defaultRecordingProperties.frameRate != null) ? props.defaultRecordingProperties.frameRate : 25;
|
||||
props.defaultRecordingProperties.shmSize = (props.defaultRecordingProperties.shmSize != null) ? props.defaultRecordingProperties.shmSize : 536870912;
|
||||
props.defaultRecordingProperties.recordingLayout = (props.defaultRecordingProperties.recordingLayout != null) ? props.defaultRecordingProperties.recordingLayout : Recording.DefaultRecordingPropertiesValues.recordingLayout;
|
||||
props.defaultRecordingProperties.resolution = (props.defaultRecordingProperties.resolution != null) ? props.defaultRecordingProperties.resolution : Recording.DefaultRecordingPropertiesValues.resolution;
|
||||
props.defaultRecordingProperties.frameRate = (props.defaultRecordingProperties.frameRate != null) ? props.defaultRecordingProperties.frameRate : Recording.DefaultRecordingPropertiesValues.frameRate;
|
||||
props.defaultRecordingProperties.shmSize = (props.defaultRecordingProperties.shmSize != null) ? props.defaultRecordingProperties.shmSize : Recording.DefaultRecordingPropertiesValues.shmSize;
|
||||
if (props.defaultRecordingProperties.recordingLayout === RecordingLayout.CUSTOM) {
|
||||
props.defaultRecordingProperties.customLayout = (props.defaultRecordingProperties.customLayout != null) ? props.defaultRecordingProperties.customLayout : '';
|
||||
}
|
||||
}
|
||||
if (props.defaultRecordingProperties.outputMode === Recording.OutputMode.INDIVIDUAL) {
|
||||
props.defaultRecordingProperties.ignoreFailedStreams = (props.defaultRecordingProperties?.ignoreFailedStreams != null) ? props.defaultRecordingProperties.ignoreFailedStreams : Recording.DefaultRecordingPropertiesValues.ignoreFailedStreams;
|
||||
}
|
||||
|
||||
this.formatMediaNodeObjectIfNecessary(props.defaultRecordingProperties);
|
||||
this.formatMediaNodeObjectIfNecessary(props);
|
||||
|
|
Loading…
Reference in New Issue