Class: M3Uzi::File
Instance Attribute Summary collapse
-
#byterange ⇒ Object
Returns the value of attribute byterange.
-
#byterange_offset ⇒ Object
Returns the value of attribute byterange_offset.
-
#description ⇒ Object
Returns the value of attribute description.
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#encryption_iv ⇒ Object
Returns the value of attribute encryption_iv.
-
#encryption_key_url ⇒ Object
Returns the value of attribute encryption_key_url.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
- #attribute_string ⇒ Object
- #format ⇒ Object
-
#initialize ⇒ File
constructor
Unsupported tags: PROGRAM-DATE-TIME, DISCONTINUITY, I-FRAMES-ONLY Autogenerated tags: EXTINF, BYTERANGE, KEY, VERSION, TARGETDURATION, ENDLIST.
Methods inherited from Item
Constructor Details
#initialize ⇒ File
Unsupported tags: PROGRAM-DATE-TIME, DISCONTINUITY, I-FRAMES-ONLY Autogenerated tags: EXTINF, BYTERANGE, KEY, VERSION, TARGETDURATION, ENDLIST
9 10 11 |
# File 'lib/m3uzi/file.rb', line 9 def initialize @encryption_key_url = :unset end |
Instance Attribute Details
#byterange ⇒ Object
Returns the value of attribute byterange.
4 5 6 |
# File 'lib/m3uzi/file.rb', line 4 def byterange @byterange end |
#byterange_offset ⇒ Object
Returns the value of attribute byterange_offset.
4 5 6 |
# File 'lib/m3uzi/file.rb', line 4 def byterange_offset @byterange_offset end |
#description ⇒ Object
Returns the value of attribute description.
4 5 6 |
# File 'lib/m3uzi/file.rb', line 4 def description @description end |
#duration ⇒ Object
Returns the value of attribute duration.
4 5 6 |
# File 'lib/m3uzi/file.rb', line 4 def duration @duration end |
#encryption_iv ⇒ Object
Returns the value of attribute encryption_iv.
4 5 6 |
# File 'lib/m3uzi/file.rb', line 4 def encryption_iv @encryption_iv end |
#encryption_key_url ⇒ Object
Returns the value of attribute encryption_key_url.
4 5 6 |
# File 'lib/m3uzi/file.rb', line 4 def encryption_key_url @encryption_key_url end |
#path ⇒ Object
Returns the value of attribute path.
4 5 6 |
# File 'lib/m3uzi/file.rb', line 4 def path @path end |
Instance Method Details
#attribute_string ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/m3uzi/file.rb', line 13 def attribute_string if duration.kind_of?(Float) "#{sprintf('%0.4f',duration)}," + description.to_s.gsub(/[\r\n]/,' ').strip else "#{duration.to_i.round}," + description.to_s.gsub(/[\r\n]/,' ').strip end end |
#format ⇒ Object
21 22 23 24 |
# File 'lib/m3uzi/file.rb', line 21 def format # Need to add key info if appropriate? "#EXTINF:#{attribute_string}\n#{path}" end |