# void setUIConfig(Object config)

Set up the plug-in call interface, Make sure that is set before the call starts.

# parameter

# Object req

attribute type Default values Required to fill in Introductions Minimum version
btnText string no Answer page button copy, consistent with using setCustomBtnText
callerUI UIConfig no Caller Call UI Settings
listenerUI UIConfig no Listener Call UI Settings
handsFree boolean true no Whether to turn on hands-free (true for speaker output, false for handset output).

Effective only on the device side
Plugin 2.3.0, WMPF > = 2.0
isSelfWindowMax boolean false no When a video call is made, control whether the main window displays this end by default. (True to the end, false to the end) 2.3.4
customBoxHeight string '90vh' no Accept page customize the bounce height after the button is clicked. Only 70vh or 90vh is supported. 2.3.10

UIConfig

attribute type Default values Required to fill in Introductions Minimum version
cameraRotation number 0 no Angle of swing, RMS = 0,90,180,270
aspectRatio number 4/3 no Video frame ratio. See examples for how to use this
horMirror boolean false no Video footage horizontal mirror
vertMirror boolean false no Vertical mirroring of video footage
enableToggleCamera boolean true no Does video calling support switching cameras? The toggle camera button is not displayed when false.

Only in WeChat .WMPF defaults to turn on the camera, and does not display the switch button.
objectFit string 'fill' no The representation of a video frame when the ratio of the container is inconsistent. Support fill / contain, see example 2.3.8

Examples of aspectRatio and objectFit settings:

# Return value

nothing

# sample code

const wmpfVoip = requirePlugin('wmpf-voip').default

wmpfVoip.setUIConfig({
  btnText: '去开门',
  callerUI: {
    aspectRatio: 16 / 9,
  },
  handsFree: false,
})