cordova-plugin-ionic-webview icon indicating copy to clipboard operation
cordova-plugin-ionic-webview copied to clipboard

URL.createObjectURL not working

Open jdnichollsc opened this issue 4 years ago • 10 comments

Hello guys, We can't get the url from an audio blob object on Android, also there's issues with images: https://stackoverflow.com/questions/55007694/ionic-wont-show-blob-images

Any help is really appreciated 👍

jdnichollsc avatar Nov 20 '19 05:11 jdnichollsc

Android Log:

GET blob:http://localhost/1a47cf8f-e34e-4605-8875-c0b1fed95215 net::ERR_REQUEST_RANGE_NOT_SATISFIABLE

Angular Code:

const url = URL.createObjectURL(blob);
return this.sanitizer.bypassSecurityTrustResourceUrl(url);

jdnichollsc avatar Nov 20 '19 20:11 jdnichollsc

We are running into the same issue

ajbraudev avatar Nov 27 '19 00:11 ajbraudev

Do you guys found any workaround?

fgilio avatar Dec 15 '19 18:12 fgilio

Olá, venho usando api audio web e resolvi esse erro chamando o contexto de áudio antes de criar o objeto de áudio. Me parece que para arquivos de imagens é o mesmo problema no contexto. veja se "const url = window.URL.createObjectURL(blob);" não resolve. Neste caso o contexto seria a palavra "window". Além disso você deve preencher o objeto antes de dar return.

Capitaoneo3 avatar Jan 11 '20 03:01 Capitaoneo3

^ I come using api audio web and solved this error by or audio context before breeding or audio object. It seems to me that for archives of images, or memory problem, not context. we use "const url = window.URL.createObjectURL (blob);" Don't solve. This case or context would be called "window". In addition, you must fill the object before giving return.

tryhardest avatar Feb 07 '20 01:02 tryhardest

@fgilio @ajbraudev @jdnichollsc did any of you guys resolve this?

tryhardest avatar Feb 07 '20 04:02 tryhardest

@fgilio @ajbraudev @jdnichollsc did any of you guys resolve this?

Nope, sorry :/

fgilio avatar Feb 07 '20 11:02 fgilio

Hello Ionic team, any updates with this crucial bug?

jdnichollsc avatar Jun 16 '21 18:06 jdnichollsc

Hello Ionic team, any updates with this crucial bug?

Sadly, I don't think there'll be much effort here considering Capacitor

fgilio avatar Jun 16 '21 19:06 fgilio

Hey guys, facing the same issue on iOS.. On iOS, I tracked down to capacitor WKWebView implementation. Still haven't touched on Android, but I believe the fix should someway how to reproduce the same behaviour I did on iOS to have this working on both platforms.

Currently, have a working solution on my side but working on creating a mergeable change to PR into Capacitor. Changes can be followed on the capacitor project: https://github.com/ionic-team/capacitor/issues/5478

gwdp avatar Mar 02 '22 19:03 gwdp