Skip to content

Advanced Usage

Ashiqur Rahman edited this page Sep 16, 2020 · 4 revisions

Simply starting the activity using the intent returned from

VidChat.getCallingIntent(requireActivity(),roomID)

gives you a pretty basic and functional video call application.

But, there are some other interesting options that you can play around to tweak your video call.

Here's a list of options (in kotlin):

Live HUD and Stats

VidChatConfig.displayHUD = true
VidChatConfig.rtcEventLogEnabled = true
VidChatConfig.tracingEnabled = true
VidChatConfig.isDebug = true // for console logging

Video Resolution

// set any one of the following before calling video call intent
VidChatConfig.videoResolution = VideoResolution._4K
VidChatConfig.videoResolution = VideoResolution.FHD
VidChatConfig.videoResolution = VideoResolution.HD
VidChatConfig.videoResolution = VideoResolution.QVGA
VidChatConfig.videoResolution = VideoResolution.VGA

Camera FPS

VidChatConfig.cameraFPS = FPSValues._15
VidChatConfig.cameraFPS = FPSValues._30

Video Codec

VidChatConfig.videoCodec = VideoCodec.VP8
VidChatConfig.videoCodec = VideoCodec.VP9
VidChatConfig.videoCodec = VideoCodec.H264_BASELINE
VidChatConfig.videoCodec = VideoCodec.H264_HIGH

Audio Codec

VidChatConfig.audioCodec = AudeoCodec.OPUS
VidChatConfig.audioCodec = AudeoCodec.ISAC

Note: All code demos are written in kotlin. But, if you are using java you just need set the parameters like so:

VidChatConfig.INSTANCE.setAudioCodec(AudeoCodec.OPUS);