Participate in a live event
You can participate in a live event as a participant. When you enter a live event as a participant, you can receive the host's media stream and chat with other participants and the host.
A LiveEventParticipantViewController
instance includes a view displaying the host's media stream, UI components for providing the live event information, and a chat where participants can send messages during the live event.
List of features
The following table lists the features included in LiveEventParticipantViewController
. The LiveEventParticipantViewController
class includes all the features of the LiveEventViewController
class and can access all of its methods and properties.
Feature | Description |
---|---|
Enter a live event | Allows a user to enter a live event. |
Use the chat | Allows a user to send messages to the chat. |
Show a list of participants | Displays a list of participants watching the live event. |
Initialize
To launch LiveEventParticipantViewController
, a user must enter the live event by calling liveEvent.enterEvent
.
A user can click a live event on LiveEventListViewController
to enter the live event and automatically display LiveEventParticipantViewController
.
Alternatively, you can use the following code to manually display LiveEventParticipantViewController
.
Customization
UI Customization
The following table lists methods you can use to customize the view controller.
Method name | Description |
---|---|
showDuration | Determines whether to display the duration of a live event in the view. If set to |
showLiveEventStatus | Determines whether to display the live event status in the view. If set to |
showParticipantCount | Determines whether to display the number of participants in real time. If set to |
endedLiveEventViewDisplayTime | The period of time to display the message that the live event has ended. |
onEndLiveEventClicked | 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. |
String set
The following table lists the properties of SBUStringSet
you can customize to modify the live event's participant view.
Category | Key | String |
---|---|---|
LiveEvent | disconnectedAlertTitle | Disconnected temporarily |
LiveEvent | disconnectedAlertDescription | Try entering the live event again. |
ParticipantView | liveEventEndedDescription | Live event has ended. |
ParticipantView | liveEventLiveBannerHostMutedDescription | Host is muted. |
ParticipantView | liveEventLiveBannerHostUnavailableDescription | Host is temporarily unavailable. |
ParticipantView | liveEventReadyBannerDescription | Live event will begin soon. |
ParticipantView | participantListHeaderTitle | Participants |
Icon set
The following table lists icons in SBUIconSet
that you can customize to modify the live event's participant view.
Icon | Image | Description |
---|---|---|
ICON_CAMERA_SWITCH | Switches between front and rear cameras. | |
ICON_AUDIO_ON | Indicates that audio device is turned on. | |
ICON_AUDIO_OFF | Indicates that audio device is turned off. | |
ICON_VIDEO_ON | Indicates that a video device is turned on. | |
ICON_VIDEO_OFF | Indicates that a video device is turned off. |