Start Webinar as Host

A Zoom webinar is considered “started” when the host enters the webinar and clicks “Start Webinar”. This starts the broadcast to all participants who have joined. In the Web SDK, a webinar host is entered by joining the user as role: 1, for host.

Zoom webinars can be hosted through the Web SDK or any other client application.

Joining and starting a webinar as a host follows a similar process to joining as a participant; however, as the host the role will be set to 1.

To host a webinar through the Web SDK, the host user must be on the same account as your API Key. In other words, your Web SDK app will be able to host meetings for users on your account. If your Web SDK app attempts to join a participant as host but the user cannot be validated, they will join as an attendee.

Create a Webinar for the Host

To join and start a Webinar in the Web SDK, you will need the webinar ID and passcode.

For testing, create a webinar in your Zoom client or at https://zoom.us/webinar/schedule to retrieve a webinar ID and passcode. Advanced applications can also use the Webinar API to create and retrieve webinars. If you already have a webinar ID to join, proceed below.

The API Key and Secret used for your Web SDK app can also be used to authenticate the Zoom API. Following our guide to JWT Authorization, your web app can make requests to Create a Webinar or Get a Webinar. Pass the host user’s user ID or email in the path of these requests to create or read their webinars.

Create meetConfig Object

To receive user input and meeting settings, create a client-side meetConfig object to pass data to a server-side generateSignature function and the meeting join methods.

In the same way as joining a meeting as a participant, create a meetConfig object to pass to a server-side generateSignature function. When starting a webinar as a host, include the host’s email and join the user as role: 1:

Example meetConfig object:

const meetConfig = {
	apiKey: '3239845720934223459'
	meetingNumber: '123456789',
	leaveUrl: 'https://yoursite.com/meetingEnd',
	userName: 'Firstname Lastname',
userEmail: host.email@yoursite.com,
	passWord: 'password',
	role: 1 // 1 for host
};

Launch & Join Webinars as Host

Pass your meetConfig object to a getSignature function. Make a request to your signature endpoint, then pass that response to call the init method.

In the ZoomMtg.init() method, set any webinar settings (ex: leaveUrl, isSupportAV).

Call the ZoomMtg.join() method as a success param of ZoomMtg.init(). The join() method will handle your signature (as a text string).

index.js
import { ZoomMtg } from '@zoomus/websdk'

// prepare required files
ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();

getSignature(meetConfig) {
	// make a request for a signature
	fetch(`${YOUR_SIGNATURE_ENDPOINT}`, {
			method: 'POST',
			body: JSON.stringify({ meetingData: meetConfig })
		})
		.then(result => result.text())
		.then(response => {
			// call the init method with meeting settings
			ZoomMtg.init({
				leaveUrl: meetConfig.leaveUrl,
				isSupportAV: true,
				// on success, call the join method
				success: function() {	
					ZoomMtg.join({
						// pass your signature response in the join method
						signature: response,
						apiKey: meetConfig.apiKey,
						meetingNumber: meetConfig.meetingNumber,
						userName: meetConfig.userName,,
						userEmail: meetConfig.userEmail,
						passWord: meetConfig.passWord 
						error(res) { 
							console.log(res) 
						}
					})		
				}
			})
	}
}

Set this function to launch within your application, for example, on a “Start Webinar” button.

Host Controls

Once joined into a webinar, a host has a number of controls for the webinar experience:

Ask Questions: Hosts can enable Q&A within the WebSDK for attendees to ask questions, upvote or make comments during the webinar.

Allow attendees to speak: Host can enable the allow to talk feature for attendees to talk to ask questions during the webinar.

Promote to a Panelist: Panelist can now join webinars. In addition, the webinar host can promote attendees to panelist and set the panelist as an attendee.

Add a Co-host: Meeting host can add attendees as a co-host to help manage meetings.

Chat with everyone: Attendees, panelists and hosts can all chat with each other or send private messages to one another.

Multiple Screen Shares: Host can enable multiple participants to share their screen simultaneously. Support Article

Next steps