title: Exoplayer 2: Playing mp4 from cacheDir
body: <p>I am downloading mp4 from server to cacheDir. Later I want to play this video using Exoplayer. But I am unable to do so.</p>
  
  <p>I used following for playing server Url: (It worked fine)</p>
  
  <pre><code>extractorsFactory = new DefaultExtractorsFactory();
  MediaSource mediaSource = new ExtractorMediaSource(Uri.parse(videoURL),
      cacheDataourceFactory, extractorsFactory, null, null);
  </code></pre>
  
  <p>Local url from cacheDir: (not working)</p>
  
  <pre><code>File file = new File(context.getApplicationContext().getCacheDir(), "/MP4/test.mp4");
  extractorsFactory = new DefaultExtractorsFactory();
  MediaSource mediaSource = new ExtractorMediaSource(Uri.parse(file.toString(), 
      cacheDataourceFactory, extractorsFactory, null, null);
  </code></pre>