class M3U8::DateRangeItem
- M3U8::DateRangeItem
- Reference
- Object
Overview
DateRangeItem represents a #EXT-X-DATERANGE tag
Included Modules
- M3U8::Concern
Extended Modules
- M3U8::Concern
Defined in:
m3u8/date_range_item.crConstructors
-
.new(params : NamedTuple = NamedTuple.new)
options = { id: "test_id", start_date: "2014-03-05T11:15:00Z", class_name: "test_class", end_date: "2014-03-05T11:16:00Z", duration: 60.1, planned_duration: 59.993, scte35_out: "0xFC002F0000000000FF0", scte35_in: "0xFC002F0000000000FF1", scte35_cmd: "0xFC002F0000000000FF2", end_on_next: true, client_attributes: {"X-CUSTOM" => 45.3}, } DateRangeItem.new(options)
- .new(id : Nil | String = nil, start_date : Nil | String = nil, class_name : Nil | String = nil, end_date : Nil | String = nil, duration : Float64 | Nil = nil, planned_duration : Float64 | Nil = nil, scte35_cmd : Nil | String = nil, scte35_out : Nil | String = nil, scte35_in : Nil | String = nil, end_on_next : Bool | Nil = nil, client_attributes = nil)
Class Method Summary
-
.parse(text)
text = %(#EXT-X-DATERANGE:ID="test_id",CLASS="test_class",) \ %(START-DATE="2014-03-05T11:15:00Z",END-DATE="2014-03-05T11:16:00Z",) \ %(DURATION=60.1,PLANNED-DURATION=59.993,X-CUSTOM=45.3,) \ %(SCTE35-CMD=0xFC002F0000000000FF2,SCTE35-OUT=0xFC002F0000000000FF0,) \ %(SCTE35-IN=0xFC002F0000000000FF1,END-ON-NEXT=YES) DateRangeItem.parse(text)
Instance Method Summary
- #class_name : String | Nil
- #class_name=(class_name : String | Nil)
- #client_attributes : ClientAttributeType
- #client_attributes=(client_attributes : ClientAttributeType)
- #duration : Float64 | Nil
- #duration=(duration : Float64 | Nil)
- #end_date : String | Nil
- #end_date=(end_date : String | Nil)
- #end_on_next : Bool | Nil
- #end_on_next=(end_on_next : Bool | Nil)
- #id : String | Nil
- #id=(id : String | Nil)
- #planned_duration : Float64 | Nil
- #planned_duration=(planned_duration : Float64 | Nil)
- #scte35_cmd : String | Nil
- #scte35_cmd=(scte35_cmd : String | Nil)
- #scte35_in : String | Nil
- #scte35_in=(scte35_in : String | Nil)
- #scte35_out : String | Nil
- #scte35_out=(scte35_out : String | Nil)
- #start_date : String | Nil
- #start_date=(start_date : String | Nil)
-
#to_s
options = { id: "test_id", start_date: "2014-03-05T11:15:00Z", class_name: "test_class", end_date: "2014-03-05T11:16:00Z", duration: 60.1, planned_duration: 59.993, scte35_out: "0xFC002F0000000000FF0", scte35_in: "0xFC002F0000000000FF1", scte35_cmd: "0xFC002F0000000000FF2", end_on_next: true, client_attributes: {"X-CUSTOM" => 45.3}, } DateRangeItem.new(options).to_s # => %(#EXT-X-DATERANGE:ID="test_id",CLASS="test_class",) \ %(START-DATE="2014-03-05T11:15:00Z",END-DATE="2014-03-05T11:16:00Z",) \ %(DURATION=60.1,PLANNED-DURATION=59.993,X-CUSTOM=45.3,) \ %(SCTE35-CMD=0xFC002F0000000000FF2,SCTE35-OUT=0xFC002F0000000000FF0,) \ %(SCTE35-IN=0xFC002F0000000000FF1,END-ON-NEXT=YES)
Constructor Detail
options = {
id: "test_id",
start_date: "2014-03-05T11:15:00Z",
class_name: "test_class",
end_date: "2014-03-05T11:16:00Z",
duration: 60.1,
planned_duration: 59.993,
scte35_out: "0xFC002F0000000000FF0",
scte35_in: "0xFC002F0000000000FF1",
scte35_cmd: "0xFC002F0000000000FF2",
end_on_next: true,
client_attributes: {"X-CUSTOM" => 45.3},
}
DateRangeItem.new(options)
DateRangeItem.new
Class Method Detail
text = %(#EXT-X-DATERANGE:ID="test_id",CLASS="test_class",) \
%(START-DATE="2014-03-05T11:15:00Z",END-DATE="2014-03-05T11:16:00Z",) \
%(DURATION=60.1,PLANNED-DURATION=59.993,X-CUSTOM=45.3,) \
%(SCTE35-CMD=0xFC002F0000000000FF2,SCTE35-OUT=0xFC002F0000000000FF0,) \
%(SCTE35-IN=0xFC002F0000000000FF1,END-ON-NEXT=YES)
DateRangeItem.parse(text)
Instance Method Detail
options = {
id: "test_id",
start_date: "2014-03-05T11:15:00Z",
class_name: "test_class",
end_date: "2014-03-05T11:16:00Z",
duration: 60.1,
planned_duration: 59.993,
scte35_out: "0xFC002F0000000000FF0",
scte35_in: "0xFC002F0000000000FF1",
scte35_cmd: "0xFC002F0000000000FF2",
end_on_next: true,
client_attributes: {"X-CUSTOM" => 45.3},
}
DateRangeItem.new(options).to_s
# => %(#EXT-X-DATERANGE:ID="test_id",CLASS="test_class",) \
%(START-DATE="2014-03-05T11:15:00Z",END-DATE="2014-03-05T11:16:00Z",) \
%(DURATION=60.1,PLANNED-DURATION=59.993,X-CUSTOM=45.3,) \
%(SCTE35-CMD=0xFC002F0000000000FF2,SCTE35-OUT=0xFC002F0000000000FF0,) \
%(SCTE35-IN=0xFC002F0000000000FF1,END-ON-NEXT=YES)