Mesibo Video and Voice Calls

CallProperties Class Reference

MesiboCall.CallProperties defines various call properties and behavior, for example, video size, bitrate, hide on proximity, etc.

For information on the entrance class, MesiboCall see MesiboCall.

Creating an instance of CallProperties

Use the method MesiboCall.createCallProperties() to get an instance of CallProperties.

For example, in Android, to create call properties for a video call,

MesiboCall.CallProperties cp = MesiboCall.getInstance().createCallProperties(true);
  • Set audio properties for a call using CallProperties.audio which will contain an instance of AudioProperties
  • Set video properties for a call using CallProperties.video which will contain an instance of VideoProperties

Example, in Android,

cp.video.bitrate = 2000;
cp.audio.speaker = true; 

AudioProperties

CallProperties.AudioProperties class has the following properties:

  • enabled, Set to enable audio. Enabled by default in all calls.
  • bitrate, Maximum audio bitrate in Kbps(kilobits per second). Default audio bitrate is 32 Kbps
  • quality, Set to 0 for default audio quality.
  • codec , Specify Audio Codec. The default audio codec used is MESIBOCALL_CODEC_OPUS.
  • speaker, Set to enable audio via the speaker. Disabled by default.

VideoProperties

CallProperties.VideoProperties class has the following properties:

  • enabled, Set to enable video
  • width, Video Width value
  • height, Video height value
  • bitrate, Maximum video bitrate to be used in Kbps(kilobits per second). The default video bitrate is 1700 Kbps.
  • codec, Video Codec can be one of the following:
    • MESIBOCALL_CODEC_VP8
    • MESIBOCALL_CODEC_VP9
    • MESIBOCALL_CODEC_H264
    • MESIBOCALL_CODEC_H265
    • MESIBOCALL_CODEC_OPUS
      The default video codec used is MESIBOCALL_CODEC_VP8. You can set multiple codecs for mesibo to choose from, where mesibo determines the codec for the best performance for given device conditions. For example, MESIBOCALL_CODEC_VP8 | MESIBOCALL_CODEC_H265
  • camera The camera to be used while starting a video call. Can be one of the following:
    • MESIBOCALL_CAMERA_FRONT
    • MESIBOCALL_CAMERA_REAR
      The default camera is set to be MESIBOCALL_CAMERA_FRONT.
  • quality, Set to 0 for default video quality.
  • fps, Video fps(Frames Per Second)
  • screenCapture, Set to enable screen capture. Captures the live screen on the device instead of using the camera. It is disabled by default.
  • mirror, Set to enable mirror video. Generally, when you are using a front-facing camera, it is required to mirror the video when displaying it—enabled by default.
  • zoom, Specify zoom factor(float)
  • fitZoom, Set to enable zoom to fit, enabled by default.
  • hardwareAcceleration, Set to use hardware acceleration in a video call, enabled by default.
  • fileName, String containing the filename(with the full path) to save the video into a file or stream video from a file

Notification

You need to display a call notification mainly when there is an incoming call (a heads-up notification), and there is a missed call. Use the Notification class to create a notification bundle, which you can then use to display a notification.

CallProperties.Notification class has the following properties:

  • channelName, The notification channel name. You need to use the same channel name while creating the channel and firing the notification
  • title, Notification title
  • message, The notification message which contains the notification body.
  • answer, Text to be displayed on the Answer button
  • hangup, Text to be displayed on the Hangup button
  • vibrate, Set to true to vibrate on displaying the notification
  • sound, Set to true to play a notification sound, false for a silent notification
  • icon, Set notification icon
  • icon_answer, The Answer button icon
  • icon_hangup, The hangup button icon
  • color, Background color for the notification
  • ringtoneUri, (Android) A Uri object of a custom notification tone

UIProperties

If you are using the default User Interface, you can use following properties to customize it.

  • title, A string containing the title to be displayed in the call UI.
  • user, The MesiboProfile to be displayed in the call UI.
  • userImage, The profile image to be displayed of the caller/destination.
  • backgroundColor, The backgroun color (ARGB value). Default is mesibo color, 0xFF00868b
  • showScreenSharing, show screen sharing button (default, true)
  • layout_id, resource id of custom layout (for Android only)
  • autoHideControls, automatically hide controls in video calls on connect (default, true)
  • callStatusText, set this property value when MesiboCall_OnStatus listener function is called to override the default text

Properties

  • notify, Points to an instance of Notification. Set call notification properties here.
  • video, Points to an instance of VideoProperties. Set audio call properties here.
  • audio, Points to an instance of AudioProperties. Set video call properties here.
  • record, Points to an instance of VideoProperties. Set recording properties here.
  • ui, Points to an instance of UIProperties. Set default UI properties here.
  • autoAnswer, Set if you would like to enable auto-answer. It is disabled by default.
  • enableCameraAtStart, Set to automatically turn the camera on at the start of a call.
  • disableSpeakerOnProximity, Automatically turn off the speaker when the user is in close proximity to the device. For example, answers the call by placing the phone near the ear.
  • hideOnProximity, Set to automatically hide the call screen on proximity so that any call controls buttons are not pressed unintentionally. For example, it is useful to turn off the screen when the user answers a voice call by placing the phone near the ear, or the device is put in the pocket—enabled by default in case of an audio call.
  • parent, The parent activity/view controller which launches the call screen.
  • activity. Specify the activity that launches the call screen. Should be derived from MesiboCallActivity
  • runInBackground, Set to run calls in background. Enabled by default.
  • stopCameraInBackground, Set to automatically disable the camera when the app is in the background.
  • holdOnCellularIncoming, Hold the active call if the user accepts an incoming cellular call. It is enabled by default.
  • useConnectService, Use Android Connection Service to inform telecom manager about your application handling calls.
  • checkNetworkConnection, Check the network connection

Methods

  • isIncoming, Returns true if it is an incoming call.