I have a full path of an audio file, for example
/Volumes/Transcend/Music/Eric Clapton/Journeyman/01 Pretending.m4a
I want to load the selected file into an audio player and play the song. But I don't know how to get file data from the full path. I don't want to use a file input and get the user to select one file, the point of the app is to ask for an overarching music directory, then list the artists/albums and songs etc. So I know the path but can't figure out what I need to play the song.
I have a new Audio()
object, and obviously loading in the full path doesn't work.
Any help appreciated.
EDIT: This is an electron app I'm writing for Mac desktop. the files will be stored locally on the user's machine.