breautek commented on issue #602:
URL: 
https://github.com/apache/cordova-plugin-file/issues/602#issuecomment-1705090205

   If you're expecting a `cdvfile://` path, that's not really supported anymore 
due to CORs. I believe `cdvfile://` is still used on file-based hosted app 
content, but on scheme/http (WebViewAssetLoader) hosted app content, it retains 
the origin and have the app route to the local path.
   
   Normally the path 
`https://<app-host>/__cdvfile_sdcard__/Movies/PR-DC/DWK_6b62dfc0-83c8-4294-9065-d1080bab8a1d.mp4`
 is handled by the WebViewAssetLoader, which parses the `__cdvfile_sdcard_` 
part to know where to redirect the rest of the path to the local filesystem.
   
   However you're using a remote web resource as your app, so you're not using 
the `WebViewAssetLoader`, which isn't really a supported configuration. 
Additionally, your remote web server won't have access to local device files to 
actually serve that content. The app needs to be hosted through the locally 
through the WebViewAssetLoader (which means your app web assets like your 
`index.html` and JS, etc needs to be on the local device, not served remotely) 
for the cdv file work.
   
   But if you're using external storage mediums (e.g. `/storage/emulated/0/`, 
there are a [several other 
issues](https://github.com/apache/cordova-plugin-file#androids-external-storage-quirks)
 with using a file-based API due to Android's scoped storage mechanism). So, 
I'd also consider using a [media-store 
plugin](https://www.npmjs.com/search?q=ecosystem%3Acordova%20storage%20access%20framework),
 although I'm not sure if it will solve all of your issues given your current 
environment.
   
   Closing as won't fix.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to