You can use the
LiveEventHostviewController class to build a view for users to host a live event. A
LiveEventHostViewController instance can be used to display the host's media stream, multiple options to configure the live event, and a chat where the host and participants can send messages.
Users included in
userIdsForHost can enter the live event one at a time to host. Once they have entered, they can start the live event as a host and stream video and audio during the live event.
Note: Before starting the live event, you can test your media stream and devices by yourself by using
liveEvent.startStreaming. Participants will be able to receive your media stream when you start the live event by calling the
The following table lists the features included in
LiveEventHostViewController class includes all the features of the
LiveEventViewController class and can access all of its methods and properties.
Enter a live event as a host
Allows a user who had been selected as one of the users who can be a host to enter a live event as a host.
Set up a live event
Allows the host to choose the audio and video settings for the live event.
Manage live event settings
Allows the host to turn off video and/or audio, hide the chat, and change the live event title and cover image.
Use the chat and moderate chat activity
Allows the host to send messages to the chat to talk to participants, and freeze the chat to prohibit inappropriate activity as needed.
Change live event status
Allows the host to update the live event status. A host can start the event, exit the live event without ending the event, and end the live event. A host may opt to view a summary of the live event metrics after ending the event.
LiveEventHostViewController, one of the users selected to be host must enter the live event as a host.
A user can click a live event on
LiveEventListViewController to enter as a host and
LiveEventHostViewController is automatically displayed. Entering as a host will prompt the user to select audio and video devices before entering the live event.
Alternatively, you can use the following code to manually display
You can customize properties in the
LiveEventHostViewController class for your own needs. The
LiveEventHostViewController class includes multiple user interfaces for managing the live event and displaying live event information.
The following table lists methods you can use to customize the view controller.
Determines whether to display the duration of a live event in the view. If set to
Determines whether to display the live event status in the view. If set to
Determines whether to display the number of participants in real time. If set to
Determines whether the host can exit the live event without ending the event. If set to
Determines whether to show a summary of the live event after the event has ended. If set to
The period of time to display the message that the live event has ended.
Called when a user clicks the exit button. By default, a host is given a choice to end or leave without ending the live event while a participant is prompted to leave the live event.
The following table lists the properties of
SBUStringSet you can customize to modify the live event's host view.
Live event setup
When you enter, the live event will be open to participants and they can also enter to chat only.
Try entering the live event again.
End live event?
End live event
Exit without ending
Peak concurrent participants
Change cover image
Change event title
Enter new title
Edit this event?
Live event ID
Live event information
Any one of the users in the list below can act as a host for the live event. If the current host leaves the event, another user can act as the host.
The following table lists icons in
SBUIconSet that you can customize to modify the live event's host view.
Switches between front and rear cameras.
Indicates that audio device is turned on.
Indicates that audio device is turned off.
Indicates that a video device is turned on.
Indicates that a video device is turned off.