OTSubscriberKitDelegate Protocol Reference
Conforms to | NSObject |
Declared in | OTSubscriberKit.h |
Overview
Used to send messages for an OTSubscriber instance. When you send the [OTSubscriberKit initWithStream:delegate:] message, you specify an OTSubscriberKitDelegate object.
Instance Methods
subscriber:didFailWithError:
Sent if the subscriber fails to connect to its stream.
- (void)subscriber:(id)subscriber didFailWithError:(id)error
Parameters
- subscriber
The subscriber that generated this event.
- error
The error (an OTError object) that describes this connection error. The
OTSubscriberErrorCode
enum (defined in the OTError class) defines values for thecode
property of this object.
Declared In
OTSubscriberKit.h
subscriberDidConnectToStream:
Sent when the subscriber successfully connects to the stream.
- (void)subscriberDidConnectToStream:(id)subscriber
Parameters
- subscriber
The subscriber that generated this event.
Declared In
OTSubscriberKit.h
subscriberVideoDisableWarning:
This message is sent when the OpenTok Media Router determines that the stream quality has degraded and the video will be disabled if the quality degrades further. If the quality degrades further, the subscriber disables the video and the [OTSubscriberKitDelegate subscriberVideoDisabled:reason:] message is sent. If the stream quality improves, the [OTSubscriberKitDelegate subscriberVideoDisableWarningLifted:] message is sent.
- (void)subscriberVideoDisableWarning:(id)subscriber
Parameters
- subscriber
The OTSubscriber that may stop receiving video soon.
Discussion
This feature is only available in sessions that use the OpenTok Media Router (sessions with the media mode set to routed), not in sessions with the media mode set to relayed.
This message is mainly sent when connection quality degrades.
Declared In
OTSubscriberKit.h
subscriberVideoDisableWarningLifted:
This message is sent when the OpenTok Media Router determines that the stream quality has improved to the point at which the video being disabled is not an immediate risk. This message is sent after the [OTSubscriberKitDelegate subscriberVideoDisableWarning:] message is sent.
- (void)subscriberVideoDisableWarningLifted:(id)subscriber
Parameters
- subscriber
The OTSubscriber instance.
Discussion
This feature is only available in sessions that use the OpenTok Media Router (sessions with the media mode set to routed), not in sessions with the media mode set to relayed.
This message is mainly sent when connection quality improves.
Declared In
OTSubscriberKit.h
subscriberVideoDisabled:reason:
This message is sent when the subscriber stops receiving video. Check the reason parameter for the reason why the video stopped.
- (void)subscriberVideoDisabled:(id)subscriber reason:(id)reason
Parameters
- subscriber
The OTSubscriber that will no longer receive video.
- reason
The reason that the video track was disabled. See OTSubscriberVideoEventReason.
Declared In
OTSubscriberKit.h
subscriberVideoEnabled:reason:
This message is sent when the subscriber starts (or resumes) receiving video. Check the reason parameter for the reason why the video started (or resumed).
- (void)subscriberVideoEnabled:(id)subscriber reason:(id)reason
Parameters
- subscriber
The OTSubscriber that will no longer receive video.
- reason
The reason that the video track was enabled. See OTSubscriberVideoEventReason.
Declared In
OTSubscriberKit.h