title: Location of local files in cordova
body: <p>I'm using a video player which accepts an absolute path as parameter. If I put my video in the <code>www</code> folder, and use this code:</p>
  
  <pre><code>var path = cordova.file.applicationDirectory + 'www/myvideo.mp4';
  GoogleVRPlayer.playVideo(path);
  </code></pre>
  
  <p>the video starts to play. The logs tell me the video is in:</p>
  
  <pre><code>file:///var/containers/Bundle/Application/F4D23EDE-...-...-...-.../appname.app/www/myvideo.mp4
  </code></pre>
  
  <p>However, I don't want my video to be "baked in" the app: I want users to download it first. For the download, I use <code>cordova-plugin-file-transfer</code>:</p>
  
  <pre><code>download()
      {
          this.fileTransfer.download(
              this.uri,
              'cdvfile://localhost/persistent/path/to/downloads/',
              function(entry) {
                  console.log("download complete: " + entry.toURL());
              },
              function(error) {
                  console.log("download error source " + error.source);
                  console.log("download error target " + error.target);
                  console.log("download error code" + error.code);
              },
              false,
              {
                  headers: {
                      "Authorization": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=="
                  }
              }
          );
      }
  </code></pre>
  
  <p>This works fine too. The video downloads, and the log tells me the video is stored in</p>
  
  <pre><code>file:///var/mobile/Containers/Data/Application/785BC9AF-...-...-...-.../Documents/path/to/downloads
  </code></pre>
  
  <p>Notice that the ID after "Application" is different for both files. Also, <code>appname.app</code> is not present in the URL of the downloaded file. But the video must be part of the app, because the app size increases after downloading the video...</p>
  
  <p>How can I make the plugin download the file in the <code>www</code> folder, so I can play it? Or, which path should I use in the player so I can play the video downloaded in <code>path/to/downloads</code>?</p>
  
  <p><strong>Update 1:</strong> added extra info</p>
  
  <p><strong>Update 2:</strong></p>
  
  <p>I've changed the first path to</p>
  
  <p><code>cordova.file.documentsDirectory + 'path/to/downloads/myvideo.mp4';</code>.</p>
  
  <p>Console tells me the video is stored in:
  <code>file:///var/mobile/Containers/Data/Application/A9B73639-...-...-...-.../Documents/path/to/downloads</code></p>
  
  <p>and the video it's trying to play is:
  <code>file:///var/mobile/Containers/Data/Application/A9B73639-...-...-...-.../Documents/path/to/downloads/myvideo.mp4</code></p>
  
  <p>However, the player doesn't play the file: <code>Failed to load video: The operation could not be completed</code></p>