Public Member Functions | |
Builder | owner (boolean isRoomOwner) |
Builder | streamLifeCycle (int lifecycle) |
Builder | size (int width, int height) |
Builder | frameRate (int framerate) |
Builder | bitRate (int bitrate) |
Builder | audioProfile (int audioSampleRate, int audioBitrate, int audioChannels) |
Builder | defaultLayout (int layoutStyle) |
Builder | publishUrl (String url) |
Builder | rawStreamUrl (String url) |
Builder | injectStream (String url, int width, int height) |
Builder | extraInfo (String optionalInfo) |
PublisherConfiguration | build () |
Builder class.
If you want to configure the push-stream, Agora recommends using the setLiveTranscoding method.
Builder io.agora.rtc.PublisherConfiguration.Builder.owner | ( | boolean | isRoomOwner | ) |
Sets the RTMP stream owner.
In the Builder Class, this method sets whether the current host is the RTMP stream owner.
isRoomOwner |
|
Builder io.agora.rtc.PublisherConfiguration.Builder.streamLifeCycle | ( | int | lifecycle | ) |
CDN push stream life cycle
You can choose:
Builder io.agora.rtc.PublisherConfiguration.Builder.size | ( | int | width, |
int | height | ||
) |
Sets the stream resolution.
In the Builder Class, this method sets the resolution of the CDN live output data stream.
width | Width of the the CDN live output data stream. The default value is 360. |
height | Height of the the CDN live output data stream. The default value is 640. |
Builder io.agora.rtc.PublisherConfiguration.Builder.frameRate | ( | int | framerate | ) |
Sets the stream's frame rate.
In the Builder class, this method sets the frame rate of the CDN live output data stream.
framerate | Frame rate of the CDN live output data stream. The default value is 15 fps. |
Builder io.agora.rtc.PublisherConfiguration.Builder.bitRate | ( | int | bitrate | ) |
Sets the stream's bitrate.
In the Builder class, this method sets the bitrate of the CDN live output data stream.
bitrate | Bitrate of the CDN live output data stream. The default value is 500 Kbps. |
Builder io.agora.rtc.PublisherConfiguration.Builder.defaultLayout | ( | int | layoutStyle | ) |
Sets the default layout.
In the Builder class, this method sets the default layout if you do not use flexible adjustment.
layoutStyle |
|
Builder io.agora.rtc.PublisherConfiguration.Builder.publishUrl | ( | String | url | ) |
Sets the publishing URL.
In the Builder class, this method configures the push-stream address for the picture-in-picture layouts.
url | Configures the push-stream address for the picture-in-picture layouts. The default value is null. |
Builder io.agora.rtc.PublisherConfiguration.Builder.rawStreamUrl | ( | String | url | ) |
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.
url | Push-stream URL address of the original stream not requiring picture-blending. The default value is null. |
Builder io.agora.rtc.PublisherConfiguration.Builder.injectStream | ( | String | url, |
int | width, | ||
int | height | ||
) |
Sets the inject stream.
In the Builder class, this method injects a stream to the current channel.
url | URL address of the injected stream in the channel. |
width | Width of the stream. N/A, set as 0. |
height | Height of the stream. N/A, set as 0. |
Builder io.agora.rtc.PublisherConfiguration.Builder.extraInfo | ( | String | optionalInfo | ) |
Adds extra information.
optionalInfo | Reserved Field. The default value is NULL. |