README.md in m3u8-0.5.0 vs README.md in m3u8-0.5.1
- old
+ new
@@ -32,13 +32,12 @@
playlist = M3u8::Playlist.new
```
Create a new playlist item with options:
```ruby
-options = { program_id: 1, width: 1920, height: 1080, width: 1920, height: 1080,
- profile: 'high', level: 4.1, audio_codec: 'aac-lc', bandwidth: 540,
- playlist: 'test.url' }
+options = { width: 1920, height: 1080, profile: 'high', level: 4.1,
+ audio_codec: 'aac-lc', bandwidth: 540, uri: 'test.url' }
item = M3u8::PlaylistItem.new options
playlist.items.push item
```
Add alternate audio, camera angles, closed captions and subtitles by creating MediaItem instances and adding them to the Playlist:
@@ -72,12 +71,12 @@
```
M3u8::Writer is the class that handles generating the playlist output.
Alternatively you can set codecs rather than having it generated automatically:
```ruby
-options = { program_id: 1, width: 1920, height: 1080, width: 1920, height: 1080,
- codecs: 'avc1.66.30,mp4a.40.2', bandwidth: 540, playlist: 'test.url' }
+options = { width: 1920, height: 1080, codecs: 'avc1.66.30,mp4a.40.2',
+ bandwidth: 540, uri: 'test.url' }
item = M3u8::PlaylistItem.new options
```
Just get the codec string for custom use:
```ruby
options = { profile: 'baseline', level: 3.0, audio_codec: 'aac-lc' }
@@ -107,13 +106,12 @@
# @codecs="avc1.640028,mp4a.40.2", @bandwidth="5042000",
# @playlist="hls/1080-7mbps/1080-7mbps.m3u8">
```
Create a new playlist item with options:
```ruby
-options = { program_id: 1, width: 1920, height: 1080, width: 1920, height: 1080,
- profile: 'high', level: 4.1, audio_codec: 'aac-lc', bandwidth: 540,
- playlist: 'test.url' }
+options = { width: 1920, height: 1080, profile: 'high', level: 4.1,
+ audio_codec: 'aac-lc', bandwidth: 540, uri: 'test.url' }
item = M3u8::PlaylistItem.new options
#add it to the top of the playlist
playlist.items.insert 0, item
```
M3u8::Reader is the class handles parsing if you want more control over the process.
@@ -124,21 +122,20 @@
* Provides validation of input when adding playlists or segments.
* Allows all options to be configured on a playlist (caching, version, etc.)
* Supports I-Frames (Intra frames) and Byte Ranges in Segments.
* Supports subtitles, closed captions, alternate audio and video, and comments.
# Supports Session Data in master playlists.
+* Supports keys for encrypted media segments (EXT-X-KEY).
+* Supports EXT-X-DISCONTINUITY in media segments.
* Can write playlist to an IO object (StringIO/File, etc) or access string via to_s.
* Can read playlists into a model (Playlist and Items) from an IO object.
* Any tag or attribute supported by the object model is supported both parsing and generation of m3u8 playlists.
## Missing (but planned) Features
-* Support for encrypted segments.
* Validation of all attributes and their values to match the rules defined in the spec.
* Still missing support for a few tags and attributes.
## Contributing
-
-(Be sure to check to dev branch to make sure I'm not already working on it)
1. Fork it ( https://github.com/sethdeckard/m3u8/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Run the specs, make sure they pass and that new features are covered
4. Commit your changes (`git commit -am 'Add some feature'`)