8

I need to stream video over a local HTTPS server (of course to do some background DRM) in Android. The Android media player is then connecting to the local server, 'streaming' the video content to the screen.

It all works fine with a HTTP server but as soon as I enable SSL, the video player stops.

If i connect to the HTTPS server from outside my app using a browser, I get an SSL warning which i can ignore and then the video player starts.

Is there a way to disable the strict certificate handling for the media player module? I have seen a lot of posts on how to do this using my own HTTP connection, but nothing on how to do this for the media player.

Thanks!

UPDATE: Google for 'intranet certificate' or 'instant certificate' and you will find something that's supposed to work. Will try it out tomorrow and post the answer here.

KPK
  • 467
  • 3
  • 9
  • 1
    Can you include details on the specific SSL warning you're seeing when you use a browser? – P.T. Oct 19 '11 at 22:33
  • In the browser hits an untrusted site, it tells me the usual thing about this site does might be a security risk. And I have the options :Proceed anyway or cancel. Read some messages about how to enable that globally (big security risk, thus not possible): http://superuser.com/questions/27268/how-do-i-disable-the-warning-chrome-gives-if-a-security-certificate-is-not-trust. I Basically want to do the same but just add the certificate exception for my app - and without writing a derived HTTP client. – KPK Oct 19 '11 at 22:46
  • The MediaPlayer on Android < 3.2 does not support HTTPS connections :( – Kevin Parker Oct 25 '11 at 18:13
  • And DRM won't be available either: http://developer.android.com/reference/android/drm/package-summary.html – KPK Oct 25 '11 at 19:55

1 Answers1

0

here is the solution actually , to add this android:usesCleartextTraffic="true" to your manifest , so it allows connections to http as well ,

solution taken from :How to allow all Network connection types HTTP and HTTPS in Android (9) Pie?