class M3U8::SessionDataItem

Overview

SessionDataItem represents a set of EXT-X-SESSION-DATA attributes

Included Modules

Extended Modules

Defined in:

m3u8/session_data_item.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(params : NamedTuple = NamedTuple.new) #
options = {
  data_id:  "com.test.movie.title",
  value:    "Test",
  uri:      "http://test",
  language: "en",
}
SessionDataItem.new(options)

[View source]
def self.new(data_id : Nil | String = nil, value : Nil | String = nil, uri : Nil | String = nil, language : Nil | String = nil) #
SessionDataItem.new

[View source]

Class Method Detail

def self.parse(text) #
text = %(#EXT-X-SESSION-DATA:DATA-ID="com.test.movie.title",VALUE="Test",URI="http://test",LANGUAGE="en")
SessionDataItem.parse(text) # => #<M3U8::SessionDataItem......>

[View source]

Instance Method Detail

def data_id : String | Nil #

[View source]
def data_id=(data_id : String | Nil) #

[View source]
def language : String | Nil #

[View source]
def language=(language : String | Nil) #

[View source]
def to_s #
options = {
  data_id:  "com.test.movie.title",
  value:    "Test",
  uri:      "http://test",
  language: "en",
}
SessionDataItem.new(options).to_s
# => %(#EXT-X-SESSION-DATA:DATA-ID="com.test.movie.title",) \
%(VALUE="Test",URI="http://test",LANGUAGE="en")

[View source]
def uri : String | Nil #

[View source]
def uri=(uri : String | Nil) #

[View source]
def value : String | Nil #

[View source]
def value=(value : String | Nil) #

[View source]