Subscriber.Builder
Copy
public static class Builder extends SubscriberKit.Builder
Enclosing class: Subscriber
Used to build a Subscriber object. Instantiate a Builder object using the
Subscriber.Builder#Builder(Context context, Stream stream)
constructor. Then call methods of the Builder instance to add settings for the subscriber.
Then call the build() method, which returns a SubscriberKit object.
Use the Session#subscribe(SubscriberKit subscriber) method to start streaming video
for the subscriber.
Methods
| Name | Description |
|---|---|
Builder(context, stream) |
Instantiates a Subscriber.Builder object. |
build() → {Subscriber} |
Returns a new Subscriber instance based on the Builder settings. |
renderer(renderer) → {Subscriber.Builder} |
Sets the video renderer to use for the subscriber. |
Builder(context, stream)
Instantiates a Subscriber.Builder object.
Parameters:
| Name | Type | Description |
|---|---|---|
context |
Context | The android.content.Context for the SubscriberKit object. |
stream |
Stream | The Stream object corresponding to the stream you will subscribe to. |
build() → {Subscriber}
Returns a new Subscriber instance based on the Builder
settings.
Returns:
Subscriber
renderer(renderer) → {Subscriber.Builder}
Sets the video renderer to use for the subscriber. If you do not call this method, the subscriber will use the default Subscriber renderer.
Parameters:
| Name | Type | Description |
|---|---|---|
renderer |
BaseVideoRenderer |
Returns:
Subscriber.Builder