Agora Java API Reference for Android
|
Public Member Functions | |
StreamingKitImpl (StreamingContext streamingContext) throws Exception | |
synchronized void | doDestroy () |
synchronized int | enableAudioRecording (boolean enabled) |
synchronized int | enableVideoCapturing (boolean enabled) |
synchronized int | startStreaming (String publishUrl) |
synchronized int | stopStreaming () |
synchronized int | muteAudioStream (boolean muted) |
synchronized int | muteVideoStream (boolean muted) |
synchronized int | setAudioStreamConfiguration (AudioStreamConfiguration config) |
synchronized int | setVideoStreamConfiguration (VideoStreamConfiguration config) |
synchronized int | switchResolution (int width, int height) |
synchronized int | switchCamera () |
synchronized int | snapshot (SnapshotCallback snapshotCallback) |
synchronized boolean | addVideoFilter (VideoFilter videoFilter) |
synchronized boolean | removeVideoFilter (VideoFilter videoFilter) |
synchronized int | adjustRecordingSignalVolume (int volume) |
synchronized AgoraCameraCapturer | getCameraCapture () |
synchronized VideoPreviewRenderer | getVideoPreviewRenderer () |
synchronized int | registerVideoFrameObserver (VideoFrameObserver observer) |
synchronized void | unregisterVideoFrameObserver (VideoFrameObserver observer) |
synchronized int | registerAudioFrameObserver (AudioFrameObserver observer) |
synchronized void | unregisterAudioFrameObserver (AudioFrameObserver observer) |
synchronized int | setLogFile (String filePath) |
synchronized int | setLogFilter (@LogFilter int filter) |
synchronized int | setLogFileSize (int fileSizeInKBytes) |
int | startScreenCapture (Intent intent, int width, int height) |
void | stopScreenCapture () |
Static Public Member Functions | |
static synchronized boolean | initializeNativeLibs () |
static native String | nativeGetSdkVersion () |
![]() | |
static synchronized StreamingKit | create (StreamingContext streamingContext) throws Exception |
static synchronized void | destroy () |
static String | getSdkVersion () |
synchronized int io.agora.streaming.internal.StreamingKitImpl.enableAudioRecording | ( | boolean | enabled | ) |
Enables or disables audio recording.
enabled | Determines whether to disable or re-enable audio recording:
|
Reimplemented from io.agora.streaming.StreamingKit.
synchronized int io.agora.streaming.internal.StreamingKitImpl.enableVideoCapturing | ( | boolean | enabled | ) |
Enables or disables video capturing.
enabled | Determines whether to disable or re-enable video capturing:
|
Reimplemented from io.agora.streaming.StreamingKit.
synchronized int io.agora.streaming.internal.StreamingKitImpl.startStreaming | ( | String | publishUrl | ) |
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 from io.agora.streaming.StreamingKit.
synchronized int io.agora.streaming.internal.StreamingKitImpl.stopStreaming | ( | ) |
stop media streaming
Reimplemented from io.agora.streaming.StreamingKit.
synchronized int io.agora.streaming.internal.StreamingKitImpl.muteAudioStream | ( | boolean | muted | ) |
Stops or resumes publishing the audio stream.
muted | Determines whether to publish or stop publishing the audio stream:
|
Reimplemented from io.agora.streaming.StreamingKit.
synchronized int io.agora.streaming.internal.StreamingKitImpl.muteVideoStream | ( | boolean | muted | ) |
Stops or resumes publishing the video stream.
muted | Determines whether to publish or stop publishing the video stream:
|
Reimplemented from io.agora.streaming.StreamingKit.
synchronized int io.agora.streaming.internal.StreamingKitImpl.switchResolution | ( | int | width, |
int | height | ||
) |
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 from io.agora.streaming.StreamingKit.
synchronized int io.agora.streaming.internal.StreamingKitImpl.switchCamera | ( | ) |
Switches between front and rear cameras.
Reimplemented from io.agora.streaming.StreamingKit.
synchronized int io.agora.streaming.internal.StreamingKitImpl.snapshot | ( | SnapshotCallback | snapshotCallback | ) |
snapshot a video frame when pushing stream.
@notes This method just callback onSnapshot of bitmap once.
snapshotCallback | The width of video stream |
Reimplemented from io.agora.streaming.StreamingKit.
synchronized boolean io.agora.streaming.internal.StreamingKitImpl.addVideoFilter | ( | VideoFilter | videoFilter | ) |
Adds a video filter to the video track.
videoFilter | The video filter that you want to add to the video track: VideoFilter. |
Reimplemented from io.agora.streaming.StreamingKit.
synchronized boolean io.agora.streaming.internal.StreamingKitImpl.removeVideoFilter | ( | VideoFilter | videoFilter | ) |
Removes the video filter added by addVideoFilter() from the video track.
videoFilter | The video filter that you want to remove. |
Reimplemented from io.agora.streaming.StreamingKit.
synchronized int io.agora.streaming.internal.StreamingKitImpl.adjustRecordingSignalVolume | ( | int | volume | ) |
Adjusts the recording volume.
volume | The recording volume, which ranges from 0 to 400:
|
Reimplemented from io.agora.streaming.StreamingKit.
synchronized AgoraCameraCapturer io.agora.streaming.internal.StreamingKitImpl.getCameraCapture | ( | ) |
Get the camera capturer
Reimplemented from io.agora.streaming.StreamingKit.
synchronized VideoPreviewRenderer io.agora.streaming.internal.StreamingKitImpl.getVideoPreviewRenderer | ( | ) |
Get the video preview renderer
Reimplemented from io.agora.streaming.StreamingKit.
synchronized int io.agora.streaming.internal.StreamingKitImpl.registerVideoFrameObserver | ( | VideoFrameObserver | observer | ) |
Registers a video frame observer object.
observer | A VideoFrameObserver object. |
Reimplemented from io.agora.streaming.StreamingKit.
synchronized void io.agora.streaming.internal.StreamingKitImpl.unregisterVideoFrameObserver | ( | VideoFrameObserver | observer | ) |
Unregisters a video frame observer object.
observer | A VideoFrameObserver object. |
Reimplemented from io.agora.streaming.StreamingKit.
synchronized int io.agora.streaming.internal.StreamingKitImpl.registerAudioFrameObserver | ( | AudioFrameObserver | observer | ) |
Registers an audio frame observer object.
observer | An AudioFrameObserver object. |
Reimplemented from io.agora.streaming.StreamingKit.
synchronized void io.agora.streaming.internal.StreamingKitImpl.unregisterAudioFrameObserver | ( | AudioFrameObserver | observer | ) |
Unregisters an audio frame observer object.
observer | An AudioFrameObserver object. |
Reimplemented from io.agora.streaming.StreamingKit.
synchronized int io.agora.streaming.internal.StreamingKitImpl.setLogFile | ( | String | filePath | ) |
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 from io.agora.streaming.StreamingKit.
synchronized int io.agora.streaming.internal.StreamingKitImpl.setLogFilter | ( | @LogFilter int | filter | ) |
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 from io.agora.streaming.StreamingKit.
synchronized int io.agora.streaming.internal.StreamingKitImpl.setLogFileSize | ( | int | fileSizeInKBytes | ) |
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 from io.agora.streaming.StreamingKit.
int io.agora.streaming.internal.StreamingKitImpl.startScreenCapture | ( | Intent | intent, |
int | width, | ||
int | height | ||
) |
start screen capture for android
Intent | android screen share system serverice Intent |
int | screen dimension witch |
int | screen dimension height |
Reimplemented from io.agora.streaming.StreamingKit.
void io.agora.streaming.internal.StreamingKitImpl.stopScreenCapture | ( | ) |
stop screen capture for android
none |
Reimplemented from io.agora.streaming.StreamingKit.