Package io.agora.rtc2

Class ChannelMediaOptions

java.lang.Object
io.agora.rtc2.ChannelMediaOptions

public class ChannelMediaOptions extends Object
The channel media options.
  • Field Details

    • publishCameraTrack

      public Boolean publishCameraTrack
      Determines whether to publish the video of the camera track. - true: (Default) Publish the video track of the camera capturer. - false: Do not publish the video track of the camera capturer.
    • publishSecondaryCameraTrack

      public Boolean publishSecondaryCameraTrack
      Determines whether to publish the video of the secondary camera track. - true: Publish the video track of the secondary camera capturer. - false: (Default) Do not publish the video track of the secondary camera capturer.
    • publishThirdCameraTrack

      public Boolean publishThirdCameraTrack
      Whether to publish the video of the third camera track. - `true`: Publish the video track of the third camera capturer. - `false`: (Default) Do not publish the video track of the third camera capturer.
    • publishFourthCameraTrack

      public Boolean publishFourthCameraTrack
      Whether to publish the video of the fourth camera track. - `true`: Publish the video track of the fourth camera capturer. - `false`: (Default) Do not publish the video track of the fourth camera capturer.
    • publishMicrophoneTrack

      public Boolean publishMicrophoneTrack
      Determines whether to publish the recorded audio of microphone. This method replaces calling muteLocalAudioStream before joining a channel. - true: (Default) Publish the recorded audio of microphone. - false: Do not publish the recorded audio of microphone.
    • publishScreenCaptureVideo

      public Boolean publishScreenCaptureVideo
      Determines whether to publish the video track of the capturer . - true: Publish the video track of the screen capturer. - false: (Default) Do not publish the video track of the screen capturer.
    • publishScreenCaptureAudio

      public Boolean publishScreenCaptureAudio
      Determines whether to publish the audio track of the screen capturer. - true: Publish the audio track of the screen capturer. - false: (Default) Do not publish the audio track of the screen capturer.
    • publishCustomAudioTrack

      public Boolean publishCustomAudioTrack
      Determines whether to publish the audio of the custom audio track. - true: Publish the audio of the custom audio track. - false: (Default) Do not publish the audio of the custom audio track.
    • publishCustomAudioTrackId

      public Integer publishCustomAudioTrackId
      The custom audio track id. The default value is 0.
    • publishCustomVideoTrack

      public Boolean publishCustomVideoTrack
      Determines whether to publish the video of the custom video track. - true: Publish the video of the custom video track. - false: (Default) Do not publish the video of the custom video track.
    • publishEncodedVideoTrack

      public Boolean publishEncodedVideoTrack
      Determines whether to publish the video of the encoded video track. - true: Publish the video of the encoded video track. - false: (Default) Do not publish the video of the encoded video track.
    • publishMediaPlayerAudioTrack

      public Boolean publishMediaPlayerAudioTrack
      Determines whether to publish the audio track of media player source. - true: Publish the audio track of media player source. - false: (Default) Do not publish the audio track of media player source.
    • publishMediaPlayerVideoTrack

      public Boolean publishMediaPlayerVideoTrack
      Determines whether to publish the video track of media player source. - true: Publish the video track of media player source. - false: (Default) Do not publish the video track of media player source.
    • publishTranscodedVideoTrack

      public Boolean publishTranscodedVideoTrack
      Whether to publish the local transcoded video track. - `true`: Publish the video track of local transcoded video track. - `false`: (Default) Do not publish the local transcoded video track.
    • publishMixedAudioTrack

      public Boolean publishMixedAudioTrack
      Whether to publish the local mixed audio track. - `true`: Publish the audio track of local mixed audio track. - `false`: (Default) Do not publish the local mixed audio track.
    • publishLipSyncTrack

      public Boolean publishLipSyncTrack
      Whether to publish the local lip sync video track. - `true`: Publish the video track of local lip sync video track. - `false`: (Default) Do not publish the local lip sync video track.
    • autoSubscribeAudio

      public Boolean autoSubscribeAudio
      Determines whether to subscribe all remote audio streams automatically. - true: (Default) Subscribe all remote audio streams automatically. - false: Do not subscribe any remote audio stream automatically.
    • autoSubscribeVideo

      public Boolean autoSubscribeVideo
      Determines whether to subscribe all remote video streams automatically. - True: (Default) Subscribe all remote video streams automatically. - False: Do not subscribe any remote video stream automatically.
    • enableAudioRecordingOrPlayout

      public Boolean enableAudioRecordingOrPlayout
      Determines whether to enable audio recording or playout. - true: (Default) It's used to publish audio and mix microphone, or subscribe audio and playout - false: It's used to publish extenal audio frame only without mixing microphone, or no need audio device to playout audio either.
    • publishMediaPlayerId

      public Integer publishMediaPlayerId
      Determines which media player source should be published. This parameter get from function getMediaPlayerId() of AgoraMediaPlayer.
    • clientRoleType

      public Integer clientRoleType
      The client role type: - `CLIENT_ROLE_BROADCASTER`(1): The broadcaster, who can both send and receive streams. - `CLIENT_ROLE_AUDIENCE`(2): (Default) The audience, who can only receive streams.
    • audienceLatencyLevel

      public Integer audienceLatencyLevel
      The audience latency level type: - `AUDIENCE_LATENCY_LEVEL_LOW_LATENCY`(1): Low latency. A low latency audience's play out latency is 1.5 second. - `AUDIENCE_LATENCY_LEVEL_ULTRA_LOW_LATENCY`(2): (Default) Ultra low latency. An ultra low latency audience's play out latency is 0.5 second.
    • defaultVideoStreamType

      public Integer defaultVideoStreamType
      The default video stream type to subscribe to: - `VIDEO_STREAM_HIGH`(0): (Default) The high-stream video, that is, the video stream featuring in high resolution and high bitrate. - `VIDEO_STREAM_LOW`(1): The low-stream video, that is, the video stream featuring in low resolution and low bitrate.
    • channelProfile

      public Integer channelProfile
      The channel profile: - `CHANNEL_PROFILE_COMMUNICATION`(0): Communication. Use this profile in one-on-one calls or group calls, where all users can talk freely. - `CHANNEL_PROFILE_LIVE_BROADCASTING`(1): (Default) Live Broadcast. Users in a live-broadcast channel has a role as either broadcaster or audience. A broadcaster can both send and receive streams; an audience can only receive streams.
    • audioDelayMs

      public Integer audioDelayMs
      The delay in ms for sending audio frames. This is used for explicit control of A/V sync. To switch off the delay, set the value to zero.
    • mediaPlayerAudioDelayMs

      public Integer mediaPlayerAudioDelayMs
      The delay in ms for sending media player audio frames. This is used for explicit control of A/V sync. To switch off the delay, set the value to zero.
    • token

      public String token
      The token to be renewed.
    • enableBuiltInMediaEncryption

      public Boolean enableBuiltInMediaEncryption
      Enable media packet encryption. It will be ignored when calling function updateChannelMediaOptions(). - true: Enable media packet encryption. - false: (Default) Do not Enable media packet encryption.
    • publishRhythmPlayerTrack

      public Boolean publishRhythmPlayerTrack
      Determines whether to publish the sound of the rhythm player to remote users. - true: (Default) Publish the sound of the rhythm player. - false: Do not publish the sound of the rhythm player.
    • isInteractiveAudience

      public Boolean isInteractiveAudience
      This mode is only used for audience. In PK mode, client might join one channel as broadcaster, and join another channel as interactive audience to achieve low lentancy and smooth video from remote user. - true: Enable low lentancy and smooth video when joining as an audience. - false: (default) Use default settings for audience role.
    • customVideoTrackId

      public Integer customVideoTrackId
      The custom video track id which will used to publish or preview.
    • isAudioFilterable

      public Boolean isAudioFilterable
      Determines whether local audio stream can be filtered. - true: (Default) Can be filtered when audio level is low. - false: Do not filter this audio stream.
    • startPreview

      public Boolean startPreview
      Determines whether to start preview when join channel if canvas have been set. - true: (Default) Start preview when join channel. - false: Do not start preview.
    • parameters

      public String parameters
      Provides the technical preview functionalities or special customizations by configuring the SDK with JSON options.
    • enableMultipath

      public Boolean enableMultipath
      Whether to enable multipath transmission. - true: Enable multipath transmission. - false: Disable multipath transmission.
      Since:
      4.6.0
    • uplinkMultipathMode

      public Integer uplinkMultipathMode
      The mode for uplink multipath transmission.
      Since:
      4.6.0
    • downlinkMultipathMode

      public Integer downlinkMultipathMode
      The mode for downlink multipath transmission.
      Since:
      4.6.0
    • preferMultipathType

      public Integer preferMultipathType
      The preferred type of multipath transmission.
      Since:
      4.6.0
  • Constructor Details

    • ChannelMediaOptions

      public ChannelMediaOptions()
    • ChannelMediaOptions

      public ChannelMediaOptions(Integer clientRoleType)
  • Method Details

    • isPublishCameraTrack

      public Boolean isPublishCameraTrack()
    • isPublishSecondaryCameraTrack

      public Boolean isPublishSecondaryCameraTrack()
    • isPublishThirdCameraTrack

      public Boolean isPublishThirdCameraTrack()
    • isPublishFourthCameraTrack

      public Boolean isPublishFourthCameraTrack()
    • isPublishScreenCaptureVideo

      public Boolean isPublishScreenCaptureVideo()
    • isPublishScreenCaptureAudio

      public Boolean isPublishScreenCaptureAudio()
    • isPublishCustomAudioTrack

      public Boolean isPublishCustomAudioTrack()
    • isPublishCustomVideoTrack

      public Boolean isPublishCustomVideoTrack()
    • isPublishEncodedVideoTrack

      public Boolean isPublishEncodedVideoTrack()
    • isPublishMediaPlayerAudioTrack

      public Boolean isPublishMediaPlayerAudioTrack()
    • isPublishMediaPlayerVideoTrack

      public Boolean isPublishMediaPlayerVideoTrack()
    • isPublishTranscodedVideoTrack

      public Boolean isPublishTranscodedVideoTrack()
    • isPublishMixedAudioTrack

      public Boolean isPublishMixedAudioTrack()
    • isPublishLipSyncTrack

      public Boolean isPublishLipSyncTrack()
    • getPublishMediaPlayerId

      public Integer getPublishMediaPlayerId()
    • isPublishMicrophoneTrack

      public Boolean isPublishMicrophoneTrack()
    • isAutoSubscribeAudio

      public Boolean isAutoSubscribeAudio()
    • isAutoSubscribeVideo

      public Boolean isAutoSubscribeVideo()
    • isStartPreview

      public Boolean isStartPreview()
    • isEnableAudioRecordingOrPlayout

      public Boolean isEnableAudioRecordingOrPlayout()
    • getClientRoleType

      public Integer getClientRoleType()
    • getAudienceLatencyLevel

      public Integer getAudienceLatencyLevel()
    • getDefaultVideoStreamType

      public Integer getDefaultVideoStreamType()
    • getChannelProfile

      public Integer getChannelProfile()
    • getAudioDelayMs

      public Integer getAudioDelayMs()
    • getMediaPlayerAudioDelayMs

      public Integer getMediaPlayerAudioDelayMs()
    • getToken

      public String getToken()
    • isEnableBuiltInMediaEncryption

      public Boolean isEnableBuiltInMediaEncryption()
    • getPublishRhythmPlayerTrack

      public Boolean getPublishRhythmPlayerTrack()
    • getIsAudioFilterable

      public Boolean getIsAudioFilterable()
    • getPublishCustomAudioTrackId

      public Integer getPublishCustomAudioTrackId()
    • getCustomVideoTrackId

      public Integer getCustomVideoTrackId()
    • isInteractiveAudience

      public Boolean isInteractiveAudience()
    • getParameters

      public String getParameters()
    • isEnableMultipath

      public Boolean isEnableMultipath()
    • getUplinkMultipathMode

      public Integer getUplinkMultipathMode()
    • getDownlinkMultipathMode

      public Integer getDownlinkMultipathMode()
    • getPreferMultipathType

      public Integer getPreferMultipathType()
    • toString

      public String toString()
      Overrides:
      toString in class Object