class M3u8::SegmentItem
SegmentItem
represents EXTINF attributes with the URI that follows, optionally allowing an EXT-X-BYTERANGE tag to be set.
Attributes
byterange[RW]
comment[RW]
duration[RW]
program_date_time[RW]
segment[RW]
Public Class Methods
new(params = {})
click to toggle source
# File lib/m3u8/segment_item.rb, line 9 def initialize(params = {}) intialize_with_byterange(params) end
Public Instance Methods
to_s()
click to toggle source
# File lib/m3u8/segment_item.rb, line 13 def to_s date = "#{program_date_time}\n" unless program_date_time.nil? "#EXTINF:#{duration},#{comment}#{byterange_format}\n#{date}#{segment}" end
Private Instance Methods
byterange_format()
click to toggle source
# File lib/m3u8/segment_item.rb, line 20 def byterange_format return if byterange.nil? "\n#EXT-X-BYTERANGE:#{byterange}" end