Sha256: 99f36c83d2987c2cdbe29d97cc44ab73ab65a3283577add57c3849c9a42ea235
Contents?: true
Size: 539 Bytes
Versions: 7
Compression:
Stored size: 539 Bytes
Contents
module M3u8 # SegmentItem represents EXTINF attributes with the URI that follows, # optionally allowing an EXT-X-BYTERANGE tag to be set. class SegmentItem include M3u8 attr_accessor :duration, :segment, :comment, :byterange def initialize(params = {}) intialize_with_byterange(params) end def to_s "#EXTINF:#{duration},#{comment}#{byterange_format}\n#{segment}" end private def byterange_format return if byterange.nil? "\n#EXT-X-BYTERANGE:#{byterange}" end end end
Version data entries
7 entries across 7 versions & 1 rubygems