Agora Java API Reference for Android
|
Classes | |
interface | LogFilter |
Public Member Functions | |
abstract int | enableAudioRecording (boolean enabled) |
abstract int | enableVideoCapturing (boolean enabled) |
abstract int | startStreaming (String publishUrl) |
abstract int | stopStreaming () |
abstract int | muteAudioStream (boolean muted) |
abstract int | muteVideoStream (boolean muted) |
abstract int | switchResolution (int width, int height) |
abstract int | snapshot (SnapshotCallback snapshotCallback) |
abstract int | switchCamera () |
abstract boolean | addVideoFilter (VideoFilter videoFilter) |
abstract boolean | removeVideoFilter (VideoFilter videoFilter) |
abstract int | adjustRecordingSignalVolume (int volume) |
abstract AgoraCameraCapturer | getCameraCapture () |
abstract VideoPreviewRenderer | getVideoPreviewRenderer () |
abstract int | registerAudioFrameObserver (AudioFrameObserver observer) |
abstract void | unregisterAudioFrameObserver (AudioFrameObserver observer) |
abstract int | registerVideoFrameObserver (VideoFrameObserver observer) |
abstract void | unregisterVideoFrameObserver (VideoFrameObserver observer) |
abstract int | setLogFile (String filePath) |
abstract int | setLogFilter (@LogFilter int filter) |
abstract int | setLogFileSize (int fileSizeInKBytes) |
abstract int | startScreenCapture (Intent intent, int width, int height) |
abstract void | stopScreenCapture () |
Static Public Member Functions | |
static synchronized StreamingKit | create (StreamingContext streamingContext) throws Exception |
static synchronized void | destroy () |
static String | getSdkVersion () |
Main interface class of the Agora Streaming Kit.
Call the methods of this class to use all the functionality of the kit. Agora recommends calling the AgoraStreamingKit API methods in the same thread instead of in multiple threads.
|
static |
Creates an AgoraStreamingKit instance.
The Agora Streaming Kit only supports one AgoraStreamingKit instance at a time, therefore the app should create one AgoraStreamingKit object only.
streamingContext | StreamingContext |
Exception | Fails to create an AgoraService instance. |
|
static |
Releases all the resources used by the Agora Streaming Kit.
|
abstract |
Enables or disables audio recording.
enabled | Determines whether to disable or re-enable audio recording:
|
Reimplemented in io.agora.streaming.internal.StreamingKitImpl.
|
abstract |
Enables or disables video capturing.
enabled | Determines whether to disable or re-enable video capturing:
|
Reimplemented in io.agora.streaming.internal.StreamingKitImpl.
|
abstract |
Start media streaming
publishUrl | The CDN streaming URL in the RTMP format. The maximum length of this parameter is 1024 bytes. The URL address must not contain special characters, such as Chinese language characters. |
Reimplemented in io.agora.streaming.internal.StreamingKitImpl.
|
abstract |
stop media streaming
Reimplemented in io.agora.streaming.internal.StreamingKitImpl.
|
abstract |
Stops or resumes publishing the audio stream.
muted | Determines whether to publish or stop publishing the audio stream:
|
Reimplemented in io.agora.streaming.internal.StreamingKitImpl.
|
abstract |
Stops or resumes publishing the video stream.
muted | Determines whether to publish or stop publishing the video stream:
|
Reimplemented in io.agora.streaming.internal.StreamingKitImpl.
|
abstract |
Sets the audio stream configuration.
Each configuration corresponds to a set of audio parameters, including the audio sample rate, bytes per sample, number of channels, and bitrate.
config | The audio stream configuration: AudioStreamConfiguration. |
Each configuration corresponds to a set of video parameters, including the resolution, frame rate, and bitrate.
config | The video stream configuration: VideoStreamConfiguration. |
Minimum resolution support 64*64 Maximum resolution support 1920*1080
width | The width of video stream |
height | The height of video stream |
Reimplemented in io.agora.streaming.internal.StreamingKitImpl.
|
abstract |
snapshot a video frame when pushing stream.
@notes This method just callback onSnapshot of bitmap once.
snapshotCallback | The width of video stream |
Reimplemented in io.agora.streaming.internal.StreamingKitImpl.
|
abstract |
Switches between front and rear cameras.
Reimplemented in io.agora.streaming.internal.StreamingKitImpl.
|
abstract |
Adds a video filter to the video track.
videoFilter | The video filter that you want to add to the video track: VideoFilter. |
Reimplemented in io.agora.streaming.internal.StreamingKitImpl.
|
abstract |
Removes the video filter added by addVideoFilter() from the video track.
videoFilter | The video filter that you want to remove. |
Reimplemented in io.agora.streaming.internal.StreamingKitImpl.
|
abstract |
Adjusts the recording volume.
volume | The recording volume, which ranges from 0 to 400:
|
Reimplemented in io.agora.streaming.internal.StreamingKitImpl.
|
abstract |
Get the camera capturer
Reimplemented in io.agora.streaming.internal.StreamingKitImpl.
|
abstract |
Get the video preview renderer
Reimplemented in io.agora.streaming.internal.StreamingKitImpl.
|
abstract |
Registers an audio frame observer object.
observer | An AudioFrameObserver object. |
Reimplemented in io.agora.streaming.internal.StreamingKitImpl.
|
abstract |
Unregisters an audio frame observer object.
observer | An AudioFrameObserver object. |
Reimplemented in io.agora.streaming.internal.StreamingKitImpl.
|
abstract |
Registers a video frame observer object.
observer | A VideoFrameObserver object. |
Reimplemented in io.agora.streaming.internal.StreamingKitImpl.
|
abstract |
Unregisters a video frame observer object.
observer | A VideoFrameObserver object. |
Reimplemented in io.agora.streaming.internal.StreamingKitImpl.
|
abstract |
Specifies an output log file for the streaming kit.
The log file records all log data for the kit's operation. Ensure that the directory for the log file exists and is writable.
filePath | File path of the log file. |
Reimplemented in io.agora.streaming.internal.StreamingKitImpl.
|
abstract |
Sets the output log level of the kit.
You can use one or a combination of the filters. The log level follows the sequence of OFF
, CRITICAL
, ERROR
, WARNING
, INFO
, and DEBUG
. Choose a level and you will see logs preceding that level. For example, if you set the log level to WARNING
, you see the logs within levels CRITICAL
, ERROR
, and WARNING
.
filter | Sets the log filter level:
|
Reimplemented in io.agora.streaming.internal.StreamingKitImpl.
|
abstract |
Sets the log file size (KB).
The SDK has two log files, each with a default size of 512 KB. If you set fileSizeInBytes
as 1024 KB, the SDK outputs log files with a total maximum size of 2 MB. If the total size of the log files exceed the set value, the new output log files overwrite the old output log files.
fileSizeInKBytes | The SDK log file size (KB). |
Reimplemented in io.agora.streaming.internal.StreamingKitImpl.
|
static |
Gets the SDK version.
|
abstract |
start screen capture for android
Intent | android screen share system serverice Intent |
int | screen dimension witch |
int | screen dimension height |
Reimplemented in io.agora.streaming.internal.StreamingKitImpl.
|
abstract |
stop screen capture for android
none |
Reimplemented in io.agora.streaming.internal.StreamingKitImpl.