Class Publisher.Builder

    • Constructor Detail

      • Builder

        public Builder​(android.content.Context context)
        Instantiates a Publisher.Builder object.
    • Method Detail

      • frameRate

        public Publisher.Builder frameRate​(Publisher.CameraCaptureFrameRate frameRate)
        Sets the desired frame rate of the published video. Set this to a value defined in the Publisher.CameraCaptureFrameRate enum. If the device does not support the specified frame rate, it will use the closest supported frame rate. 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 stream uses. However, in sessions that have the media mode set to relayed, lowering the frame rate does not reduce the stream's bandwidth. (See The OpenTok Media Router and media modes.)
      • name

        public Publisher.Builder name​(java.lang.String name)
        Description copied from class: PublisherKit.Builder
        Sets the name of the published video. The name property for a stream published by this publisher will be set to this value (on all clients).
        name in class PublisherKit.Builder
      • audioBitrate

        public Publisher.Builder audioBitrate​(int bitsPerSecond)
        Description copied from class: PublisherKit.Builder
        Sets the desired bitrate for the published audio, in bits per second. The supported range of values is 6,000 - 510,000. (Invalid values are ignored.) Set this value to enable high-quality audio (or to reduce bandwidth usage with lower-quality audio).

        The following are recommended settings:

        • 8,000 - 12,000 for narrowband (NB) speech
        • 16,000 - 20,000 for wideband (WB) speech
        • 28,000 - 40,000 for full-band (FB) speech
        • 48,000 - 64,000 for full-band (FB) mono music
        • 64,000 - 128,000 for full-band (FB) stereo music

        The default value is 40,000.

        To set other audio settings, see the AudioDeviceManager class.

        audioBitrate in class PublisherKit.Builder
        bitsPerSecond - The desired bitrate of the audio, in bits per second.
        This Builder object.
      • enableOpusDtx

        public Publisher.Builder enableOpusDtx​(boolean enable)
        Description copied from class: PublisherKit.Builder
        Whether to enable Opus DTX (true) or not (false, the default). Enabling Opus DTX can reduce bandwidth usage in streams that have long periods of silence.

        By default, Opus DTX is disabled. If this property is set to true, Opus DTX will be enabled for the publisher.

        enableOpusDtx in class PublisherKit.Builder