"TheEndless" wrote:
I still maintain that that's not the correct usage of the M3U8 format and is actually an M3U playlist. Using an M3U8 extension just confuses the issue. Since you said you had already put it into a JSON format, it makes a lot more sense to go that route, and simplifies that parsing code that belltown provided down to:
indexList = ParseJson(jsonPlaylistFile)
The only difference between an M3U and an M3U8 playlist is the encoding; an M3U file is encoded as US-ASCII (or Latin-1 or WIndows-1252 depending on which reference you're using), whereas an M3U8 file is encoded in UTF-8.
A "Basic" M3U playlist (or M3U8 playlist if UTF-8 encoded) only contains a list of media resources, and maybe comments or blank lines.
An "Extended" M3U playlist (or M3U8 playlist if UTF-8 encoded), starts with the #EXTM3U tag to signify use of the extended format, and contains other tags, e.g. #EXTINF to provide extended information about a resource, and the resource paths themselves.
The HTTP Live Streaming specification chose to use the "Extended" playlist format for its implementation, for example to define media playlists containing a list of media segments. The HLS spec states that playlist files must be encoded in UTF-8 (so most files use the .m3u8 extension, although the .m3u file extension is allowed for compatibility).
The HLS spec is just one usage of extended M3U8 playlists (and possibly the most common usage -- and who knows, perhaps even the only usage so far on the Roku platform). It is not necessarily the only way to use extended M3U8 playlists. I would contend that it's equally "correct" to use extended M3U8 playlists for any type of media resource, whether they are mp3 audio resources (which is what they were originally designed for), or video file resources (e.g. a playlist of mp4 videos), or a list of HLS media playlists (as used in mrattitude's case).
And since someone's obviously already come up with an M3U8 implementation used as a playlist of separate HLS resources, and mrattitude wants to access that from a Roku channel, I don't see anything incorrect about that.
Still, I don't think that any form of M3U8 playlists are necessarily the most appropriate way to define a list of media items on the Roku platform, and I don't quite understand mrattitude's statement that, "The JSON method worked on a small sample of links (10) BUT is not appropriate for larger lists, especially if the links are prone to change, a playlist is exactly what is required." It shouldn't make any difference what format you're using for a playlist (Json, Xml, M3U/M3U8, PLS, SMIL, plain text, etc. etc.) Whatever format you use, you have some code (format-dependent) that parses the playlist to extract the list of media items, then some other code (format-independent) to select and play them. It shouldn't make any difference whether there are 10 items or 10,000 items. As far as the links being "prone to change", again it shouldn't make any difference what format you use, you'll still have to update your playlist (the Json, M3U8, whatever) whenever the links change.