This is a great start. works like a charm.
Would it be possible to only list files that the swf can play ?
Yes. But then, if we add playlist functionality you wouldnt be able to work with those files for playback on another device.
I have added an error message as a response to unplayable files instead, I hope that helps.