I'm coding a small audio player with a waveform (with wavesurfer.js) in droidscript.
A little trouble occurs when using listFolder(), as it returns filename(s) yet wavesurfer.js needs a file/blob object to generate a waveform, like <input type='file'> produces.
In chrome, one can call File(filepath), but in droidscript it is not supported.
Does anyone have any ideas / thoughts on solving this?
Thanks !
var file = new File(["foo"], "foo.txt", {
type: "text/plain",
}); list = app.ListFolder( fullPath, '.mp3',null,"fullpath");
var count = 0;
//for (audiotrack in list){
// var audiotrack = File.createFromFileName(list[0]);
alert(list[0])
audiodata = app.ReadFile(list[0], 'base64');
alert(audiodata);