My App has a WebView which loads a simple html. However, this html links to a rtsp live video stream and the WebView isn't able to load it, instead it returns a "Web Page Not Available" message. When I open the rtsp link in the native Android browser, it loads and works fine so I know it's not the video stream being incompatible. Is there something within WebView which can be enabled to allow the rtsp video stream to be played?
Thanks!
I used this code:
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
if (url.contains("rtsp")) {
Uri uri = Uri.parse(url);
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
}
return true;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With