title: Error in streaming a video from HTTPS url
body: <p>I have no problem in streaming a video in a normal http. 
  (example : <a href="http://www.mywebsite.com/myvideo.mp4" rel="nofollow">http://www.mywebsite.com/myvideo.mp4</a>)</p>
  
  <p>But when i change it into HTTPS. I have encounter an error
  (example : <a href="https://www.mywebsite.com/myvideo.mp4" rel="nofollow">https://www.mywebsite.com/myvideo.mp4</a>)</p>
  
  <p>Does anyone have tried this? Streaming a video with HTTPS link to a 3rd party APP. (asking a user which app will be use to play video, by passing the url/uri to the app in android)</p>
  
  <p>The current scenario is:</p>
  
  <p>1.) I have a link which is https</p>
  
  <p>2.) I have start an intent , and check all available video player installed in android phone ( i have currently installed vlc , mx
      player , videoplayer, built in OS player and others).</p>
  
  <p>3.) I try to choose any of those above but none of them works. ( it just prompt a message, saying "Player encounter an Error" which is a
      generic error. Im just trying to pass the URL / URI to the player).</p>
  
  <p>4.) Please take note, if i try to play it in the web browser everything works fine.</p>
  
  <p>5.) Please take note that again , I was able to stream http video, using same piece of code</p>
  
  <pre><code>String videoURL = "https://www.mywebsite.com/myvideo.mp4";
  Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(videoURL));
  intent.setDataAndType(Uri.parse(videoURL), "video/*");
  startActivity(intent);
  </code></pre>
  
  <p>In my manifest file, im using the default, except that i give permission to the internet.</p>
  
  <p>Im not sure if this is related or this can help but : I was able to buffer a HTTPS Audio FILE coming from same SERVER. Since android has a built in media player that supports wav &amp; mp3, im not asking the user to choose a media player, since it can support the above format. When i buffer the audio in the same server, i just issue below code. So everyting works well.</p>
  
  <pre><code>public HttpClient getNewHttpClient() {
      try {
          KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());
          trustStore.load(null, null);
  
          SSLSocketFactory sf = new MySSLSocketFactory(trustStore);
          sf.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
  
          HttpParams params = new BasicHttpParams();
          HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
          HttpProtocolParams.setContentCharset(params, HTTP.UTF_8);
  
          SchemeRegistry registry = new SchemeRegistry();
          registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
          registry.register(new Scheme("https", sf, 443));
  
          ClientConnectionManager ccm = new ThreadSafeClientConnManager(params, registry);
  
          return new DefaultHttpClient(ccm, params);
      } catch (Exception e) {
          return new DefaultHttpClient();
      }
  }
  </code></pre>
  
  <p>`</p>
  
  <p>But when it comes to playing video, im asking the user which APP he wants to play, cause the file might not be supported.</p>
  
  <p><strong>FIX</strong></p>
  
  <p><strong>It looks like , android has some problem in broken chain certificates, in order to fix this, you must fix your broken chain certificate. To check your certificate, simply go to ssllabs.com/ssltest/analyze.html?d=yourwebsite.com</strong></p>