class M3U8::Codecs
- M3U8::Codecs
- Reference
- Object
Included Modules
- M3U8::Concern
Extended Modules
- M3U8::Concern
Defined in:
m3u8/codecs.crConstructors
-
.new(params : NamedTuple = NamedTuple.new)
options = {audio_codec: "aac-lc"} Codecs.new(options) Codecs.new(audio_codec: "aac-lc")
- .new(codecs : Nil | String = nil, audio_codec : Nil | String = nil, level = nil, profile : Nil | String = nil)
Instance Method Summary
-
#==(other : Codecs)
left = Codecs.new(audio_codec: "aac-lc") right = Codecs.new(audio_codec: "aac-lc") left == right # => true
-
#==(other : String)
left = Codecs.new(audio_codec: "aac-lc") right = "aac-lc" left == right # => true
- #audio_codec : String | Nil
- #audio_codec=(audio_codec : String | Nil)
- #codecs : String | Nil
- #codecs=(codecs : String | Nil)
-
#empty?
codecs = Codecs.new codecs.empty? # => true codecs.audio_codec = "aac-lc" codecs.empty? # => false
- #level : Float64 | Nil
- #level=(level : Float64 | Nil)
- #profile : String | Nil
- #profile=(profile : String | Nil)
-
#to_s
Codecs.new(codecs: "test").to_s # => "test" Codecs.new(audio_codec: "aac-lc").to_s # => "mp4a.40.2" Codecs.new(profile: "baseline", level: 3.0, audio_codec: "mp3").to_s # => "avc1.66.30,mp4a.40.34"
Constructor Detail
def self.new(params : NamedTuple = NamedTuple.new)
#
options = {audio_codec: "aac-lc"}
Codecs.new(options)
Codecs.new(audio_codec: "aac-lc")
def self.new(codecs : Nil | String = nil, audio_codec : Nil | String = nil, level = nil, profile : Nil | String = nil)
#
Codecs.new
Instance Method Detail
left = Codecs.new(audio_codec: "aac-lc")
right = Codecs.new(audio_codec: "aac-lc")
left == right # => true
def ==(other : String)
#
left = Codecs.new(audio_codec: "aac-lc")
right = "aac-lc"
left == right # => true
def empty?
#
codecs = Codecs.new
codecs.empty? # => true
codecs.audio_codec = "aac-lc"
codecs.empty? # => false
def to_s
#
Codecs.new(codecs: "test").to_s # => "test"
Codecs.new(audio_codec: "aac-lc").to_s # => "mp4a.40.2"
Codecs.new(profile: "baseline", level: 3.0, audio_codec: "mp3").to_s # => "avc1.66.30,mp4a.40.34"