Class: Bitmovin::Encoding::Manifests::HlsManifest
- Includes:
- ChildCollection
- Defined in:
- lib/bitmovin/encoding/manifests/hls_manifest.rb
Instance Attribute Summary collapse
-
#manifest_name ⇒ Object
Returns the value of attribute manifest_name.
-
#outputs ⇒ Object
Returns the value of attribute outputs.
Attributes inherited from Resource
#created_at, #description, #id, #modified_at, #name
Instance Method Summary collapse
- #full_status ⇒ Object
-
#initialize(hash = {}) ⇒ HlsManifest
constructor
A new instance of HlsManifest.
- #progress ⇒ Object
- #start! ⇒ Object
- #status ⇒ Object
Methods included from ChildCollection
Methods inherited from Resource
#delete!, find, init, #init_instance, #inspect, list, #persisted?, #save!
Methods included from Helpers
#camelize_hash, #hash_to_struct, result, #result, #underscore_hash
Constructor Details
#initialize(hash = {}) ⇒ HlsManifest
Returns a new instance of HlsManifest.
8 9 10 11 12 13 14 |
# File 'lib/bitmovin/encoding/manifests/hls_manifest.rb', line 8 def initialize(hash = {}) hsh = ActiveSupport::HashWithIndifferentAccess.new(underscore_hash(hash)) super(hash) @outputs = (hsh[:outputs] || []).map { |output| Bitmovin::Encoding::StreamOutput.new(output) } @streams = nil @audio_media = nil end |
Instance Attribute Details
#manifest_name ⇒ Object
Returns the value of attribute manifest_name.
6 7 8 |
# File 'lib/bitmovin/encoding/manifests/hls_manifest.rb', line 6 def manifest_name @manifest_name end |
#outputs ⇒ Object
Returns the value of attribute outputs.
6 7 8 |
# File 'lib/bitmovin/encoding/manifests/hls_manifest.rb', line 6 def outputs @outputs end |
Instance Method Details
#full_status ⇒ Object
24 25 26 27 28 |
# File 'lib/bitmovin/encoding/manifests/hls_manifest.rb', line 24 def full_status path = File.join("/v1/encoding/manifests/hls/", @id, "status") response = Bitmovin.client.get(path) hash_to_struct(result(response)) end |
#progress ⇒ Object
34 35 36 |
# File 'lib/bitmovin/encoding/manifests/hls_manifest.rb', line 34 def progress full_status.progress end |
#start! ⇒ Object
19 20 21 22 |
# File 'lib/bitmovin/encoding/manifests/hls_manifest.rb', line 19 def start! path = File.join("/v1/encoding/manifests/hls/", @id, "start") Bitmovin.client.post(path) end |
#status ⇒ Object
30 31 32 |
# File 'lib/bitmovin/encoding/manifests/hls_manifest.rb', line 30 def status full_status.status end |