LiveEvent
public class LiveEvent : EventDelegate
A class that provides methods for a host and participants to stream and receive media during a live event.
Since
1.0.0-
The role of the user in a live event.
Since
1.0.0Declaration
Swift
public var myRole: LiveEvent.Role { get }
-
Undocumented
Declaration
Swift
public var isActiveHost: Bool { get }
-
The state of a live event. Valid values are created, ready, ongoing, and ended.
Since
1.0.0Declaration
Swift
public internal(set) var state: LiveEvent.State { get }
-
The number of participants in a live event which is counted by the number of devices and browsers concurrently connected to Sendbird server.
Since
1.0.0Declaration
Swift
public internal(set) var participantCount: Int { get }
-
The highest number of
participantCount
measured at a given time during a live event.Since
1.0.0Declaration
Swift
public internal(set) var peakParticipantCount: Int { get }
-
The sum of all participants that entered and exited a live event.
Since
1.0.0Declaration
Swift
public internal(set) var cumulativeParticipantCount: Int { get }
-
The timestamp of when the live event was created, in miliseconds.
Since
1.0.0Declaration
Swift
public internal(set) var createdAt: Int64 { get }
-
The timestamp of when the live event was created, in miliseconds.
Since
1.0.0Declaration
Swift
public internal(set) var setReadyAt: Int64? { get }
-
The timestamp of when the live event was started, in miliseconds.
Since
1.0.0Declaration
Swift
public internal(set) var startedAt: Int64? { get }
-
The timestamp of when the live event was ended, in miliseconds.
Since
1.0.0Declaration
Swift
public internal(set) var endedAt: Int64? { get }
-
User ID of the user that created the live event.
Since
1.0.0Declaration
Swift
public internal(set) var createdBy: String { get }
-
User ID of the user that set the live event ready.
Since
1.0.0Declaration
Swift
public internal(set) var setReadyBy: String? { get }
-
User ID of the user that started the live event.
- sicne: 1.0.0
Declaration
Swift
public internal(set) var startedBy: String? { get }
-
User ID of the user that ended the live event.
Since
1.0.0Declaration
Swift
public internal(set) var endedBy: String? { get }
-
Indicates whether the host is streaming media.
Since
1.0.0Declaration
Swift
public internal(set) var isHostStreaming: Bool { get }
-
The period from the time when the live event was started to the time the live event was ended.
Since
1.0.0Declaration
Swift
public var duration: Int64 { get }
-
Unique identifier for the live event.
Since
1.0.0Declaration
Swift
public let liveEventId: String
-
An open channel that is used for the live event.
Since
1.0.0Declaration
Swift
public private(set) var openChannel: OpenChannel? { get }
-
Host of the live event.
Since
1.0.0Declaration
Swift
public internal(set) var host: Host? { get }
-
Undocumented
Declaration
Swift
public internal(set) var userIdsForHost: [String] { get }
-
Undocumented
Declaration
Swift
public internal(set) var customItems: [String : String] { get }
-
Undocumented
Declaration
Swift
public internal(set) var title: String? { get }
-
Undocumented
Declaration
Swift
public internal(set) var coverURL: String? { get }
-
Undocumented
Declaration
Swift
public func addDelegate(_ delegate: LiveEventDelegate, forKey key: String)
-
Undocumented
Declaration
Swift
public func removeDelegate(forKey key: String)
-
Undocumented
Declaration
Swift
public func resetCamera()
-
Enters a live event as a host. Only the host can perform this action.
Since
1.0.0Declaration
Swift
public func enterAsHost(options: MediaOptions, completionHandler: ErrorHandler? = nil)
-
Exits a live event as a host.
Since
1.0.0Declaration
Swift
public func exitAsHost(completionHandler: ErrorHandler?)
-
Sets a live event ready before starting a live event. Only the host can perform this action.
Since
1.0.0Declaration
Swift
public func setEventReady(completionHandler: ErrorHandler? = nil)
-
Starts the live event. Only the host can perform this action. Calling this method implicitly calls
startStreaming()
.Since
1.0.0Declaration
Swift
public func startEvent(mediaOptions: MediaOptions?, completionHandler: ErrorHandler? = nil)
-
Ends a live event. Only the host can perform this action. Calling this method implicitly calls
endStreaming()
.Since
1.0.0Declaration
Swift
public func endEvent(completionHandler: ErrorHandler? = nil)
-
Starts media streaming of a host in the live event. Only the host can perform this action.
Since
1.0.0Declaration
Swift
public func startStreaming(mediaOptions: MediaOptions?, completionHandler: ErrorHandler? = nil)
-
Ends media streaming of a host in the live event. Only the host can perform this action.
Since
1.0.0Declaration
Swift
public func endStreaming(completionHandler: ErrorHandler?)
-
Starts streaming using an external video source instead of the default camera on a mobile device. When you call this function, you must call
EnqueueExternalVideoFrame()
as frequently as needed to stream the modified frames seamlessly.Declaration
Swift
public func startUsingExternalVideo(completionHandler: ErrorHandler?)
-
Stops streaming using an external video source and returns to the default camera on a mobile to stream. When you call this function, all calls to
EnqueueExternalVideoFrame()
will be ignored. You can set another camera to stream by specifying the device onselectVideoDevice()
.Declaration
Swift
public func stopUsingExternalVideo(completionHandler: ErrorHandler?)
-
Sends the modified video frames from the external video source to the queue. Set to call this method as frequently as needed to stream seamlessly.
Declaration
Swift
public func enqueueExternalVideoFrame(_ buffer: CMSampleBuffer)
-
Sends the modified video frames from the external video source to the queue. Set to call this method as frequently as needed to stream seamlessly.
Declaration
Swift
public func enqueueExternalVideoFrame(_ buffer: CVPixelBuffer, timestamp: CMTime)
-
Undocumented
Declaration
Swift
public func updateLiveEventInfo(params: UpdateParams, completionHandler: ErrorHandler?)
-
Sets a video view for a live event by showing video stream from the host.
Since
1.0.0Declaration
Swift
public func setVideoViewForLiveEvent(view: SendbirdVideoView, hostId: String)
-
Unmutes the audio of a live event. Only the host can perform this action.
Since
1.0.0Declaration
Swift
public func unmuteAudioInput(completionHandler: ErrorHandler? = nil)
-
Mutes the audio of a live event. Only the host can perform this action.
Since
1.0.0Declaration
Swift
public func muteAudioInput(completionHandler: ErrorHandler? = nil)
-
Turns on the video of a live event. Only the host can perform this action.
Since
1.0.0Declaration
Swift
public func startVideo(completionHandler: ErrorHandler? = nil)
-
Turns off the video of a live event. Only the host can perform this action.
Since
1.0.0Declaration
Swift
public func stopVideo(completionHandler: ErrorHandler? = nil)
-
Switches between the front and back cameras during a live event. Only the host can perform this action.
Since
1.0.0Declaration
Swift
public func switchCamera(completionHandler: ErrorHandler? = nil)
-
Selects a device for video output during a live event. Only the host can perform this action.
Since
1.0.0Declaration
Swift
public func selectVideoDevice(position: AVCaptureDevice.Position, completionHandler: ErrorHandler? = nil)
-
Undocumented
Declaration
Swift
public func fetchCustomItems(completionHandler: ((Result<[String : String], SBError>) -> Void)?)
-
Undocumented
Declaration
Swift
public func updateCustomItems( customItems: [String: String], completionHandler: ((Result<(customItems: [String: String], updatedKeys: [String]), SBError>) -> Void)? )
-
Undocumented
Declaration
Swift
public func deleteCustomItems( customItemKeys: [String], completionHandler: ((Result<(customItems: [String: String], deletedKeys: [String]), SBError>) -> Void)? )
-
Undocumented
Declaration
Swift
public func deleteAllCustomItems(completionHandler: ErrorHandler?)
-
Enters a live event.
Since
1.0.0Declaration
Swift
public func enter(completionHandler: ErrorHandler? = nil)
-
Exits a live event.
Since
1.0.0Declaration
Swift
public func exit(completionHandler: ErrorHandler? = nil)
-
A class that provides information for configuring a live event when it is created.
Since
1.0.0Declaration
Swift
public struct CreateParams
-
Undocumented
See moreDeclaration
Swift
public struct UpdateParams
-
An enum that provides information about roles that users can take in a live event.
Since
1.0.0Declaration
Swift
public enum Role
-
Declaration
Swift
public enum State : String, Codable