Package io.openvidu.java.client
Class SessionProperties.Builder
- java.lang.Object
-
- io.openvidu.java.client.SessionProperties.Builder
-
- Enclosing class:
- SessionProperties
public static class SessionProperties.Builder extends Object
Builder forSessionProperties
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SessionProperties.Builder
allowTranscoding(Boolean allowTranscoding)
Call this method to define if you want to allow transcoding in the media server or not whenforcedVideoCodec(VideoCodec)
is not compatible with the browser/client.
If defined here, this parameter has prevalence over OPENVIDU_STREAMS_ALLOW_TRANSCODING.SessionProperties
build()
Returns theSessionProperties
object properly configuredSessionProperties.Builder
customSessionId(String customSessionId)
Call this method to fix the sessionId that will be assigned to the session.SessionProperties.Builder
defaultRecordingProperties(RecordingProperties defaultRecordingProperties)
Call this method to set the default recording properties of this session.SessionProperties.Builder
forcedVideoCodec(VideoCodec forcedVideoCodec)
Define which video codec will be forcibly used for this session.SessionProperties.Builder
forcedVideoCodecResolved(VideoCodec forcedVideoCodec)
Actual video codec that will be forcibly used for this session.SessionProperties.Builder
mediaMode(MediaMode mediaMode)
Call this method to set how the media streams will be sent and received by your clients: routed through OpenVidu Media Node (MediaMode.ROUTED
) or attempting direct p2p connections (MediaMode.RELAYED
, not available yet)
Default value isMediaMode.ROUTED
SessionProperties.Builder
mediaNode(String mediaNodeId)
PRO Call this method to force the session to be hosted in the Media Node with identifiermediaNodeId
SessionProperties.Builder
recordingMode(RecordingMode recordingMode)
Call this method to set whether the Session will be automatically recorded (RecordingMode.ALWAYS
) or not (RecordingMode.MANUAL
)
Default value isRecordingMode.MANUAL
-
-
-
Method Detail
-
build
public SessionProperties build()
Returns theSessionProperties
object properly configured
-
mediaMode
public SessionProperties.Builder mediaMode(MediaMode mediaMode)
Call this method to set how the media streams will be sent and received by your clients: routed through OpenVidu Media Node (MediaMode.ROUTED
) or attempting direct p2p connections (MediaMode.RELAYED
, not available yet)
Default value isMediaMode.ROUTED
-
recordingMode
public SessionProperties.Builder recordingMode(RecordingMode recordingMode)
Call this method to set whether the Session will be automatically recorded (RecordingMode.ALWAYS
) or not (RecordingMode.MANUAL
)
Default value isRecordingMode.MANUAL
-
defaultRecordingProperties
public SessionProperties.Builder defaultRecordingProperties(RecordingProperties defaultRecordingProperties)
Call this method to set the default recording properties of this session. You can easily override this value later when starting aRecording
by providing newRecordingProperties
Default values defined inRecordingProperties
class.
-
customSessionId
public SessionProperties.Builder customSessionId(String customSessionId)
Call this method to fix the sessionId that will be assigned to the session. 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.
-
mediaNode
public SessionProperties.Builder mediaNode(String mediaNodeId)
PRO Call this method to force the session to be hosted in the Media Node with identifiermediaNodeId
-
forcedVideoCodec
public SessionProperties.Builder forcedVideoCodec(VideoCodec forcedVideoCodec)
Define which video codec will be forcibly used for this session. This forces all browsers/clients to use the same codec, which would avoid transcoding in the media server (Kurento only). IfforcedVideoCodec
is set to NONE, no codec will be forced. If the browser/client is not compatible with the specified codec, andallowTranscoding(Boolean)
isfalse
, an exception will occur. If defined here, this parameter has prevalence over OPENVIDU_STREAMS_FORCED_VIDEO_CODEC. Default isVideoCodec.MEDIA_SERVER_PREFERRED
.
-
forcedVideoCodecResolved
public SessionProperties.Builder forcedVideoCodecResolved(VideoCodec forcedVideoCodec)
Actual video codec that will be forcibly used for this session. This is the same asforcedVideoCodec
, except when its value isVideoCodec.MEDIA_SERVER_PREFERRED
: in that case, OpenVidu Server will fill this property with a resolved value, depending on what is the configured media server.
-
allowTranscoding
public SessionProperties.Builder allowTranscoding(Boolean allowTranscoding)
Call this method to define if you want to allow transcoding in the media server or not whenforcedVideoCodec(VideoCodec)
is not compatible with the browser/client.
If defined here, this parameter has prevalence over OPENVIDU_STREAMS_ALLOW_TRANSCODING. OPENVIDU_STREAMS_ALLOW_TRANSCODING default is 'false'
-
-