OTPublisherKitDelegate

Used for sending messages for an OTPublisher instance. The OTPublisher class includes a delegate property. When you send the [OTPublisherKit initWithDelegate:] message or the [OTPublisherKit initWithDelegate:settings:] message, you specify an OTPublisherKitDelegate object.

Methods

Name Description
publisher:didFailWithError:(publisher, error) Sent if the publisher encounters an error.
muteForced:(publisher) Sent when a moderator has forced this publisher to mute audio.
publisher:streamCreated:(publisher, stream) Sent when the publisher starts streaming.
publisher:streamDestroyed:(publisher, stream) Sent when the publisher stops streaming.
publisherVideoDisabled:reason:(publisher, reason) This message is sent when the publisher stops sending video.
publisherVideoEnabled:reason:(publisher, reason) This message is sent when the publisher's video stream resumes (after video was disabled).
publisherVideoDisableWarning:(publisher) This message is sent when the publisher determines that the stream quality has degraded and the video will be disabled if the quality degrades further.
publisherVideoDisableWarningLifted:(publisher) This message is sent when the publisher determines that the network congestion level has improved to the point at which the video being disabled is not an immediate risk.

publisher:didFailWithError:(publisher, error)

Sent if the publisher encounters an error. Most errors are fatal: the publisher is automatically dropped, can be considered fully detached from the session, and may be released. Some errors are continuable and leave the publisher usable; when an error is non-fatal it is stated in the error description.

Parameters:
Name Type Description
publisher OTPublisherKit * The publisher that signalled this event.
error OTError * The error (an OTError object). The OTPublisherErrorCode enum (defined in the OTError class) defines values for the code property of this object.

muteForced:(publisher)

Sent when a moderator has forced this publisher to mute audio.

See [OTSession forceMuteAll:error:] and [OTSession forceMuteStream:error:].

Parameters:
Name Type Description
publisher OTPublisherKit * The publisher.

publisher:streamCreated:(publisher, stream)

Sent when the publisher starts streaming.

Parameters:
Name Type Description
publisher OTPublisherKit * The publisher of the stream.
stream OTStream * The stream that was created.

publisher:streamDestroyed:(publisher, stream)

Sent when the publisher stops streaming.

Parameters:
Name Type Description
publisher OTPublisherKit * The publisher that stopped sending this stream.
stream OTStream * The stream that ended.

publisherVideoDisabled:reason:(publisher, reason)

This message is sent when the publisher stops sending video. Check the reason parameter for the reason why the video stopped.

Parameters:
Name Type Description
publisher OTPublisherKit * The OTPublisher that will no longer send video.
reason OTPublisherVideoEventReason The reason that the video track was disabled. See OTPublisherVideoEventReason.

publisherVideoEnabled:reason:(publisher, reason)

This message is sent when the publisher's video stream resumes (after video was disabled). Check the reason parameter for the reason why the video resumed.

Parameters:
Name Type Description
publisher OTPublisherKit * The OTPublisher that will send video.
reason OTPublisherVideoEventReason The reason that the video track was enabled. See OTPublisherVideoEventReason.

publisherVideoDisableWarning:(publisher)

This message is sent when the publisher determines that the stream quality has degraded and the video will be disabled if the quality degrades further. If the quality degrades further, the publisher disables the video and the [OTPublisherKitDelegate publisherVideoDisabled:reason:] message is sent. If the network congestion level improves, the [OTPublisherKitDelegate publisherVideoDisableWarningLifted:] message is sent.

This message is mainly sent when connection quality degrades.

Parameters:
Name Type Description
publisher OTPublisherKit * The OTPublisher that may stop sending video soon.

publisherVideoDisableWarningLifted:(publisher)

This message is sent when the publisher determines that the network congestion level has improved to the point at which the video being disabled is not an immediate risk. This message is sent after the [OTPublisherKitDelegate publisherVideoDisableWarning:] message is sent.

This message is mainly sent when connection quality improves.

Parameters:
Name Type Description
publisher OTPublisherKit * The OTPublisher instance.