Package io.agora.rtc2

Class PublisherConfiguration.Builder

java.lang.Object
io.agora.rtc2.PublisherConfiguration.Builder
Enclosing class:
PublisherConfiguration

public static class PublisherConfiguration.Builder extends Object
Deprecated.

If you want to configure the push-stream, Agora recommends using the setLiveTranscoding method.

Builder class.
  • Constructor Details

    • Builder

      public Builder()
      Deprecated.
  • Method Details

    • owner

      public PublisherConfiguration.Builder owner(boolean isRoomOwner)
      Deprecated.
      Sets the RTMP stream owner.

      In the Builder Class, this method sets whether the current host is the RTMP stream owner.

      Parameters:
      isRoomOwner -
      • True: Yes (default), push-stream configuration.
      • False: No push-stream configuration.
      Returns:
      • 0: Success.
      • <0: Failure.
    • streamLifeCycle

      public PublisherConfiguration.Builder streamLifeCycle(int lifecycle)
      Deprecated.
      CDN push stream life cycle

      You can choose:

      • Bind to channel (STREAM_LIFE_CYCLE_BIND2CHANNEL) or
      • Bind to room owner (STREAM_LIFE_CYCLE_BIND2OWNER).
    • size

      public PublisherConfiguration.Builder size(int width, int height)
      Deprecated.
      Sets the stream resolution.

      In the Builder Class, this method sets the resolution of the output data stream set for CDN Live.

      Parameters:
      width - Width of the output data stream set for CDN Live. 360 is the default value.
      height - Height of the output data stream set for CDN Live. 640 is the default value.
      Returns:
      • 0: Success.
      • <0: Failure.
    • frameRate

      public PublisherConfiguration.Builder frameRate(int framerate)
      Deprecated.
      Sets the stream's frame rate.

      In the Builder class, this method sets the frame rate of the output data stream set for CDN Live.

      Parameters:
      framerate - Frame rate of the output data stream set for CDN Live. 15 fps is the default value.
      Returns:
      • 0: Success.
      • <0: Failure.
    • bitRate

      public PublisherConfiguration.Builder bitRate(int bitrate)
      Deprecated.
      Sets the stream's bitrate.

      In the Builder class, this method sets the bitrate of the output data stream set for CDN Live.

      Parameters:
      bitrate - Bitrate of the output data stream set for CDN Live. 500 kbit/s is the default value.
      Returns:
      • 0: Success.
      • <0: Failure.
    • defaultLayout

      public PublisherConfiguration.Builder defaultLayout(int layoutStyle)
      Deprecated.
      Sets the default layout.

      In the Builder class, this method sets the default layout if you do not use flexible adjustment.

      Parameters:
      layoutStyle -
      • 0: Tile horizontally
      • 1: Layered windows
      • 2: Tile vertically
      Returns:
      • 0: Success.
      • <0: Failure.
    • publishUrl

      public PublisherConfiguration.Builder publishUrl(String url)
      Deprecated.
      Sets the publishing URL.

      In the Builder class, this method configures the push-stream address for the picture-in-picture layouts.

      Parameters:
      url - Configures the push-stream address for the picture-in-picture layouts. The default value is NULL.
      Returns:
      • 0: Success.
      • <0: Failure.
    • rawStreamUrl

      public PublisherConfiguration.Builder rawStreamUrl(String url)
      Deprecated.
      Sets the raw stream URL.

      In the Builder class, this method sets the push-stream address of the original stream which does not require picture-blending.

      Parameters:
      url - Push-stream address of the original stream. The default value is NULL.
      Returns:
      • 0: Success.
      • <0: Failure.
    • injectStream

      public PublisherConfiguration.Builder injectStream(String url, int width, int height)
      Deprecated.
      Sets the inject stream.

      In the Builder class, this method injects a stream to the current channel.

      Parameters:
      url - URL address of the stream to be injected to the channel.
      width - Width of the stream. N/A, set as 0.
      height - Height of the stream. N/A, set as 0.
      Returns:
      • 0: Success.
      • <0: Failure.
    • extraInfo

      public PublisherConfiguration.Builder extraInfo(String optionalInfo)
      Deprecated.
      Adds extra information.
      Parameters:
      optionalInfo - Reserved Field. The default value is NULL.
      Returns:
      • 0: Success.
      • <0: Failure.
    • build

      public PublisherConfiguration build()
      Deprecated.