Receiving Kurento Media Server stream in Android WebView

191 views
Skip to first unread message

alessandro...@gmail.com

unread,
Jan 29, 2016, 12:07:03 PM1/29/16
to kurento

I am trying the Kurento one to many video call example (this one) where a Raspberry Pi sends a stream to the KMS using uv4l. I am trying to view the stream on an Android app using a WebView. I used a custom WebViewClient to avoid the SSL certificate error. However, when the hardware acceleration is enabled, a green rectangle is displayed instead of the video, and when the acceleration is disabled, a spinning wheel is displayed. However, the audio is received correctly.

Logcat displays the following messages:

[WARNING:webrtcsession.cc(1719)] Candidate has unknown component: Cand[1:2:udp:2013266430:IP:PORT:local::0::] for content: audio

[WARNING:srtpfilter.cc(585)] Failed to unprotect SRTP packet, err=9

[ERROR:channel.cc(666)] Failed to unprotect video RTP packet: size=1133, seqnum=23250, SSRC=1884862060

The code I use for the WebView is the following.


    WebView displayWebView = (WebView) rootView.findViewById(R.id.displayWebView);
    WebSettings webSettings = displayWebView.getSettings();
    webSettings.setJavaScriptEnabled(true);
    webSettings.setUseWideViewPort(true);
    webSettings.setLoadWithOverviewMode(true);

    displayWebView.setWebViewClient(new CustomWebViewClient());

    displayWebView.loadUrl("https://IP:PORT/"); // server running KMS

The code for CustomWebViewClient is the following.


private class CustomWebViewClient extends WebViewClient {

    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        view.loadUrl(url);
        return true;
    }

    @Override
    public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
        Log.d(TAG, "Ignoring SSL certificate error...");
        handler.proceed();
    }
}

I tested the app on phones running Lollipop. I guess it is something related to the WebView, since opening the page on desktop PC works perferctly. Any help?

Ivan Gracia

unread,
Jan 30, 2016, 2:57:04 AM1/30/16
to kurento
Perhaps it's something with that IPv6 candidate? Try disabling IPv6 I'm your KMS, so that candidate is not generated.

That's just a guess from that error you are getting, in any case, as I have no experience in webview, but it would be great to get that working for you!


--
You received this message because you are subscribed to the Google Groups "kurento" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kurento+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages