Skip to main content
Version: 0.1.x

Custom Video Track - Android

  • You can create a Video Track using createCameraVideoTrack() method of VideoSDK.
  • This method can be used to create video track using different encoding parameters, camera facing mode, and optimization mode.

Parameters

  • encoderConfig:

    • type: String
    • required: true
    • default: h480p_w720p
    • You can chose from the below mentioned list of values for the encoder config.
Encoder ConfigResolutionFrame RateBitrate
h144p_w176p176x14415 fps120000 kbps
h240p_w320p320x24015 fps150000 kbps
h480p_w640p640x48025 fps300000 kbps
h480p_w720p720x48030 fps450000 kbps
h720p_w960p720x96030 fps1500000 kbps
h1080p_w1440p1080x144030 fps2500000 kbps
h720p_w1280p720x128030 fps2000000 kbps
note

Above mentioned encoder configurations are valid for both, landscape as well as portrait mode.

  • facingMode:

    • type: String
    • required: true
    • Allowed values : front | back
    • It will specify wheater to use front or back camera for the video track.
  • optimizationMode

    • type: CustomStreamTrack.VideoMode
    • required: true
    • Allowed values: motion | text | detail
    • It will specify the optimization mode for the video track being generated.
  • multiStream:

    • type: boolean
    • required: true
    • It will specify if the stream should send multiple resolution layers or single resolution layer.
  • context:

    • type: Context
    • required: true
    • Pass the Android Context for this parameter.
  • observer:

    • type: CapturerObserver
    • required: false
    • If you want to use video filter from external SDK(e.g., Banuba) then pass instance of CapturerObserver in this parameter.
  • videoDeviceInfo:

    • type: VideoDeviceInfo
    • required: false
    • If you want to specify a camera device to be used in the meeting.
note

For Banuba integraion with VideoSDK, please visit Banuba Intergation with VideoSDK

info
  • To learn more about optimizations and best practices for using custom video tracks, follow this guide.

Returns

  • CustomStreamTrack

Example

val videoCustomTrack: CustomStreamTrack = VideoSDK.createCameraVideoTrack("h720p_w960p", "front", CustomStreamTrack.VideoMode.MOTION, false, this)

Custom Audio Track - Android

  • You can create a Audio Track using createAudioTrack() method of VideoSDK.
  • This method can be used to create audio track using different encoding parameters.

Parameters

  • encoderConfig:

    • type: String
    • required: true
    • default: speech_standard
    • You can chose from the below mentioned list of values for the encoder config.
Encoder ConfigBitrateAuto GainEcho CancellationNoise Suppression
speech_low_quality16 kbpsTRUETRUETRUE
speech_standard24 kbpsTRUETRUETRUE
music_standard32 kbpsFALSEFALSEFALSE
standard_stereo64 kbpsFALSEFALSEFALSE
high_quality128 kbpsFALSEFALSEFALSE
high_quality_stereo192 kbpsFALSEFALSEFALSE
  • context

    • type: Context
    • required: true
    • Pass the Android Context for this parameter.

Returns

  • CustomStreamTrack

Example

val audioCustomTrack: CustomStreamTrack = VideoSDK.createAudioTrack("speech_standard",this)

Custom Screen Share Track - Android

  • You can create a Screen Share track using createScreenShareVideoTrack() method of VideoSDK.
  • This method can be used to create screen share track using different encoding parameters.

Parameters

  • encoderConfig:

    • type: String
    • required: true
    • default: h720p_15fps
    • You can chose from the below mentioned list of values for the encoder config.
Encoder ConfigResolutionFrame RateBitrate
h360p_30fps640x3603 fps200000 kbps
h720p_5fps1280x7205 fps400000 kbps
h720p_15fps1280x72015 fps1000000 kbps
h1080p_15fps1920x108015 fps1500000 kbps
h1080p_30fps1920x108015 fps1000000 kbps
note

Above mentioned encoder configurations are valid for both, landscape as well as portrait mode.

  • data

    • type: Intent
    • required: true
    • It is Intent received from onActivityResult when user provide permission for ScreenShare.
  • context

    • type: Context
    • required: true
    • Pass the Android Context for this parameter.
  • listener

    • type: CustomTrackListener
    • required: true
    • Callback to this listener will be made when track is ready with CustomTrack as parameter.

Example

// data is received from onActivityResult method.
VideoSDK.createScreenShareVideoTrack("h720p_15fps", data, this) { track ->
meeting!!.enableScreenShare(track)
}

Got a Question? Ask us on discord