OpenTok Android SDK reference
The OpenTok Android SDK includes the following classes:
| Class | Description |
|---|---|
| AudioData | Defines audio data passed into the PublisherKit.CustomAudioTransformer.transform() method. |
| AudioDeviceManager | Use the AudioDeviceManager to set a custom audio device to be used by the app. The audio device manages access to the audio capturing and rendering hardware. You can only define a single audio capture source and rendering target for the app. You cannot set these individually for each publisher and s |
| BaseAudioDevice | Defines an audio device for use in a session. See AudioDeviceManager#setAudioDevice(BaseAudioDevice device). |
| BaseAudioDevice.AudioBus | The audio bus marshals audio data between the network and the audio device. Call the BaseAudioDevice#getAudioBus() method to get the AudioBus object for the audio device. The audio device pushes captured audio samples to and fetches unrendered audio samples from the audio bus. |
| BaseAudioDevice.AudioFocusManager | Used to delegate audio focus control to your app. This object is returned by calling AudioDeviceManager#getAudioFocusManager(). |
| BaseAudioDevice.AudioSettings | Defines the format of the audio when a custom audio driver is used. |
| BaseAudioDevice.BluetoothState | Defines values for the getBluetoothState() method. |
| BaseAudioDevice.OutputMode | Defines values for the setOutputMode(OutputMode mode) method. |
| BaseVideoCapturer | Defines a video capturer to be used by a PublisherKit object. |
| BaseVideoCapturer.CaptureSettings | Defines the capture settings for a video capturer. |
| BaseVideoCapturer.CaptureSwitch | An interface for defining how the BaseVideoCapturer.CaptureSwitch#cycleCamera() method of a Publisher object that implements a custom video capturer. If you are using a custom video capturer, implement the CaptureSwitch interface in the object that extends BaseVideoCapturer. Then implement the cycle |
| BaseVideoCapturer.VideoContentHint | Defines the content hint settings for a video capturer. You can read more about these options in the W3C Working Draft. |
| BaseVideoRenderer | Defines a video renderer to be used by a PublisherKit object or a SubscriberKit object. |
| BaseVideoRenderer.Frame | Defines a frame of a video stream. Call the getBuffer method to get the frame data. The data is in I420 format. |
| CaCertificates | public class CaCertificates |
| Connection | Represents a connection between a client and an OpenTok session. The Session#getConnection method returns a Connection object that represents the local user's connection. The Stream#getConnection method returns a Connection object that represents the stream publisher's connection. To initialize a se |
| MediaUtils | Includes a static getSupportedCodecs(Context context) method to discover which video codecs are supported on the device. |
| MediaUtils.SupportedCodecs | An object providing lists of video codecs for encoding and decoding video that are supported on the device. |
| MediaUtils.VideoCodecType | An enum of video codec types. |
| MuteForcedInfo | Defines the info parameter of the Session#onMuteForced(MuteForcedInfo info) and Session.MuteListener#onMuteForced(MuteForcedInfo info) methods. |
| NetworkDegradationSource | public final class NetworkDegradationSource Nested types: NetworkDegradationSource.Source |
| NetworkDegradationSource.Source | Network degradation source constants |
| OpentokError | Defines errors thrown by the OpenTok Android SDK. Check the values returned by getErrorCode() and getMessage() for details on the error. |
| OpentokError.Domain | Defines error domains values for OpentokError objects. |
| OpentokError.ErrorCode | Defines error code values for OpentokError objects. |
| PermissionsUtils | public class PermissionsUtils |
| Publisher | Used to capture an audio-video stream from the device's microphone and camera for use in an OpenTok session. Create a Publisher instance by calling the Publisher constructor. When the view of a Publisher leaves the active window, the Publisher object is destroyed. This is the case for an activity th |
| Publisher.Builder | Used to build a Publisher object. Instantiate a Builder object using the Publisher.Builder(Context context) constructor. Then call methods of the Builder instance to add settings for the publisher. (Note that the Publisher.Builder class inherits methods from the PublisherKit.Builder class.) Then cal |
| Publisher.CameraCaptureFrameRate | Defines values for the frameRate parameter of the Publisher.Builder#frameRate(Publisher.CameraCaptureFrameRate frameRate) method. Note that in sessions that use the OpenTok Media Router (sessions with the media mode set to routed), lowering the frame rate proportionally reduces the bandwidth the str |
| Publisher.CameraCaptureResolution | Defines values for the resolution parameter of the Publisher.Builder#resolution(Publisher.CameraCaptureResolution resolution) method. |
| Publisher.CameraListener | Monitors when the camera used by the publisher changes. |
| PublisherKit | A publisher captures an audio-video stream from the sources you specify. You can then publish the audio-video stream to an OpenTok session by calling the Session#publish(PublisherKit publisher) method. Create a subclass of PublisherKit if you are interested in providing your own video capturing and |
| PublisherKit.AudioLevelListener | Monitors changes in the audio level of the publisher. |
| PublisherKit.AudioStatsListener | Defines the listener object for getting publisher audio statistics. |
| PublisherKit.AudioTransformer | A transformer for an audio stream. |
| PublisherKit.Builder | Used to build a PublisherKit object. Instantiate a Builder object using the PublisherKit.Builder(Context context) constructor. Then call methods of the Builder instance to add settings for the publisher. Then call the build() method, which returns a PublisherKit object. Use the Session#publish(Publi |
| PublisherKit.CustomAudioTransformer | Defines a custom transformer for an audio stream, to be passed into the AudioTransformer constructor. |
| PublisherKit.CustomVideoTransformer | Defines a custom transformer for a video stream, to be passed into the VideoTransformer constructor. |
| PublisherKit.DegradationPreference | Describes the policy that the video engine will try to follow when adapting frame rate and resolution to limited bandwidth and CPU. This is a best effort policy. There are no guarantees on the frame rate and some frames can still be skipped for other reasons. For details, see Degradation Preference. |
| PublisherKit.MediaLinkStatsListener | Defines the listener object for getting publisher media link statistics. |
| PublisherKit.MuteListener | Monitors when a moderator has forced this publisher to mute audio. |
| PublisherKit.PreferredVideoCodecs | Defines codec preferences for video publishing. This class allows you to specify whether the SDK should automatically select the best codec or use an explicit ordered list of preferred codecs. If not specified, the priority video codec will be determined by the project settings. |
| PublisherKit.PreferredVideoCodecs.Codec | Supported video codecs. |
| PublisherKit.PublisherAudioStats | Defines audio statistics for a publisher. |
| PublisherKit.PublisherKitVideoType | Defines values for the setPublisherVideoType(PublisherKitVideoType type) method. |
| PublisherKit.PublisherListener | Monitors when a publisher starts and stops streaming to the session. |
| PublisherKit.PublisherMediaLinkStats | Provides publisher media link statistics including local transport metrics. Since video and audio share the same underlying transport, this class consolidates the local transport statistics into a single object. |
| PublisherKit.PublisherRtcStats | Represents RTC statistics for a media stream published by the publisher. |
| PublisherKit.PublisherRtcStatsReportListener | Defines the listener object for getting publisher RTC stats reports. |
| PublisherKit.PublisherVideoStats | Defines video statistics for a publisher. |
| PublisherKit.VideoBitratePreset | Defines values for the setVideoBitratePreset(VideoBitratePreset preset) method. These presets apply predefined strategies to control video bitrate in the publisher's stream. Preset configurations and manual bitrate settings are mutually exclusive. |
| PublisherKit.VideoLayerStats | Represents the statistics for a single published video layer. In a simulcast configuration, each entry corresponds to one independent video encoding (for example, low-, medium-, and high-resolution streams sent in parallel). For SVC (Scalable Video Coding), the publisher typically sends a single vid |
| PublisherKit.VideoListener | Monitors when the publisher starts and stops receiving video data. |
| PublisherKit.VideoStatsListener | Defines the listener object for getting publisher video statistics. |
| PublisherKit.VideoTransformer | A transformer for a video stream. |
| Session | Represents an OpenTok session in which the client is participating. The first step in using the OpenTok Android SDK is to initialize a Session instance by calling the Session() constructor. When you create the Session instance, you pass in the OpenTok session ID, token, and API key. You get an API k |
| Session.ArchiveListener | Monitors when an archive recording of the session starts and stops. |
| Session.Builder | public static class Builder Enclosing class: Session Nested types: Session.Builder.IncludeServers, Session.Builder.TransportPolicy, Session.Builder.IceServer |
| Session.Builder.IceServer | Defines a custom TURN server used in the setCustomIceServers(List, IncludeServers) method. |
| Session.Builder.IncludeServers | Defines settings for whether to use only your custom TURN servers or to use those servers in addition to Vonage Video API TURN servers. Used in the setCustomIceServers(List, IncludeServers) method. |
| Session.Builder.TransportPolicy | Defines settings for whether to use all ICE transport types (such as host, srflx, and TURN) to establish media connectivity or to only use TURN. Used in the setIceRouting(TransportPolicy) method. |
| Session.Capabilities | Defines the value returned by the Session#getCapabilities() method. After you have connected to a session and the Session.SessionListener#onConnected(Session session) method has been called, this property identifies whether the client can publish streams, subscribe to streams, and use the methods to |
| Session.ConfigurableSessionOptions | protected static class ConfigurableSessionOptions extends Session.SessionOptions Enclosing class: Session |
| Session.ConnectionListener | Monitors when other clients connect and disconnect to the session. |
| Session.MuteListener | Monitors when a moderator mutes streams in the session or disables the mute state in the session. |
| Session.ReconnectionListener | Monitors when an a client tries to automatically reconnect after losing its connection to an OpenTok session. |
| Session.SessionListener | Monitors state changes in a Session object. |
| Session.SessionOptions | A base class for defining advanced session options with the Session.Builder#sessionOptions(Session.SessionOptions sessionOptions) method. |
| Session.SessionOptionsProvider | This interface is now deprecated. Please use the SessionOptions class along with the Session.Builder#sessionOptions(Session.SessionOptions sessionOptions) method to configure the session. |
| Session.SignalListener | Monitors when a signal is sent in the session. |
| Session.StreamCaptionsPropertiesListener | Monitors when caption properties of streams in the session change. |
| Session.StreamPropertiesListener | Monitors when properties of streams in the session change. These include properties indicating whether the stream has audio, whether it has video video, and its video dimensions. |
| Stream | Represents an audio-video stream in an OpenTok session. The Session.SessionListener#onStreamReceived(Session session, Stream stream) method notifies you of new streams in the session: public void receivedStream(Session session, Stream stream) { Subscriber subscriber = new Subscriber(context, stream) |
| Stream.StreamVideoType | Defines values for the getStreamVideoType() method. |
| Subscriber | 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. |
| Subscriber.Builder | 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 |
| SubscriberKit | A SubscriberKit (subscriber) object renders media data bound to a Stream The SubscriberKit class lets you set a custom video renderer for the video stream. Create a subclass of SubscriberKit if you are interested in providing your own video processing and rendering implementation. Otherwise, use the |
| SubscriberKit.AudioLevelListener | Monitors changes in the audio level of the subscriber. |
| SubscriberKit.AudioStatsListener | Defines the listener object for getting subscriber audio statistics. |
| SubscriberKit.Builder | Used to build a SubscriberKit object. Instantiate a Builder object using the 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#subscrib |
| SubscriberKit.CaptionsListener | A listener for updated caption text. |
| SubscriberKit.MediaLinkStatsListener | Defines the listener object for getting subscriber media link statistics, including transport-level metrics and network condition changes. |
| SubscriberKit.SenderStats | Represents video statistics reported by the sender side, such as bitrate estimates. |
| SubscriberKit.StreamListener | Monitors when the subscriber's stream is interrupted and resumes. |
| SubscriberKit.SubscriberAudioStats | Defines audio statistics for a subscriber. |
| SubscriberKit.SubscriberListener | Monitors state changes of a SubscriberKit instance. |
| SubscriberKit.SubscriberMediaLinkStats | Provides subscriber media link statistics including local and remote transport metrics and network degradation information. |
| SubscriberKit.SubscriberRtcStatsReportListener | Defines the listener object for getting subscriber RTC stats reports. |
| SubscriberKit.SubscriberVideoStats | Defines video statistics for a subscriber. |
| SubscriberKit.SubscriberVideoStats.SenderQualityRestriction | public abstract static annotation SenderQualityRestriction implements Annotation Enclosing class: SubscriberKit.SubscriberVideoStats |
| SubscriberKit.VideoListener | Monitors when the subscriber starts and stops receiving video data. |
| SubscriberKit.VideoStatsListener | Defines the listener object for getting subscriber video statistics. |
| TransportStats | Provides network-level transport statistics. This class represents low-level metrics related to the underlying WebRTC connection transport layer, such as available bandwidth. |
| TransportStats.NetworkCondition | public abstract static annotation NetworkCondition implements Annotation Enclosing class: TransportStats |
| VideoUtils | Includes a VideoUtils class, used when setting the preferred resolution using the Subscriber#setPreferredResolution(VideoUtils.Size preferredResolution) method. |
| VideoUtils.Size | Defines a video resolution to be used when setting the preferred resolution using the Subscriber#setPreferredResolution(VideoUtils.Size preferredResolution) method. |