Package com.opentok.android
Class Subscriber
- java.lang.Object
-
- com.opentok.android.SubscriberKit
-
- com.opentok.android.Subscriber
-
- All Implemented Interfaces:
java.util.Observer
public class Subscriber extends SubscriberKit
Used to consume an audio-video stream in the OpenTok session. Subscribers are created by passing a validStream
instance into the Subscriber constructor. Subscribers can connect to receive media when you call theSession.subscribe(SubscriberKit subscriber)
method.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Subscriber.Builder
Used to build aSubscriber
object.-
Nested classes/interfaces inherited from class com.opentok.android.SubscriberKit
SubscriberKit.AudioLevelListener, SubscriberKit.AudioStatsListener, SubscriberKit.CaptionsListener, SubscriberKit.StreamListener, SubscriberKit.SubscriberAudioStats, SubscriberKit.SubscriberListener, SubscriberKit.SubscriberRtcStatsReportListener, SubscriberKit.SubscriberVideoStats, SubscriberKit.VideoListener, SubscriberKit.VideoStatsListener
-
-
Field Summary
-
Fields inherited from class com.opentok.android.SubscriberKit
audioLevelListener, audioStatsListener, captionsListener, NO_PREFERRED_FRAMERATE, NO_PREFERRED_RESOLUTION, renderer, rtcStatsReportListener, session, stream, streamListener, subscriberListener, VIDEO_REASON_CODEC_NOT_SUPPORTED, VIDEO_REASON_PUBLISH_VIDEO, VIDEO_REASON_QUALITY, VIDEO_REASON_SUBSCRIBE_TO_VIDEO, videoListener, videoStatsListener
-
-
Constructor Summary
Constructors Modifier Constructor Description Subscriber(android.content.Context context, Stream stream)
Deprecated.protected
Subscriber(android.content.Context context, Stream stream, BaseVideoRenderer renderer)
Creates a new Subscriber object for a given stream.
-
Method Summary
-
Methods inherited from class com.opentok.android.SubscriberKit
attachToSession, destroy, detachFromSession, finalize, getAudioVolume, getPreferredFrameRate, getPreferredResolution, getRenderer, getRtcStatsReport, getSession, getStream, getSubscribeToAudio, getSubscribeToCaptions, getSubscribeToVideo, getView, onAudioDisabled, onAudioEnabled, onAudioLevelUpdated, onCaptionText, onConnected, onDisconnected, onError, onPause, onResume, onRtcStatsReport, onStreamDisconnected, onStreamReconnected, onVideoDataReceived, onVideoDisabled, onVideoDisableWarning, onVideoDisableWarningLifted, onVideoEnabled, setAudioLevelListener, setAudioStatsListener, setAudioVolume, setCaptionsListener, setPreferredFrameRate, setPreferredResolution, setRenderer, setRtcStatsReportListener, setStreamListener, setStyle, setSubscriberListener, setSubscribeToAudio, setSubscribeToCaptions, setSubscribeToVideo, setVideoListener, setVideoStatsListener, update
-
-
-
-
Constructor Detail
-
Subscriber
protected Subscriber(android.content.Context context, Stream stream, BaseVideoRenderer renderer)
Creates a new Subscriber object for a given stream. If you extend theSubscriber
class, you can call this constructor from the child class.- Parameters:
context
- The android.content.Context for the Subscriber.stream
- The Stream object corresponding to the stream you will subscribe to.renderer
- The renderer for the subscriber.
-
Subscriber
@Deprecated public Subscriber(android.content.Context context, Stream stream)
Deprecated.Creates a new Subscriber for a given Stream. To begin subscribing to this Subscriber, pass it into theSession.subscribe(SubscriberKit subscriber)
method.- Parameters:
context
- The android.content.Context for the Subscriber.stream
- The Stream object corresponding to the stream you will subscribe to.
-
-