Package com.opentok.android
Class Subscriber.Builder
- java.lang.Object
-
- com.opentok.android.SubscriberKit.Builder
-
- com.opentok.android.Subscriber.Builder
-
- Enclosing class:
- Subscriber
public static class Subscriber.Builder extends SubscriberKit.Builder
Used to build aSubscriber
object. Instantiate a Builder object using theSubscriber.Builder#Builder(Context context, Stream stream)
constructor. Then call methods of the Builder instance to add settings for the subscriber. Then call thebuild()
method, which returns aSubscriberKit
object.Use the
Session.subscribe(SubscriberKit subscriber)
method to start streaming video for the subscriber.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Subscriber
build()
Returns a newSubscriber
instance based on theBuilder
settings.Subscriber.Builder
renderer(BaseVideoRenderer renderer)
Sets the video renderer to use for the subscriber.
-
-
-
Constructor Detail
-
Builder
public Builder(android.content.Context context, Stream stream)
Instantiates aSubscriber.Builder
object.- Parameters:
context
- The android.content.Context for the SubscriberKit object.stream
- TheStream
object corresponding to the stream you will subscribe to.
-
-
Method Detail
-
renderer
public Subscriber.Builder renderer(BaseVideoRenderer renderer)
Sets the video renderer to use for the subscriber. If you do not call this method, the subscriber will use the default Subscriber renderer.- Overrides:
renderer
in classSubscriberKit.Builder
-
build
public Subscriber build()
Returns a newSubscriber
instance based on theBuilder
settings.- Overrides:
build
in classSubscriberKit.Builder
-
-