IVSStageRenderer
Objective-C
@protocol IVSStageRenderer <NSObject>
Swift
protocol IVSStageRenderer : NSObjectProtocol
A protocol to implement that can be used to build user interfaces.
Implementing a IVSStageRenderer
provides all the necessary information about a Stage to create a complete UI.
-
The connection state of the associated
IVSStage
has changed.Declaration
Objective-C
- (void)stage:(nonnull IVSStage *)stage didChangeConnectionState:(IVSStageConnectionState)connectionState withError:(nullable NSError *)error;
Swift
func stage(_ stage: IVSStage, didChangeConnectionState connectionState: Any!, withError error: Error?)
Parameters
stage
The
IVSStage
that had the connection state change.connectionState
The new connection state of the Stage.
error
An error, if the state unexpected turned to disconnected.
-
A new participant has joined the Stage and started publishing.
Declaration
Objective-C
- (void)stage:(nonnull IVSStage *)stage participantDidJoin:(nonnull IVSParticipantInfo *)participant;
Swift
func stage(_ stage: IVSStage, participantDidJoin participant: IVSParticipantInfo)
Parameters
stage
The
IVSStage
that the participant joined and started publishing.participant
A description of the participant that joined and started publishing.
-
A participant has left the Stage or stopped publishing.
Declaration
Objective-C
- (void)stage:(nonnull IVSStage *)stage participantDidLeave:(nonnull IVSParticipantInfo *)participant;
Swift
func stage(_ stage: IVSStage, participantDidLeave participant: IVSParticipantInfo)
Parameters
stage
The
IVSStage
that the participant left or stopped publishing.participant
A description of the participant that left or stopped publishing.
-
The publish state of a participant has changed.
Declaration
Objective-C
- (void)stage:(nonnull IVSStage *)stage participant:(nonnull IVSParticipantInfo *)participant didChangePublishState:(IVSParticipantPublishState)publishState;
Swift
func stage(_ stage: IVSStage, participant: IVSParticipantInfo, didChange publishState: IVSParticipantPublishState)
Parameters
stage
The
IVSStage
associated with the participant that changed their publish state.participant
The participant that changed their publish state.
publishState
The new publish state.
-
The subscribe state of a participant has changed.
Declaration
Objective-C
- (void)stage:(nonnull IVSStage *)stage participant:(nonnull IVSParticipantInfo *)participant didChangeSubscribeState:(IVSParticipantSubscribeState)subscribeState;
Swift
func stage(_ stage: IVSStage, participant: IVSParticipantInfo, didChange subscribeState: IVSParticipantSubscribeState)
Parameters
stage
The
IVSStage
associated with the participant that changed their subscribe state.participant
The participant that changed their publish state.
subscribeState
The new subscribe state.
-
A participant added media streams that can be rendered locally or attached to an
IVSBroadcastSession
.Declaration
Objective-C
- (void)stage:(nonnull IVSStage *)stage participant:(nonnull IVSParticipantInfo *)participant didAddStreams:(nonnull NSArray<IVSStageStream *> *)streams;
Swift
func stage(_ stage: IVSStage, participant: IVSParticipantInfo, didAdd streams: [IVSStageStream])
Parameters
stage
The
IVSStage
associated with the new media streams.participant
The participant associated with the new media streams.
streams
The new media streams.
-
A participant removed media streams. They could have unpublished or stopped sharing a certain media type.
Declaration
Objective-C
- (void)stage:(nonnull IVSStage *)stage participant:(nonnull IVSParticipantInfo *)participant didRemoveStreams:(nonnull NSArray<IVSStageStream *> *)streams;
Swift
func stage(_ stage: IVSStage, participant: IVSParticipantInfo, didRemove streams: [IVSStageStream])
Parameters
stage
The
IVSStage
associated with the removed media streams.participant
The participant associated with the removed media streams.
streams
The removed media streams.
-
Some media streams have had their muted status changed.
Declaration
Objective-C
- (void)stage:(nonnull IVSStage *)stage participant:(nonnull IVSParticipantInfo *)participant didChangeMutedStreams:(nonnull NSArray<IVSStageStream *> *)streams;
Swift
func stage(_ stage: IVSStage, participant: IVSParticipantInfo, didChangeMutedStreams streams: [IVSStageStream])
Parameters
stage
The
IVSStage
associated with the updated media streams.participant
The participant associated with the updated media streams.
streams
The media streams that have had their mute status changed.