2014년 12월 2일 화요일

Playing mp3 files by setting player source


I am trying to set the source for a player to an mp3 file on my tablet but either get "Error 701: Unable to load <filename.mp3>" when I start the filepath with a "/" or get "Error 702: Unable to prepare ..." when I start the filepath with "file://". The file I am trying to play sounds fine when loaded into the app. I can read and write a text file to local storage from the app so I know access to read and write works ok. Does anyone know how to make this work please?

-- 

did you upload the file as asset into your app?
if yes, only use the filename, example: myFilename.mp3
in case it is available on the sd card of your device, you will need the full path to the file, which is something like this:
file:///mnt/sdcard/myDirectory/myFilename.pp3

--
The information provided here seems not to work Accessing Images and Sounds (App Inventor 2)

--
thank you for spotting this... hopefully this will be corrected soon...
@Josh?

@Nut: did my suggestion work for you?

--
Thanks a lot. I had not included the /mnt in the filepath. It works fine now.

--

댓글 없음:

댓글 쓰기