I am doing a podcast manager application for Firefox OS. So far I managed to download files and save them on the sdcard. For playback I am using MozActivity because I want the file to be played in an installed music player.
Here is the code for playback:
var activity = new MozActivity({
name: "open",
data: {
type: [
"audio/mpeg",
"audio/ogg",
"audio/mp4"
],
// here I pass the file blob
blob: data
}
});
The problem is that when I put the app in background to open another one, the playback stops and the music player is closed.
Another thing I would like to do, is when I play again a file that I did not finished listening, to resume the playback from the minute I left it.