# void setUIConfig (Object config)

Set up the plug-in call interface,Make sure you set it before the call starts

# parameter

# Object req

attribute type Default value Required Introductions Minimum version
btnText string no Answer the page button copy, with the use ofsetCustomBtnText Agreement
callerUI UIConfig no caller call UI Set up
listenerUI UIConfig no listener call UI Set up
handsFree boolean true no Whether to turn on hands-free (true For the loudspeaker output, false Output for the handset).
Effective only on the device side
plug-in 2.3.0,WMPF >= 2.0
isSelfWindowMax boolean false no Control whether the main window displays this side by default when making a video call. (true This end, false For the end) 2.3.4
customBoxHeight string '90vh' no Answer page custom button click after the layer height. Support only 70vh or 90vh. 2.3.10

**UIConfig **

attribute type Default value Required Introductions Minimum version
cameraRotation number 0 no Angle of swing, rms 0, 90, 180, 270
aspectRatio number 4/3 no Video picture aspect ratio, use method see example
horMirror boolean false no Video Picture Horizontal Mirror
vertMirror boolean false no Video Image Vertical Image
enableToggleCamera boolean true no Video calls support switching cameras. false The switch camera button is not displayed.
Valid only in WeChat。WMPF The camera is turned on by default, and the switch button is not displayed.
objectFit string 'fill' no The expression of the video image when the proportion of the container is not consistent. Support fill/Contain, see example for use 2.3.8

aspectRatio and objectFit An example of the settings for

# Return value

nothing

# sample code

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

wmpfVoip.setUIConfig ({
  btnText: "Open the door."
  callerUI: {
    aspectRatio: 16 / 9,
  },
  handsFree: false,
})