-
- All Implemented Interfaces:
-
io.livekit.android.room.participant.TrackPublishOptions
public final class VideoTrackPublishOptions extends BaseVideoTrackPublishOptions implements TrackPublishOptions
-
-
Field Summary
Fields Modifier and Type Field Description private final Stringnameprivate final VideoEncodingvideoEncodingprivate final Booleansimulcastprivate final StringvideoCodecprivate final StringscalabilityModeprivate final BackupVideoCodecbackupCodecprivate final Track.Sourcesourceprivate final Stringstreamprivate final RtpParameters.DegradationPreferencedegradationPreferenceprivate final List<VideoPreset>simulcastLayers
-
Constructor Summary
Constructors Constructor Description VideoTrackPublishOptions(String name, BaseVideoTrackPublishOptions base, Track.Source source, String stream)VideoTrackPublishOptions(String name, VideoEncoding videoEncoding, Boolean simulcast, String videoCodec, String scalabilityMode, BackupVideoCodec backupCodec, Track.Source source, String stream, RtpParameters.DegradationPreference degradationPreference, List<VideoPreset> simulcastLayers)
-
Method Summary
Modifier and Type Method Description StringgetName()The name of the track. VideoEncodinggetVideoEncoding()BooleangetSimulcast()StringgetVideoCodec()The video codec to use if available. StringgetScalabilityMode()scalability mode for svc codecs, defaults to 'L3T3'. BackupVideoCodecgetBackupCodec()Multi-codec SimulcastCodecs such as VP9 and AV1 are not supported by all clients. Track.SourcegetSource()The source of a track, camera, microphone or screen. StringgetStream()The stream name for the track. RtpParameters.DegradationPreferencegetDegradationPreference()When bandwidth is constrained, this preference indicates which is preferred between degrading resolution vs. List<VideoPreset>getSimulcastLayers()Up to two additional simulcast layers to publish in addition to the original Track. final VideoTrackPublishOptionscreateBackupOptions()-
-
Constructor Detail
-
VideoTrackPublishOptions
VideoTrackPublishOptions(String name, BaseVideoTrackPublishOptions base, Track.Source source, String stream)
-
VideoTrackPublishOptions
VideoTrackPublishOptions(String name, VideoEncoding videoEncoding, Boolean simulcast, String videoCodec, String scalabilityMode, BackupVideoCodec backupCodec, Track.Source source, String stream, RtpParameters.DegradationPreference degradationPreference, List<VideoPreset> simulcastLayers)
-
-
Method Detail
-
getVideoEncoding
VideoEncoding getVideoEncoding()
-
getSimulcast
Boolean getSimulcast()
-
getVideoCodec
String getVideoCodec()
The video codec to use if available.
Defaults to VP8.
-
getScalabilityMode
String getScalabilityMode()
scalability mode for svc codecs, defaults to 'L3T3'. for svc codecs, simulcast is disabled.
-
getBackupCodec
BackupVideoCodec getBackupCodec()
Multi-codec Simulcast
Codecs such as VP9 and AV1 are not supported by all clients. When backupCodec is set, when an incompatible client attempts to subscribe to the track, LiveKit will automatically publish a secondary track encoded with the backup codec.
-
getSource
Track.Source getSource()
The source of a track, camera, microphone or screen.
-
getStream
String getStream()
The stream name for the track. Audio and video tracks with the same stream name will be placed in the same
MediaStreamand offer better synchronization.By default, camera and microphone will be placed in the same stream.
-
getDegradationPreference
RtpParameters.DegradationPreference getDegradationPreference()
When bandwidth is constrained, this preference indicates which is preferred between degrading resolution vs. framerate.
null value indicates default value (maintain framerate).
-
getSimulcastLayers
List<VideoPreset> getSimulcastLayers()
Up to two additional simulcast layers to publish in addition to the original Track. Layers should be ordered from smallest to largest. Layers beyond the first two will be ignored. Any layers that have larger resolutions than the source resolution will also be ignored.
When set to null, it defaults to H180 and H360.
-
createBackupOptions
final VideoTrackPublishOptions createBackupOptions()
-
-
-
-