Agora Java API Reference for Android
|
int io.agora.rte.scene.AgoraRteScene.join | ( | String | userId, |
String | token, | ||
AgoraRteSceneJoinOptions | joinOption | ||
) |
Joins an scene.
userId | User ID to join a scene. |
token | The access token to join a scene. |
joinOption | Options to join a scene. |
void io.agora.rte.scene.AgoraRteScene.leave | ( | ) |
Leaves an scene.
AgoraRteSceneInfo io.agora.rte.scene.AgoraRteScene.getSceneInfo | ( | ) |
Get scene info.
AgoraRteUserInfo io.agora.rte.scene.AgoraRteScene.getLocalUserInfo | ( | ) |
Gets information of the local user.
List<AgoraRteUserInfo> io.agora.rte.scene.AgoraRteScene.getRemoteUsers | ( | ) |
Gets information of the local user.
List<AgoraRteMediaStreamInfo> io.agora.rte.scene.AgoraRteScene.getLocalStreams | ( | ) |
Gets the information of local streams.
List<AgoraRteMediaStreamInfo> io.agora.rte.scene.AgoraRteScene.getRemoteStreams | ( | ) |
Gets the information of remote streams.
List<AgoraRteMediaStreamInfo> io.agora.rte.scene.AgoraRteScene.getRemoteStreamByUserId | ( | String | userId | ) |
Gets the information of remote streams by user ID.
userId | User ID. |
int io.agora.rte.scene.AgoraRteScene.createOrUpdateRTCStream | ( | String | streamId, |
AgoraRtcStreamOptions | streamOption | ||
) |
Create a Or Update RTC Stream object. If the stream doesn't exist, a new stream will be created, otherwise, the stream will be updated by the new option (e.g. rtc token will be updated).
streamId | Target stream id |
streamOption | Options to apply |
int io.agora.rte.scene.AgoraRteScene.createOrUpdateDirectCDNStream | ( | String | streamId, |
AgoraCdnStreamOptions | streamOption | ||
) |
Create a Or Update CDN Stream object. If the stream doesn't exist, a new stream will be created, otherwise, the stream will be updated by the new option (e.g. CDN url will be updated).
streamId | |
streamOption |
int io.agora.rte.scene.AgoraRteScene.destroyStream | ( | String | streamId | ) |
Destroys a local stream by ID.
streamId | ID of the local stream to be destroyed |
int io.agora.rte.scene.AgoraRteScene.setAudioEncoderConfiguration | ( | String | streamId, |
AgoraRteAudioEncoderConfiguration | audioEncoderConfiguration | ||
) |
Configures the audio encoder for the local stream. Note that all audio tracks published to the stream will apply the new configuration.
streamId | ID of the local stream. |
audioEncoderConfiguration | Audio encoder configurations. |
int io.agora.rte.scene.AgoraRteScene.setVideoEncoderConfiguration | ( | String | streamId, |
AgoraRteVideoEncoderConfiguration | videoEncoderConfiguration | ||
) |
Configures the video encoder for the local stream. Note that all video tracks published to the stream will apply the new configuration.
streamId | ID of the local stream. |
videoEncoderConfiguration | Video encoder configurations. |
int io.agora.rte.scene.AgoraRteScene.setExtensionProperty | ( | AgoraRteExtensionProperty | extensionProperty | ) |
Set extension specific property.
extensionProperty | the extension property |
AgoraRteExtensionProperty io.agora.rte.scene.AgoraRteScene.getExtensionProperty | ( | ) |
Get extension specific property.
int io.agora.rte.scene.AgoraRteScene.setCloudCDNTranscoding | ( | String | localStreamId, |
AgoraRteLiveTranscoding | transcoding | ||
) |
Set the transcoding parameter for publish Cloud CDN If you call this method for the first time, it will NOT trigger the onBypassTranscodingUpdated
callback,
localStreamId | |
transcoding |
int io.agora.rte.scene.AgoraRteScene.addCloudCDNUrl | ( | String | localStreamId, |
String | targetCdnUrl, | ||
boolean | transcodingEnabled | ||
) |
Add a target Cloud CDN URL to a local stream This method will trigger 'OnBypassCdnStateChanged' and 'onBypassCdnPublished' callback
localStreamId | ID of the local stream to be destroyed |
targetCdnUrl | The CDN streaming URL in the RTMP format. The maximum length of this parameter is 1024 bytes. The URL address must not contain special character, such as Chinese language characters. |
transcodingEnabled | Sets whether transcoding is enabled/disabled. If you set this parameter as true , ensure that you call the setCloudCDNTranscoding method before this method. |
int io.agora.rte.scene.AgoraRteScene.removeCloudCDNUrl | ( | String | localStreamId, |
String | targetCdnUrl | ||
) |
Remove a Cloud CDN URL from a local stream This method will trigger 'OnBypassCdnStateChanged' and 'onBypassCdnUnpublished' callback
localStreamId | ID of the local stream to be destroyed |
targetCdnUrl | The CDN streaming URL in the RTMP format. The maximum length of this parameter is 1024 bytes. The URL address must not contain special character, such as Chinese language characters. |
int io.agora.rte.scene.AgoraRteScene.publishLocalAudioTrack | ( | String | streamId, |
AgoraRteAudioTrack | audioTrack | ||
) |
Publishes a local audio track to a local stream by ID. Note that remote peers could only see one audio track even several local audio tracks are published to the stream. This is because all local audio tracks will be mixed automatically in internal before sending the audio data to remote peers.
streamId | ID of the local stream. |
audioTrack | The local audio track. |
int io.agora.rte.scene.AgoraRteScene.publishLocalVideoTrack | ( | String | streamId, |
AgoraRteVideoTrack | videoTrack | ||
) |
Publishes a local video track to a local stream by ID. Note that one stream could only contains one video track, so several streams are required to publish several video tracks, or one stream with mixing all video tracks together.
streamId | ID of the local stream. |
videoTrack | The local video track. |
int io.agora.rte.scene.AgoraRteScene.unpublishLocalAudioTrack | ( | AgoraRteAudioTrack | audioTrack | ) |
Unpublishes a local audio track.
audioTrack | The local audio track. |
int io.agora.rte.scene.AgoraRteScene.unpublishLocalVideoTrack | ( | AgoraRteVideoTrack | videoTrack | ) |
Unpublishes a local video track. Note that even the track is unpublished, but for camera track or screen track, the track could be still captering data from camera or screen, so the preview function isn't impact after unpublishing. To stop the camera or screen track, user need to call stopCapture().
videoTrack | The local video track. |
int io.agora.rte.scene.AgoraRteScene.publishMediaPlayer | ( | String | streamId, |
AgoraRteMediaPlayer | player | ||
) |
Publishes a media player to a local stream by ID. The played audio and video will be sent to the stream.
streamId | ID of the local stream. |
player | The media player. |
int io.agora.rte.scene.AgoraRteScene.unpublishMediaPlayer | ( | AgoraRteMediaPlayer | player | ) |
Unpublishes a media player.
player | The media player. |
int io.agora.rte.scene.AgoraRteScene.subscribeRemoteAudio | ( | String | remoteStreamId | ) |
Subscribes the remote audio data from remote stream
remoteStreamId | The remote stream ID. |
int io.agora.rte.scene.AgoraRteScene.unsubscribeRemoteAudio | ( | String | remoteStreamId | ) |
Unsubscribes the remote audio data from remote stream
remoteStreamId | The remote stream ID. |
int io.agora.rte.scene.AgoraRteScene.subscribeRemoteVideo | ( | String | remoteStreamId, |
AgoraRteVideoSubscribeOptions | videoSubscribeOption | ||
) |
Subscribes the remote video data from remote stream
remoteStreamId | The remote stream ID. |
videoSubscribeOption | Subscription options. |
int io.agora.rte.scene.AgoraRteScene.unsubscribeRemoteVideo | ( | String | remoteStreamId | ) |
Unsubscribes the remote video data from remote stream
remoteStreamId | The remote stream ID. |
int io.agora.rte.scene.AgoraRteScene.setRemoteVideoCanvas | ( | String | remoteStreamId, |
AgoraRteVideoCanvas | canvas | ||
) |
Set video canvas for the remote stream. Video frame from the remote stream will be applied to the canvas. Note that SDK will try to hold related resource internal (e.g window resource from system), and the resource referenced by canvas will be released when scene is destroyed or user set the canvas with empty resource.
remoteStreamId | The remote stream ID |
canvas | The input Canvas. |
void io.agora.rte.scene.AgoraRteScene.registerSceneEventHandler | ( | AgoraRteSceneEventHandler | eventHandler | ) |
Registers an event handler for the scene.
eventHandler | An IAgoraRteSceneEventHandler object. |
void io.agora.rte.scene.AgoraRteScene.unregisterSceneEventHandler | ( | AgoraRteSceneEventHandler | eventHandler | ) |
Unregisters an event handler.
eventHandler | An IAgoraRteSceneEventHandler object. |
void io.agora.rte.scene.AgoraRteScene.registerRemoteVideoFrameObserver | ( | AgoraRteVideoFrameObserver | observer | ) |
Registers a video frame observer for the remote stream. For local video frame observer, user can register observer on track object.
observer | An IAgoraRteVideoFrameObserver object. |
void io.agora.rte.scene.AgoraRteScene.unregisterRemoteVideoFrameObserver | ( | AgoraRteVideoFrameObserver | observer | ) |
Unregisters an audio frame observer.
observer | An IAgoraRteVideoFrameObserver object. |
void io.agora.rte.scene.AgoraRteScene.registerAudioFrameObserver | ( | AgoraRteAudioFrameObserver | observer, |
AgoraRteAudioObserverOptions | option | ||
) |
Registers a audio frame observer for the local or remote stream.
observer | An IAgoraRteAudioFrameObserver object. |
option | Audio observer option |
void io.agora.rte.scene.AgoraRteScene.unregisterAudioFrameObserver | ( | AgoraRteAudioFrameObserver | observer | ) |
Unregisters an audio frame observer.
observer | An IAgoraRteAudioFrameObserver object. |
int io.agora.rte.scene.AgoraRteScene.adjustUserPlaybackSignalVolume | ( | String | remoteStreamId, |
int | volume | ||
) |
Adjust the playback volume for remote user
remoteStreamId | The remote stream id |
volume | The playback volume, range is [0,100] |
int io.agora.rte.scene.AgoraRteScene.getUserPlaybackSignalVolume | ( | String | remoteStreamId | ) |
Get the playback volume for remote user
remoteStreamId | The remote stream id |
void io.agora.rte.scene.AgoraRteScene.destroy | ( | ) |
destroy agora scene
void io.agora.rte.scene.AgoraRteScene.setEventHandler | ( | Handler | eventHandler | ) |
set event handler, and event callback thrown from MainLooper by default
eventHandler | android handler |