Class Subscriber

java.lang.Object
com.opentok.android.SubscriberKit
com.opentok.android.Subscriber
All Implemented Interfaces:
Observer

public class Subscriber extends SubscriberKit
Used to consume an audio-video stream in the OpenTok session. Subscribers are created by passing a valid Stream instance into the Subscriber constructor. Subscribers can connect to receive media when you call the Session.subscribe(SubscriberKit subscriber) method.
  • Constructor Details

    • Subscriber

      protected Subscriber(android.content.Context context, Stream stream, BaseVideoRenderer renderer)
      Creates a new Subscriber object for a given stream. If you extend the Subscriber 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 the Session.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.