readSoundInfo() returns null on JS target
Closed this issue · 1 comments
jfbilodeau commented
On the JS target, resourcesVfs["sound.mp3"].readSoundInfo()
returns null but works fine on JVM. Please find attached a sample file that loads fine on JVM but fails on JS.
Here's the full code that fails (just in case it's something else):
resourcesVfs["speech/"].list().collect {
if (it.extension == "mp3") {
val fileName = it.baseNameWithoutExtension
val info = it.readSoundInfo()
val duration = info!!.duration
resources.speechDuration[fileName] = duration
}
}
jfbilodeau commented
Thanks for the prompt fix. Much appreciated!