Clearly, AVFoundation (and Quicktime X) can demux and play properly encoded .ts
containers, because .ts
containers underly HTTPS live streaming.
You can actually create AVURLAssets directly from the underlying ts files, and play these directly, very similarly to the way you would play a mov or mp4 file.
There is some overhead for each ts file, so your best bet is to simply cat the files into one large ts file (based on your m3u8's contents), and play that large file.
There are a couple of gotcha's: AVCompositions constructed using ts file based AVAssets are memory hungry, so avoid AVCompositions apart from small files. You cannot use ts file based AVAssets in a reference movie.