Video Local working on handmade packaging but not with Package Native Binary


#1

Hi everyone !

I run in some trouble while trying to deploy my app

In my app i can do lot of stuff, but here the problems come with a feature that download assets to be used later on for offline display.

So the tricky part is the local videos:

if I create the apk by myself using the cli the local videos work very well

if I use the Ionicframework Dashboard, build and package my app, when i try to display my video i get an error telling me:
not allowed to load local resources

I’ve tried different workaround:

Change the path of the video with normalizeURL to remove the file:///
Remove the file:/// with replace
Read Data URL
downgrade to cordova-plugin-ionic-webview@1.2.1

I used the exact same command that are showed on the IonicFramework Dashboard Build Console:

npm install --quiet --no-optional
npm run build
cordova platform add android --no-fetch
cordova build android --release -- --keystore=android.keystore --storePassword=***** --alias=*** --password=*****

(Of course i replaced what needed to be replaced)

then i used adb to install the apk on my phone

Ionic Info:

Ionic:

   ionic (Ionic CLI)  : 4.1.2
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.1.6

Cordova:

   cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms     : android 7.0.0, browser 5.0.3, ios 4.5.4
   Cordova Plugins       : cordova-plugin-ionic 3.1.3, cordova-plugin-ionic-webview 1.2.1, (and 13 other plugins)

System:

   Android SDK Tools : 26.1.1 (/Users/maniac/Library/Android/sdk)
   ios-deploy        : 2.0.0
   NodeJS            : v10.1.0 (/usr/local/Cellar/node/10.1.0/bin/node)
   npm               : 5.10.0
   OS                : macOS High Sierra
   Xcode             : Xcode 10.0 Build version 10A255

Would be great if someone had any clue about how to make the building process the same or how to take care of the “Not allowed to load local ressources” error

Thanks for the help provided