Updated on 2025-07-28 GMT+08:00

Configuring the View

Precautions

  1. Call this API after calling the API for joining a meeting.
  2. Call this API only after you receive the event of the meeting joining result notification.

API Description

The web SDK provides the in-meeting UI. This API is used to configure whether to display some elements on the UI.

Figure 1 Meeting window display control

As shown in the preceding figure, the SDK allows you to control the display of the following elements:

1. Window title bar

2. Chat box

3. Participant list

4. Meeting control bar

5. On-screen comment component

  • Meeting link

By default, the domain name prefix of the meeting link (for example, https://intl.meeting.huaweicloud.com/#/j/982989574) is https://intl.meeting.huaweicloud.com/. If you have developed your own meeting portal, you need to customize the prefix.

Figure 2 Meeting details

As shown in the preceding figure, the basic meeting information is displayed when the title bar is clicked. You can customize the URLs corresponding to the two QR codes of the panelist joining information and attendee joining information.

Precautions

(1) Call this API only if you need to change the default style of the meeting screen.

(2) Call this API only after you receive the event of the meeting joining result notification.

Method Definition

1
setViewConfig (config):Promise<Result>

Related Event

Meeting View Change Notification

Parameter Description

Table 1 Parameter description

Parameter

Mandatory

Type

Description

config

Yes

JavaScript object {"key": value}

The value has a type requirement. If the value does not match the type, the configuration does not take effect. For details, see Table 2.

Table 2 Description of the config object

Parameter

Type

Description

titleVisible

boolean

Whether to display or hide the title bar. true: Display it. false: Hide it.

attendeeListVisible

boolean

Whether to display or hide the participant list. true: Display it. false: Hide it.

chatVisible

boolean

Whether to display or hide the chat box. true: Display it. false: Hide it.

bulletScreenVisible

boolean

Whether to display or hide the on-screen comment component. true: Display it. false: Hide it.

controlBarVisible

boolean

Whether to display or hide the meeting control bar. true: Display it. false: Hide it.

viewMode

string

Layout. The WeChat browser on mobile phones does not support this parameter. speaking: presenter view; gallery: gallery view; single: single-screen view.

NOTE:

Single-screen view: Only one video image is displayed. The video image is changed when a meeting operation is performed:

During the broadcast, the broadcast feed is displayed.

During screen sharing, the shared screen is displayed.

When you focus on a participant, the participant feed is displayed.

guestSharingUrl

string

Panelist link. The length cannot exceed 256 characters.

audienceSharingUrl

string

Attendee link. The length cannot exceed 256 characters.

leaveUrl

string

Redirection link for leaving a meeting. (The link must support X-Frame-Options.)

stopRecordTip

JsonString

Prompt of stopping recording.

The format is as follows:

[

{

"content": "When the recording ends, check recordings in ",

"type": "text"

},

{

"href": "https://XXX",

"target": "_black",

"content": "Meeting Management Platform > My Recordings",

"type": "href"

},

{

"content": ".",

"type": "text"

}

]

Values of type: text;

href: hyperlink.

target: The value is same as that defined in the anchor element.

content: prompt content.

inviteThirdUser

boolean

Whether to display or hide the button for inviting participants. This parameter is available only for users whose initial role is host or panelist. true: Display it. false: Hide it.

shareMeeting

boolean

Whether to display or hide the Share button. true: Display it. false: Hide it.

chatWindowColor

string

Color of the chat window. white or black (default).

shareMeetingTips

JsonString

Content in the meeting information window.

The format is as follows:

{

"qrCodeVisible": boolean, // Whether to display the QR code. true: Display it (default). false: Hide it.

"meetingCopyBtnVisible": boolean, // Whether to display the button for copying meeting information. true: Display it (default). false: Hide it.

"hostPasswordVisible": boolean, // Whether to display the host password. true: Display it (default). false: Hide it.

"guestPasswordVisible": boolean, // Whether to display the panelist password. true: Display it (default). false: Hide it.

"audiencePasswordVisible": boolean, // Whether to display the attendee password. true: Display it (default). false: Hide it.

}

When calling this API, pass only the value of keys to be changed. If the title bar needs to be hidden, only {"titleVisible": false} needs to be passed.

Return Values

For details about the result structure, see Table 1. For details about the error structure, see Table 3.

Sample Code
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
/**
* Configure the view.
*/
let params = {titleVisible:true}
HWMeeting.setViewConfig(params).then(() => 
    //  TODO: Configure the view.
    }).catch((e) => {
       // Display the result.
   console.log(e.retCode+":"+e.retMsg);
    }
);