You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I call fetch in Js to get media from capacitor://localhost/assets/my-audio.mp3, it returns status 0. Dig into the code I can see media files are handled in a different way:
When I remove "mp3" ext form the media list, it works fine. Is there a way that the WebView handler return status 200 in this case? If not, what's the best way for me to monkey patch this ext list to make my code work?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When I call
fetch
in Js to get media fromcapacitor://localhost/assets/my-audio.mp3
, it returns status 0. Dig into the code I can see media files are handled in a different way:https://github.com/ionic-team/capacitor/blob/f4e7f19f186e334404b2cd0decc3205e57bf4469/ios/Capacitor/Capacitor/WebViewAssetHandler.swift#LL67C35-L67C38
When I remove "mp3" ext form the media list, it works fine. Is there a way that the WebView handler return status 200 in this case? If not, what's the best way for me to monkey patch this ext list to make my code work?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions