README.md in m3u8-0.1.2 vs README.md in m3u8-0.1.3

- old
+ new

@@ -1,10 +1,11 @@ [![Gem Version](https://badge.fury.io/rb/m3u8.svg)](http://badge.fury.io/rb/m3u8) [![Build Status](https://travis-ci.org/sethdeckard/m3u8.svg?branch=master)](https://travis-ci.org/sethdeckard/m3u8) [![Coverage Status](https://coveralls.io/repos/sethdeckard/m3u8/badge.png)](https://coveralls.io/r/sethdeckard/m3u8) [![Code Climate](https://codeclimate.com/github/sethdeckard/m3u8/badges/gpa.svg)](https://codeclimate.com/github/sethdeckard/m3u8) [![Dependency Status](https://gemnasium.com/sethdeckard/m3u8.svg)](https://gemnasium.com/sethdeckard/m3u8) +[![security](https://hakiri.io/github/sethdeckard/m3u8/master.svg)](https://hakiri.io/github/sethdeckard/m3u8/master) # m3u8 m3u8 provides generation of m3u8 playlists used the [HTTP Live Streaming](https://developer.apple.com/library/ios/documentation/networkinginternet/conceptual/streamingmediaguide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008332-CH1-SW1) (HLS) specification created by Apple. This is useful if you wish to generate m3u8 playlists on the fly in your web application (to integrate authentication, do something custom, etc) while of course serving up the actual MPEG transport stream files (.ts) from a CDN. You could also use m3u8 to generate playlist files as part of an encoding pipeline. ## Installation @@ -44,10 +45,18 @@ #specify options for playlist, these are ignored if playlist becomes a master playlist (child playlist added): options = { :version => 1, :cache => false, :target => 12, :sequence => 1} playlist = M3u8::Playlist.new options + #You can pass an IO object to the write method + require 'tempfile' + f = Tempfile.new 'test' + playlist.write f + + #You can also access the playlist as a string + playlist.to_s + #values for :audio (Codec name) #aac-lc, he-aac, mp3 #values for :profile (H.264 Profile) #baseline, main, high @@ -60,14 +69,15 @@ ## Features * Distinction between segment and master playlists are handled automatically (no need to use a different class) * Automatically generates the audio/video codec string based on names and options you are familar with. * Provides validation of input when adding playlists or segments. * Allows all options to be configured on a playlist (caching, version, etc.) -* Can write playlist to StringIO/File or to_s. +* Can write playlist to an IO object (StringIO/File, etc) or access string via to_s. ## Contributing 1. Fork it ( https://github.com/sethdeckard/m3u8/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) -3. Commit your changes (`git commit -am 'Add some feature'`) -4. Push to the branch (`git push origin my-new-feature`) -5. Create a new Pull Request +3. Run the specs, make sure they pass and that new features are covered +4. Commit your changes (`git commit -am 'Add some feature'`) +5. Push to the branch (`git push origin my-new-feature`) +6. Create a new Pull Request