class Bitmovin::Encoding::Manifests::DashManifest
Attributes
manifest_name[RW]
outputs[RW]
Public Class Methods
new(hash = {})
click to toggle source
Calls superclass method
Bitmovin::Resource::new
# File lib/bitmovin/encoding/manifests/dash_manifest.rb, line 6 def initialize(hash = {}) hsh = ActiveSupport::HashWithIndifferentAccess.new(underscore_hash(hash)) super(hash) @outputs = (hsh[:outputs] || []).map { |output| Bitmovin::Encoding::StreamOutput.new(output) } @periods = nil end
Public Instance Methods
full_status()
click to toggle source
# File lib/bitmovin/encoding/manifests/dash_manifest.rb, line 30 def full_status path = File.join("/v1/encoding/manifests/dash/", @id, "status") response = Bitmovin.client.get(path) hash_to_struct(result(response)) end
persisted?()
click to toggle source
# File lib/bitmovin/encoding/manifests/dash_manifest.rb, line 17 def persisted? !@id.nil? end
progress()
click to toggle source
# File lib/bitmovin/encoding/manifests/dash_manifest.rb, line 40 def progress full_status.progress end
reload!()
click to toggle source
# File lib/bitmovin/encoding/manifests/dash_manifest.rb, line 21 def reload! @periods = nil end
start!()
click to toggle source
# File lib/bitmovin/encoding/manifests/dash_manifest.rb, line 25 def start! path = File.join("/v1/encoding/manifests/dash/", @id, "start") Bitmovin.client.post(path) end
status()
click to toggle source
# File lib/bitmovin/encoding/manifests/dash_manifest.rb, line 36 def status full_status.status end
Private Instance Methods
collect_attributes()
click to toggle source
# File lib/bitmovin/encoding/manifests/dash_manifest.rb, line 46 def collect_attributes val = Hash.new [:name, :description, :manifest_name].each do |name| json_name = ActiveSupport::Inflector.camelize(name.to_s, false) val[json_name] = instance_variable_get("@#{name}") end val["outputs"] = @outputs.map { |o| o.send(:collect_attributes) } val end