Stream availability checking by name¶
Since build 1.1.0.28 it is possible to check if a stream with a given name is available on a server for playback, like WebSDK function Stream.available()
.
To check, do the following:
-
Create a separate
Stream
object with the stream name to check availability
code
-
Create a callback function to receive the stream availability flag and a possible error reason phrase
code
stream.setAvailableStreamCallback(new AvailableStreamCallback() { @Override public void on(boolean isAvailable, String info) { runOnUiThread(new Runnable() { @Override public void run() { mAvailableStreamStatusView.setText(String.valueOf(isAvailable)); mAvailableStreamInfoView.setText(info); } }); } });
-
Call
Stream.available()
method
code