diff --git a/AnkiDroid/src/main/java/com/ichi2/anki/cardviewer/SoundTagPlayer.kt b/AnkiDroid/src/main/java/com/ichi2/anki/cardviewer/SoundTagPlayer.kt index 5db798cecfae..03f7828c89e0 100644 --- a/AnkiDroid/src/main/java/com/ichi2/anki/cardviewer/SoundTagPlayer.kt +++ b/AnkiDroid/src/main/java/com/ichi2/anki/cardviewer/SoundTagPlayer.kt @@ -150,7 +150,11 @@ class SoundTagPlayer(private val soundUriBase: String) { * @throws java.io.IOException: Prepare failed.: status=0x1 */ private fun MediaPlayer.awaitSetDataSource(uri: Uri) { - setDataSource(AnkiDroidApp.instance.applicationContext, uri) + uri.fragment?.let { fragment -> + setDataSource("${uri.path}#$fragment") + } ?: { + setDataSource(uri.path) + } prepare() }