Closed sarsamurmu closed 11 months ago
Hello! 👋 Thanks for logging this issue. Please remember we are all volunteers here, so some patience may be required before we can get to the issue. Also remember that the fastest way to get resolution on an issue is to propose a change directly, https://github.com/ankidroid/Anki-Android/wiki/Contributing
The file can be loaded now, because the card content is served using nano http server, so anything in collection.media
can be accessed using fetch
.
Thanks for fixing the issue :)
Is it supported in the latest alpha version? Or is it not yet released?
It is supported in latest alpha version.
Nice! Thanks again.
The feature works fine. But it looks like it doesn't work when you're not connected to any Wi-Fi network. Maybe starting the server in localhost (127.0.0.1) would solve this.
It looks like the problem is not caused by not starting on 127.0.0.1
Apparantly the main thread is getting blocked somehow when not connected to network. Whenever I tap a deck to start reviewing it takes almost 10-15 seconds after the reviewer screen shows up
For some reason the problem vanished, I will let you know if the problem appears again
There have been a few problems @sarsamurmu (and @krmanik ) with regards to the new "AnkIDroid now runs it's own client/server architecture internally" setup when network is unavailable or changing or something. I just read through them and I haven't seen any conclusive resolution about the same. So please keep a close close eye on that and any sort of testing you can do (turning different networks like cellular, wifi, vpn or not, off and on, app cold start / hot start) and checking status to see if you can get a solid reproduction would be great
Is your feature request related to a problem? Please describe. I tried to load media in JS using the
fetch()
method. But it gives error thatfile://
protocol is not valid infetch()
Describe the solution you'd like Maybe a new AnkiDroid JS API could solve that.
Describe alternatives you've considered I can embed the data I need in the card itself but it's would break functionality of addons in Anki desktop.
Additional context https://www.reddit.com/r/medicalschoolanki/comments/17xfqkl/image_occlusion_enhanced_one_by_one_incremental/ This script internally uses
fetch()
to load the SVG in a card. Without the SVG the script is basically useless.