There is a new release of the m3u8 gem available that includes support for EXT-X-MEDIA attributes. This extends the library to support features such as subtitles, closed captions, and alternate audio/video in master playlists. Several fixes and improvements have also been included from contributors recently and it is nice to see there is some interest in the project.

EXT-X-MEDIA is handled through the new MediaItem class:

hash = { type: 'AUDIO', group_id: 'audio-lo', language: 'fre',
         assoc_language: 'spoken', name: 'Francais', autoselect: true,
         default: false, forced: true, uri: 'frelo/prog_index.m3u8' }
item =

New attributes were also added to PlaylistItem (video, audio, subtitles, and closed_captions) to fully support EXT-X-MEDIA. These values will reference EXT-X-MEDIA tags with a GROUP-ID attribute of the same value. This is how the client knows what resource is available with each stream.

hash = { codecs: 'avc', bandwidth: 540000, playlist: 'lo/prog_index.m3u8',
         audio: 'audio-lo' }
item =

I have not included any validation with these new features because my intent is to overhaul the current validation logic once the all of the tags and attributes from the HLS spec are implemented.