[Bug] Audio files fail to load randomly on Android


[ ] iOS
[x] Android

Obsidian Mobile version: v1.4.1
Phone used: One Plus 8T (Android 13)

I’m building a custom dvjs view that treats some of my files in my vault as music that I can retrieve on the fly using the power of dataview.

Some of these files have a mp3:: ![[my_audio.mp3]] property that is embedded in the grid built by the view (with a call to grid.insertAdjacentHTML). This works perfectly on the desktop version (tested on Windows and Linux) and on the iPad app but when I use it on Android, the results are unpredictable and many audios don’t load, or more precisely, they load but their timecodes are very far from the length of their original files (while others manage to load successfully).

For example, it tells me that an audio file is 9 minutes long when in fact it is only 2.50 minutes long. When I try to play it, sometimes it doesn’t play at all, but most of the time it plays until it reaches a point where it stops and can’t resume.

I tried several js techniques to “force” the audio to load a new src but none of them solved the problem. I thought it might be because too many files are loaded simultaneously but even trying to reload them one by one doesn’t work either.

I really don’t understand this behavior. I can make a minimal reproducible example in a new vault if you need one

1 Like

Could you please look into this? I’m experiencing this as well.

No plugins no nothing. Vanilla obsidian and mp3 files.

1 Like

I’ve learned that the mobile version of Obsidian was made with capacitorjs and there is an issue (closed but not solved) that reports this exact problem on android builds: bug: Failed to load resource: net::ERR_FAILED on multiple audio streams · Issue #5839 · ionic-team/capacitor · GitHub.

Since it describes exactly the same weird behavior (some files load while others don’t for no apparent reason), I’m pretty sure it’s related to this problem and it means that the Obsidian team can’t do much unfortunately…