java.lang.Object | |
↳ | com.amazonaws.ivs.broadcast.BroadcastSession.Listener |
Provide a listener to receive status updates and errors from the SDK. Updates will be run on arbitrary threads and not the main thread.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Listener() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
onAudioStats(double peak, double rms)
Periodically called with audio peak and rms in dBFS.
| ||||||||||
void |
onBroadcastQualityChanged(double quality)
A number between 0 and 1 that represents the quality of the stream based on bitrate minimum and maximum provided
on session configuration.
| ||||||||||
void |
onDeviceAdded(Device.Descriptor descriptor)
Indicates that a device has become available
| ||||||||||
void |
onDeviceRemoved(Device.Descriptor descriptor)
Indicates that a device has become unavailable
| ||||||||||
abstract void |
onError(BroadcastException exception)
Indicates that an error occurred.
| ||||||||||
void |
onNetworkHealthChanged(double health)
A number between 0 and 1 that represents the current health of the network.
| ||||||||||
abstract void |
onStateChanged(BroadcastSession.State state)
Indicates that the broadcast state changed.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Periodically called with audio peak and rms in dBFS. Range is -100 (silent) to 0.
peak | Audio Peak over the time period |
---|---|
rms | Audio RMS over the time period |
A number between 0 and 1 that represents the quality of the stream based on bitrate minimum and maximum provided on session configuration. 0 means the stream is at the lowest possible quality, or streaming is not possible at all. 1 means the bitrate is near the maximum allowed.
quality | The quality of the stream |
---|
Indicates that a device has become available
descriptor | the device's descriptor |
---|
Indicates that a device has become unavailable
descriptor | the device's descriptor. This may not contain specific hardware information other than IDs. |
---|
Indicates that an error occurred. Errors may or may not be fatal and will be marked
as such. In the case of a fatal error the broadcast session moves into
DISCONNECTED
state.
exception | exception object with information for the error that occurred. |
---|
A number between 0 and 1 that represents the current health of the network. 0 means the network is struggling to keep up and the broadcast may be experiencing latency spikes. The SDK may also reduce the quality of the broadcast on low values in order to keep it stable, depending on the minimum allowed bitrate in the broadcast configuration. A value of 1 means the network is easily able to keep up with the current demand and the SDK will be trying to increase the broadcast quality over time, depending on the maximum allowed bitrate. Lower values like 0.5 are not necessarily bad, it just means the network is being saturated, but it is still able to keep up.
health | The instantaneous health of the network |
---|
Indicates that the broadcast state changed.
state | current broadcast state |
---|