I had a similar problem. For me, this was that for some streams, basic HTTP authentication was required (streams over https). Although I used:
SharedPreferences shared_prefs = getApplicationContext().getSharedPreferences("***_prefs", 0);
final String username = shared_prefs.getString("username", null);
final String password = shared_prefs.getString("password", null);
Authenticator.setDefault(new Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password.toCharArray());
}
});
video_view.setVideoURI(Uri.parse(enclosure_url));
setVideoURI. HTTP- :
if (enclosure_url.contains("https")) {
SharedPreferences shared_prefs = getApplicationContext().getSharedPreferences("***_prefs", 0);
final String username = shared_prefs.getString("username", null);
final String password = shared_prefs.getString("password", null);
enclosure_url = enclosure_url.replaceFirst("https://", "https://"+username+":"+password+"@");
}
video_view.setVideoURI(Uri.parse(enclosure_url));