2018-04-18 14:29:07 +02:00
|
|
|
/*
|
2020-02-04 11:25:54 +01:00
|
|
|
* (C) Copyright 2017-2020 OpenVidu (https://openvidu.io)
|
2018-04-18 14:29:07 +02:00
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2019-01-18 20:59:27 +01:00
|
|
|
import { Recording } from './Recording';
|
2018-04-23 11:06:16 +02:00
|
|
|
import { RecordingLayout } from './RecordingLayout';
|
2018-04-20 12:04:56 +02:00
|
|
|
|
2018-07-22 22:13:45 +02:00
|
|
|
/**
|
|
|
|
* See [[OpenVidu.startRecording]]
|
|
|
|
*/
|
2018-04-23 11:06:16 +02:00
|
|
|
export interface RecordingProperties {
|
2018-04-24 15:42:23 +02:00
|
|
|
|
|
|
|
/**
|
2019-01-18 20:59:27 +01:00
|
|
|
* Name of the Recording. The video file will be named after this property.
|
|
|
|
* You can access this same value in your clients on recording events
|
|
|
|
* (`recordingStarted`, `recordingStopped`)
|
2018-04-24 15:42:23 +02:00
|
|
|
*/
|
2018-04-23 11:06:16 +02:00
|
|
|
name?: string;
|
2018-04-24 15:42:23 +02:00
|
|
|
|
|
|
|
/**
|
2019-01-18 20:59:27 +01:00
|
|
|
* The mode of recording: COMPOSED for a single archive in a grid layout or INDIVIDUAL for one archive for each stream
|
2021-04-05 17:06:12 +02:00
|
|
|
*
|
|
|
|
* Default to [[Recording.OutputMode.COMPOSED]]
|
2019-01-18 20:59:27 +01:00
|
|
|
*/
|
|
|
|
outputMode?: Recording.OutputMode;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The layout to be used in the recording.<br>
|
2020-07-02 12:16:13 +02:00
|
|
|
* Will only have effect if [[RecordingProperties.outputMode]] is `COMPOSED` or `COMPOSED_QUICK_START`
|
2021-04-05 17:06:12 +02:00
|
|
|
*
|
|
|
|
* Default to [[RecordingLayout.BEST_FIT]]
|
2018-04-24 15:42:23 +02:00
|
|
|
*/
|
2018-04-23 11:06:16 +02:00
|
|
|
recordingLayout?: RecordingLayout;
|
2018-04-24 15:42:23 +02:00
|
|
|
|
|
|
|
/**
|
2019-01-18 20:59:27 +01:00
|
|
|
* The relative path to the specific custom layout you want to use.<br>
|
2020-07-02 12:16:13 +02:00
|
|
|
* Will only have effect if [[RecordingProperties.outputMode]] is `COMPOSED` (or `COMPOSED_QUICK_START`) and [[RecordingProperties.recordingLayout]] is `CUSTOM`<br>
|
2021-04-05 17:06:12 +02:00
|
|
|
* See [Custom recording layouts](/en/stable/advanced-features/recording#custom-recording-layouts) to learn more.
|
2018-04-24 15:42:23 +02:00
|
|
|
*/
|
2018-04-23 11:06:16 +02:00
|
|
|
customLayout?: string;
|
2019-01-18 20:59:27 +01:00
|
|
|
|
2019-01-22 14:47:45 +01:00
|
|
|
/**
|
2019-02-01 18:19:06 +01:00
|
|
|
* Recording video file resolution. Must be a string with format "WIDTHxHEIGHT",
|
|
|
|
* being both WIDTH and HEIGHT the number of pixels between 100 and 1999.<br>
|
2021-04-05 17:06:12 +02:00
|
|
|
* 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 resolution of the published stream.
|
|
|
|
*
|
|
|
|
* Default to "1280x720"
|
2019-01-22 14:47:45 +01:00
|
|
|
*/
|
|
|
|
resolution?: string;
|
|
|
|
|
2021-04-05 17:06:12 +02:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* Default to 25
|
|
|
|
*/
|
|
|
|
frameRate?: number;
|
|
|
|
|
2019-01-18 20:59:27 +01:00
|
|
|
/**
|
2019-01-29 12:27:27 +01:00
|
|
|
* Whether or not to record audio. Cannot be set to false at the same time as [[RecordingProperties.hasVideo]]
|
2021-04-05 17:06:12 +02:00
|
|
|
*
|
|
|
|
* Default to true
|
2019-01-18 20:59:27 +01:00
|
|
|
*/
|
2019-01-20 18:13:34 +01:00
|
|
|
hasAudio?: boolean;
|
2019-01-18 20:59:27 +01:00
|
|
|
|
|
|
|
/**
|
2019-01-29 12:27:27 +01:00
|
|
|
* Whether or not to record video. Cannot be set to false at the same time as [[RecordingProperties.hasAudio]]
|
2021-04-05 17:06:12 +02:00
|
|
|
*
|
|
|
|
* Default to true
|
2019-01-18 20:59:27 +01:00
|
|
|
*/
|
2019-01-20 18:13:34 +01:00
|
|
|
hasVideo?: boolean;
|
2020-11-26 16:49:45 +01:00
|
|
|
|
2020-11-26 16:54:30 +01:00
|
|
|
/**
|
2021-04-05 17:06:12 +02:00
|
|
|
* The amount of shared memory reserved for the recording process in bytes.
|
|
|
|
* 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. Property ignored for INDIVIDUAL recordings and audio-only recordings.
|
|
|
|
* Minimum 134217728 (128MB).
|
|
|
|
*
|
|
|
|
* Default to 536870912 (512 MB)
|
2020-11-26 16:54:30 +01:00
|
|
|
*/
|
|
|
|
shmSize?: number;
|
|
|
|
|
2020-11-26 16:49:45 +01:00
|
|
|
/**
|
|
|
|
* **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>
|
|
|
|
*
|
|
|
|
* The Media Node where to host the recording. The default option if this property is not defined is the same
|
|
|
|
* Media Node hosting the Session to record. This object defines the following properties as Media Node selector:
|
|
|
|
* - `id`: Media Node unique identifier
|
|
|
|
*/
|
|
|
|
mediaNode?: {
|
|
|
|
id: string;
|
|
|
|
}
|
|
|
|
|
2018-04-18 14:23:16 +02:00
|
|
|
}
|