class M3U8::MapItem
- M3U8::MapItem
- Reference
- Object
Overview
MapItem represents a EXT-X-MAP tag which specifies how to obtain the Media Initialization Section
Included Modules
- M3U8::Concern
Extended Modules
- M3U8::Concern
Defined in:
m3u8/map_item.crConstructors
-
.new(params : NamedTuple = NamedTuple.new)
-
.new(uri : String, byterange = nil)
uri = "frelo/prog_index.m3u8" byterange = "4500@600" MapItem.new(uri) MapItem.new(uri, byterange) MapItem.new(uri: uri) MapItem.new(uri: uri, byterange: byterange)
Class Method Summary
-
.parse(text)
text = %(#EXT-X-MAP:URI="frelo/prog_index.m3u8",BYTERANGE="4500@600") MapItem.parse(text) # => #<M3U8::MapItem......>
Instance Method Summary
- #byterange : ByteRange
- #byterange=(byterange : ByteRange)
-
#to_s
options = { uri: "frelo/prog_index.m3u8", byterange: "4500@600", } MapItem.new(options).to_s # => %(#EXT-X-MAP:URI="frelo/prog_index.m3u8",BYTERANGE="4500@600")
- #uri : String
- #uri=(uri : String)
Constructor Detail
def self.new(params : NamedTuple = NamedTuple.new)
#
options = {
uri: "frelo/prog_index.m3u8",
byterange: {
length: 4500,
start: 600,
},
}
MapItem.new(options)
options = {
uri: "frelo/prog_index.m3u8",
byterange: ByteRange.new(length: 4500, start: 600),
}
MapItem.new(options)
options = {
uri: "frelo/prog_index.m3u8",
byterange: "4500@600",
}
MapItem.new(options)
def self.new(uri : String, byterange = nil)
#
uri = "frelo/prog_index.m3u8"
byterange = "4500@600"
MapItem.new(uri)
MapItem.new(uri, byterange)
MapItem.new(uri: uri)
MapItem.new(uri: uri, byterange: byterange)
Class Method Detail
def self.parse(text)
#
text = %(#EXT-X-MAP:URI="frelo/prog_index.m3u8",BYTERANGE="4500@600")
MapItem.parse(text)
# => #<M3U8::MapItem......>
Instance Method Detail
def to_s
#
options = {
uri: "frelo/prog_index.m3u8",
byterange: "4500@600",
}
MapItem.new(options).to_s
# => %(#EXT-X-MAP:URI="frelo/prog_index.m3u8",BYTERANGE="4500@600")