streaming-android
streaming-android copied to clipboard
App Crashes when subscribing a stream if it is not published.
Hi! So i am facing this issue for about a week now. When i open the subscribe activity App Crashes if a stream is not published yet. How can I resolve this issue. I don't get any logs or a specific error. However if i publish the stream before opening the activity everything works fine.
When there is no stream published stream.client java.lang.NullPointerException
my code
configuration = new R5Configuration(R5StreamProtocol.RTSP, UrlManager.R5_CONFIGURATION_URL, 8554, "live", 1.0f);
configuration.setLicenseKey(UrlManager.R5_LICENCE_KEY);
stream = new R5Stream(new R5Connection(configuration));
stream.client = this;
stream.setListener(this);
r5ConnectionEvent = R5ConnectionEvent.CONNECTED;
// stream.audioController = new R5AudioController();
// stream.audioController.sampleRate = 44100;
Log.d("Subscriber", ":onConnectionEvent " + r5ConnectionEvent.message);
videoView.showDebugView(true);
stream.setLogLevel(R5Stream.LOG_LEVEL_DEBUG);
videoView.attachStream(stream);
stream.play("####");