streaming-android icon indicating copy to clipboard operation
streaming-android copied to clipboard

App Crashes when subscribing a stream if it is not published.

Open zainkhalid91 opened this issue 4 years ago • 1 comments

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.

zainkhalid91 avatar Apr 07 '20 09:04 zainkhalid91

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("####");

zainkhalid91 avatar Apr 23 '20 08:04 zainkhalid91