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.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2018-04-23 11:06:16 +02:00
|
|
|
import { MediaMode } from './MediaMode';
|
2021-04-05 17:06:12 +02:00
|
|
|
import { RecordingProperties } from './RecordingProperties';
|
2018-04-23 11:06:16 +02:00
|
|
|
import { RecordingMode } from './RecordingMode';
|
2021-04-05 17:06:12 +02:00
|
|
|
import { VideoCodec } from './VideoCodec';
|
2018-04-23 11:06:16 +02:00
|
|
|
|
2018-07-22 22:13:45 +02:00
|
|
|
/**
|
|
|
|
* See [[OpenVidu.createSession]]
|
|
|
|
*/
|
2018-04-23 11:06:16 +02:00
|
|
|
export interface SessionProperties {
|
2018-04-24 15:42:23 +02:00
|
|
|
|
2018-04-25 11:03:30 +02:00
|
|
|
/**
|
2019-10-11 11:00:43 +02:00
|
|
|
* How the media streams will be sent and received by your clients: routed through OpenVidu Media Node
|
2018-04-25 11:03:30 +02:00
|
|
|
* (`MediaMode.ROUTED`) or attempting direct p2p connections (`MediaMode.RELAYED`, _not available yet_)
|
2021-09-24 19:58:56 +02:00
|
|
|
*
|
2021-04-05 17:06:12 +02:00
|
|
|
* Default to [[MediaMode.ROUTED]]
|
2018-04-25 11:03:30 +02:00
|
|
|
*/
|
|
|
|
mediaMode?: MediaMode;
|
2018-04-24 15:42:23 +02:00
|
|
|
|
2018-04-25 11:03:30 +02:00
|
|
|
/**
|
|
|
|
* Whether the Session will be automatically recorded (`RecordingMode.ALWAYS`) or not (`RecordingMode.MANUAL`)
|
2021-09-24 19:58:56 +02:00
|
|
|
*
|
2021-04-05 17:06:12 +02:00
|
|
|
* Default to [[RecordingMode.MANUAL]]
|
2018-04-25 11:03:30 +02:00
|
|
|
*/
|
|
|
|
recordingMode?: RecordingMode;
|
2018-04-24 15:42:23 +02:00
|
|
|
|
2019-01-29 12:27:27 +01:00
|
|
|
/**
|
2021-04-05 17:06:12 +02:00
|
|
|
* Default recording properties of this session. You can easily override this value later when starting a
|
|
|
|
* [[Recording]] by providing new [[RecordingProperties]]
|
2021-09-24 19:58:56 +02:00
|
|
|
*
|
2021-04-05 17:06:12 +02:00
|
|
|
* Default values defined in [[RecordingProperties]] class
|
2018-04-25 11:03:30 +02:00
|
|
|
*/
|
2021-04-05 17:06:12 +02:00
|
|
|
defaultRecordingProperties?: RecordingProperties;
|
2018-05-03 10:58:26 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Fix the sessionId that will be assigned to the session with this parameter. You can take advantage of this property
|
|
|
|
* to facilitate the mapping between OpenVidu Server 'session' entities and your own 'session' entities.
|
|
|
|
* If this parameter is undefined or an empty string, OpenVidu Server will generate a random sessionId for you.
|
|
|
|
*/
|
|
|
|
customSessionId?: string;
|
2020-10-23 22:10:15 +02: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>
|
2021-09-24 19:58:56 +02:00
|
|
|
*
|
2020-10-23 22:10:15 +02:00
|
|
|
* The Media Node where to host the session. The default option if this property is not defined is the less loaded
|
2020-10-26 19:22:59 +01:00
|
|
|
* Media Node at the moment the first user joins the session. This object defines the following properties as Media Node selector:
|
|
|
|
* - `id`: Media Node unique identifier
|
2020-10-23 22:10:15 +02:00
|
|
|
*/
|
2020-10-26 19:22:59 +01:00
|
|
|
mediaNode?: {
|
|
|
|
id: string;
|
|
|
|
}
|
2020-10-23 22:10:15 +02:00
|
|
|
|
2020-11-19 17:06:50 +01:00
|
|
|
/**
|
|
|
|
* It defines which video codec do you want to be forcibly used for this session.
|
|
|
|
* This allows browsers/clients to use the same codec avoiding transcoding in the media server.
|
2021-04-05 17:06:12 +02:00
|
|
|
* If the browser/client is not compatible with the specified codec and [[allowTranscoding]] is <code>false</code>
|
|
|
|
* and exception will occur. If forcedVideoCodec is set to [[VideoCodec.NONE]], no codec will be forced.
|
2021-09-24 19:58:56 +02:00
|
|
|
*
|
|
|
|
* If defined here, this parameter has prevalence over OPENVIDU_STREAMS_FORCED_VIDEO_CODEC.
|
|
|
|
* OPENVIDU_STREAMS_FORCED_VIDEO_CODEC default is [[VideoCodec.VP8]]
|
2020-11-19 17:06:50 +01:00
|
|
|
*/
|
2021-04-05 17:06:12 +02:00
|
|
|
forcedVideoCodec?: VideoCodec;
|
2020-11-19 17:06:50 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* It defines if you want to allow transcoding in the media server or not
|
|
|
|
* when [[forcedVideoCodec]] is not compatible with the browser/client.
|
2021-09-24 19:58:56 +02:00
|
|
|
*
|
|
|
|
* If defined here, this parameter has prevalence over OPENVIDU_STREAMS_ALLOW_TRANSCODING.
|
|
|
|
* OPENVIDU_STREAMS_ALLOW_TRANSCODING default is 'false'
|
2020-11-19 17:06:50 +01:00
|
|
|
*/
|
|
|
|
allowTranscoding?: boolean;
|
|
|
|
|
2018-01-27 19:39:49 +01:00
|
|
|
}
|