mux_ruby 3.9.0 → 3.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CODEOWNERS +1 -1
- data/Gemfile.lock +2 -2
- data/README.md +4 -4
- data/docs/Asset.md +7 -1
- data/docs/AssetGeneratedSubtitleSettings.md +22 -0
- data/docs/AssetNonStandardInputReasons.md +3 -1
- data/docs/AssetsApi.md +1 -1
- data/docs/CreateAssetRequest.md +5 -1
- data/docs/CreateLiveStreamRequest.md +3 -3
- data/docs/CreateTrackRequest.md +2 -2
- data/docs/DeliveryReport.md +2 -0
- data/docs/DeliveryReportDeliveredSecondsByResolution.md +5 -1
- data/docs/DirectUploadsApi.md +1 -1
- data/docs/GetMonitoringBreakdownTimeseriesResponse.md +22 -0
- data/docs/InputSettings.md +7 -5
- data/docs/LiveStream.md +4 -4
- data/docs/MetricsApi.md +2 -2
- data/docs/MonitoringApi.md +93 -6
- data/docs/MonitoringBreakdownTimeseriesDatapoint.md +22 -0
- data/docs/MonitoringBreakdownTimeseriesValues.md +20 -0
- data/docs/RealTimeApi.md +8 -6
- data/docs/SigningKeysApi.md +291 -0
- data/docs/Track.md +4 -4
- data/docs/URLSigningKeysApi.md +4 -4
- data/docs/UpdateLiveStreamRequest.md +1 -1
- data/docs/VideoView.md +33 -1
- data/examples/video/exercise-signing-keys.rb +5 -4
- data/gen/generator-config.json +1 -1
- data/gen/package.json +1 -1
- data/gen/yarn.lock +593 -129
- data/lib/mux_ruby/api/assets_api.rb +2 -2
- data/lib/mux_ruby/api/direct_uploads_api.rb +2 -2
- data/lib/mux_ruby/api/metrics_api.rb +9 -9
- data/lib/mux_ruby/api/monitoring_api.rb +110 -9
- data/lib/mux_ruby/api/real_time_api.rb +9 -6
- data/lib/mux_ruby/api/signing_keys_api.rb +266 -0
- data/lib/mux_ruby/api/url_signing_keys_api.rb +8 -8
- data/lib/mux_ruby/models/asset.rb +68 -2
- data/lib/mux_ruby/models/asset_generated_subtitle_settings.rb +275 -0
- data/lib/mux_ruby/models/asset_non_standard_input_reasons.rb +14 -4
- data/lib/mux_ruby/models/create_asset_request.rb +48 -4
- data/lib/mux_ruby/models/create_live_stream_request.rb +3 -3
- data/lib/mux_ruby/models/create_track_request.rb +4 -3
- data/lib/mux_ruby/models/delivery_report.rb +23 -1
- data/lib/mux_ruby/models/delivery_report_delivered_seconds_by_resolution.rb +22 -2
- data/lib/mux_ruby/models/get_monitoring_breakdown_timeseries_response.rb +240 -0
- data/lib/mux_ruby/models/input_settings.rb +18 -6
- data/lib/mux_ruby/models/live_stream.rb +4 -4
- data/lib/mux_ruby/models/live_stream_embedded_subtitle_settings.rb +2 -2
- data/lib/mux_ruby/models/monitoring_breakdown_timeseries_datapoint.rb +236 -0
- data/lib/mux_ruby/models/monitoring_breakdown_timeseries_values.rb +229 -0
- data/lib/mux_ruby/models/track.rb +4 -4
- data/lib/mux_ruby/models/update_live_stream_request.rb +1 -1
- data/lib/mux_ruby/models/video_view.rb +162 -5
- data/lib/mux_ruby/version.rb +1 -1
- data/lib/mux_ruby.rb +5 -0
- data/spec/api/signing_keys_api_spec.rb +83 -0
- data/spec/models/asset_generated_subtitle_settings_spec.rb +50 -0
- data/spec/models/get_monitoring_breakdown_timeseries_response_spec.rb +46 -0
- data/spec/models/monitoring_breakdown_timeseries_datapoint_spec.rb +46 -0
- data/spec/models/monitoring_breakdown_timeseries_values_spec.rb +40 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-11.1.3/byebug/byebug.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-11.1.3/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/ffi-1.15.5/ffi_c.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/ffi-1.15.5/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/ffi-1.15.5/mkmf.log +15 -15
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.4/gem_make.out +14 -14
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.4/jaro_winkler/jaro_winkler_ext.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-4.0.4/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-4.0.4/mkmf.log +4 -4
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-4.0.4/psych.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.0.2/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.0.2/mkmf.log +2 -2
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.0.2/stringio.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/byebug-11.1.3/ext/byebug/Makefile +6 -6
- data/vendor/bundle/ruby/3.2.0/gems/byebug-11.1.3/lib/byebug/byebug.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/ffi-1.15.5/ext/ffi_c/Makefile +6 -6
- data/vendor/bundle/ruby/3.2.0/gems/ffi-1.15.5/lib/ffi_c.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler/Makefile +6 -6
- data/vendor/bundle/ruby/3.2.0/gems/jaro_winkler-1.5.4/lib/jaro_winkler/jaro_winkler_ext.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/psych-4.0.4/ext/psych/Makefile +6 -6
- data/vendor/bundle/ruby/3.2.0/gems/psych-4.0.4/lib/psych.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/stringio-3.0.2/ext/stringio/Makefile +6 -6
- data/vendor/bundle/ruby/3.2.0/gems/stringio-3.0.2/lib/stringio.so +0 -0
- data/vendor/bundle/ruby/3.2.0/specifications/ast-2.4.2.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/byebug-11.1.3.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/coderay-1.1.3.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/diff-lcs-1.5.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/ethon-0.16.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/ffi-1.15.5.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/jaro_winkler-1.5.4.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/method_source-1.0.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/parallel-1.22.1.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/parser-3.1.2.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/pry-0.13.1.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/pry-byebug-3.9.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/psych-4.0.4.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/rainbow-3.1.1.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/rake-13.0.6.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/rspec-3.11.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/rspec-core-3.11.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/rspec-expectations-3.11.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/rspec-mocks-3.11.1.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/rspec-support-3.11.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/rubocop-0.66.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/ruby-progressbar-1.11.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/solid_assert-1.1.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/stringio-3.0.2.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/typhoeus-1.4.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/unicode-display_width-1.5.0.gemspec +2 -2
- metadata +160 -140
@@ -0,0 +1,240 @@
|
|
1
|
+
=begin
|
2
|
+
#Mux API
|
3
|
+
|
4
|
+
#Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v1
|
7
|
+
Contact: devex@mux.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.0.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module MuxRuby
|
17
|
+
class GetMonitoringBreakdownTimeseriesResponse
|
18
|
+
attr_accessor :data
|
19
|
+
|
20
|
+
attr_accessor :total_row_count
|
21
|
+
|
22
|
+
attr_accessor :timeframe
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'data' => :'data',
|
28
|
+
:'total_row_count' => :'total_row_count',
|
29
|
+
:'timeframe' => :'timeframe'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Returns all the JSON keys this model knows about
|
34
|
+
def self.acceptable_attributes
|
35
|
+
attribute_map.values
|
36
|
+
end
|
37
|
+
|
38
|
+
# Attribute type mapping.
|
39
|
+
def self.openapi_types
|
40
|
+
{
|
41
|
+
:'data' => :'Array<MonitoringBreakdownTimeseriesValues>',
|
42
|
+
:'total_row_count' => :'Integer',
|
43
|
+
:'timeframe' => :'Array<Integer>'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# List of attributes with nullable: true
|
48
|
+
def self.openapi_nullable
|
49
|
+
Set.new([
|
50
|
+
])
|
51
|
+
end
|
52
|
+
|
53
|
+
# Initializes the object
|
54
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
55
|
+
def initialize(attributes = {})
|
56
|
+
if (!attributes.is_a?(Hash))
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::GetMonitoringBreakdownTimeseriesResponse` initialize method"
|
58
|
+
end
|
59
|
+
|
60
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
62
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::GetMonitoringBreakdownTimeseriesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
64
|
+
end
|
65
|
+
h[k.to_sym] = v
|
66
|
+
}
|
67
|
+
|
68
|
+
if attributes.key?(:'data')
|
69
|
+
if (value = attributes[:'data']).is_a?(Array)
|
70
|
+
self.data = value
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes.key?(:'total_row_count')
|
75
|
+
self.total_row_count = attributes[:'total_row_count']
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.key?(:'timeframe')
|
79
|
+
if (value = attributes[:'timeframe']).is_a?(Array)
|
80
|
+
self.timeframe = value
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
86
|
+
# @return Array for valid properties with the reasons
|
87
|
+
def list_invalid_properties
|
88
|
+
invalid_properties = Array.new
|
89
|
+
invalid_properties
|
90
|
+
end
|
91
|
+
|
92
|
+
# Check to see if the all the properties in the model are valid
|
93
|
+
# @return true if the model is valid
|
94
|
+
def valid?
|
95
|
+
true
|
96
|
+
end
|
97
|
+
|
98
|
+
# Checks equality by comparing each attribute.
|
99
|
+
# @param [Object] Object to be compared
|
100
|
+
def ==(o)
|
101
|
+
return true if self.equal?(o)
|
102
|
+
self.class == o.class &&
|
103
|
+
data == o.data &&
|
104
|
+
total_row_count == o.total_row_count &&
|
105
|
+
timeframe == o.timeframe
|
106
|
+
end
|
107
|
+
|
108
|
+
# @see the `==` method
|
109
|
+
# @param [Object] Object to be compared
|
110
|
+
def eql?(o)
|
111
|
+
self == o
|
112
|
+
end
|
113
|
+
|
114
|
+
# Calculates hash code according to all attributes.
|
115
|
+
# @return [Integer] Hash code
|
116
|
+
def hash
|
117
|
+
[data, total_row_count, timeframe].hash
|
118
|
+
end
|
119
|
+
|
120
|
+
# Builds the object from hash
|
121
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
122
|
+
# @return [Object] Returns the model itself
|
123
|
+
def self.build_from_hash(attributes)
|
124
|
+
new.build_from_hash(attributes)
|
125
|
+
end
|
126
|
+
|
127
|
+
# Builds the object from hash
|
128
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
129
|
+
# @return [Object] Returns the model itself
|
130
|
+
def build_from_hash(attributes)
|
131
|
+
return nil unless attributes.is_a?(Hash)
|
132
|
+
self.class.openapi_types.each_pair do |key, type|
|
133
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
134
|
+
self.send("#{key}=", nil)
|
135
|
+
elsif type =~ /\AArray<(.*)>/i
|
136
|
+
# check to ensure the input is an array given that the attribute
|
137
|
+
# is documented as an array but the input is not
|
138
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
139
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
140
|
+
end
|
141
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
142
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
self
|
147
|
+
end
|
148
|
+
|
149
|
+
# Deserializes the data based on type
|
150
|
+
# @param string type Data type
|
151
|
+
# @param string value Value to be deserialized
|
152
|
+
# @return [Object] Deserialized data
|
153
|
+
def _deserialize(type, value)
|
154
|
+
case type.to_sym
|
155
|
+
when :Time
|
156
|
+
Time.parse(value)
|
157
|
+
when :Date
|
158
|
+
Date.parse(value)
|
159
|
+
when :String
|
160
|
+
value.to_s
|
161
|
+
when :Integer
|
162
|
+
value.to_i
|
163
|
+
when :Float
|
164
|
+
value.to_f
|
165
|
+
when :Boolean
|
166
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
167
|
+
true
|
168
|
+
else
|
169
|
+
false
|
170
|
+
end
|
171
|
+
when :Object
|
172
|
+
# generic object (usually a Hash), return directly
|
173
|
+
value
|
174
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
175
|
+
inner_type = Regexp.last_match[:inner_type]
|
176
|
+
value.map { |v| _deserialize(inner_type, v) }
|
177
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
178
|
+
k_type = Regexp.last_match[:k_type]
|
179
|
+
v_type = Regexp.last_match[:v_type]
|
180
|
+
{}.tap do |hash|
|
181
|
+
value.each do |k, v|
|
182
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
183
|
+
end
|
184
|
+
end
|
185
|
+
else # model
|
186
|
+
# models (e.g. Pet) or oneOf
|
187
|
+
klass = MuxRuby.const_get(type)
|
188
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
# Returns the string representation of the object
|
193
|
+
# @return [String] String presentation of the object
|
194
|
+
def to_s
|
195
|
+
to_hash.to_s
|
196
|
+
end
|
197
|
+
|
198
|
+
# to_body is an alias to to_hash (backward compatibility)
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
200
|
+
def to_body
|
201
|
+
to_hash
|
202
|
+
end
|
203
|
+
|
204
|
+
# Returns the object in the form of hash
|
205
|
+
# @return [Hash] Returns the object in the form of hash
|
206
|
+
def to_hash
|
207
|
+
hash = {}
|
208
|
+
self.class.attribute_map.each_pair do |attr, param|
|
209
|
+
value = self.send(attr)
|
210
|
+
if value.nil?
|
211
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
212
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
213
|
+
end
|
214
|
+
|
215
|
+
hash[param] = _to_hash(value)
|
216
|
+
end
|
217
|
+
hash
|
218
|
+
end
|
219
|
+
|
220
|
+
# Outputs non-array value in the form of hash
|
221
|
+
# For object, use to_hash. Otherwise, just return the value
|
222
|
+
# @param [Object] value Any valid value
|
223
|
+
# @return [Hash] Returns the value in the form of hash
|
224
|
+
def _to_hash(value)
|
225
|
+
if value.is_a?(Array)
|
226
|
+
value.compact.map { |v| _to_hash(v) }
|
227
|
+
elsif value.is_a?(Hash)
|
228
|
+
{}.tap do |hash|
|
229
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
230
|
+
end
|
231
|
+
elsif value.respond_to? :to_hash
|
232
|
+
value.to_hash
|
233
|
+
else
|
234
|
+
value
|
235
|
+
end
|
236
|
+
end
|
237
|
+
|
238
|
+
end
|
239
|
+
|
240
|
+
end
|
@@ -16,11 +16,14 @@ require 'time'
|
|
16
16
|
module MuxRuby
|
17
17
|
# An array of objects that each describe an input file to be used to create the asset. As a shortcut, `input` can also be a string URL for a file when only one input file is used. See `input[].url` for requirements.
|
18
18
|
class InputSettings
|
19
|
-
# The URL of the file that Mux should download and use. * For
|
19
|
+
# The URL of the file that Mux should download and use. * For the main input file, this should be the URL to the muxed file for Mux to download, for example an MP4, MOV, MKV, or TS file. Mux supports most audio/video file formats and codecs, but for fastest processing, you should [use standard inputs wherever possible](https://docs.mux.com/guides/video/minimize-processing-time). * For `audio` tracks, the URL is the location of the audio file for Mux to download, for example an M4A, WAV, or MP3 file. Mux supports most audio file formats and codecs, but for fastest processing, you should [use standard inputs wherever possible](https://docs.mux.com/guides/video/minimize-processing-time). * For `text` tracks, the URL is the location of subtitle/captions file. Mux supports [SubRip Text (SRT)](https://en.wikipedia.org/wiki/SubRip) and [Web Video Text Tracks](https://www.w3.org/TR/webvtt1/) formats for ingesting Subtitles and Closed Captions. * For Watermarking or Overlay, the URL is the location of the watermark image. * When creating clips from existing Mux assets, the URL is defined with `mux://assets/{asset_id}` template where `asset_id` is the Asset Identifier for creating the clip from. The url property may be omitted on the first input object when providing asset settings for LiveStream and Upload objects, in order to configure settings related to the primary (live stream or direct upload) input.
|
20
20
|
attr_accessor :url
|
21
21
|
|
22
22
|
attr_accessor :overlay_settings
|
23
23
|
|
24
|
+
# Generate subtitle tracks using automatic speech recognition using this configuration. This may only be provided for the first input object (the main input file). For direct uploads, this first input should omit the url parameter, as the main input file is provided via the direct upload. This will create subtitles based on the audio track ingested from that main input file. Note that subtitle generation happens after initial ingest, so the generated tracks will be in the `preparing` state when the asset transitions to `ready`.
|
25
|
+
attr_accessor :generated_subtitles
|
26
|
+
|
24
27
|
# The time offset in seconds from the beginning of the video indicating the clip's starting marker. The default value is 0 when not included. This parameter is only applicable for creating clips when `input.url` has `mux://assets/{asset_id}` format.
|
25
28
|
attr_accessor :start_time
|
26
29
|
|
@@ -33,16 +36,16 @@ module MuxRuby
|
|
33
36
|
# Type of text track. This parameter only supports subtitles value. For more information on Subtitles / Closed Captions, [see this blog post](https://mux.com/blog/subtitles-captions-webvtt-hls-and-those-magic-flags/). This parameter is required for `text` type tracks.
|
34
37
|
attr_accessor :text_type
|
35
38
|
|
36
|
-
# The language code value must be a valid [BCP 47](https://tools.ietf.org/html/bcp47) specification compliant value. For example, en for English or en-US for the US version of English. This parameter is required for text
|
39
|
+
# The language code value must be a valid [BCP 47](https://tools.ietf.org/html/bcp47) specification compliant value. For example, `en` for English or `en-US` for the US version of English. This parameter is required for `text` and `audio` track types.
|
37
40
|
attr_accessor :language_code
|
38
41
|
|
39
|
-
# The name of the track containing a human-readable description. This value must be unique
|
42
|
+
# The name of the track containing a human-readable description. This value must be unique within each group of `text` or `audio` track types. The HLS manifest will associate a subtitle text track with this value. For example, the value should be \"English\" for a subtitle text track with `language_code` set to `en`. This optional parameter should be used only for `text` and `audio` type tracks. This parameter can be optionally provided for the first video input to denote the name of the muxed audio track if present. If this parameter is not included, Mux will auto-populate based on the `input[].language_code` value.
|
40
43
|
attr_accessor :name
|
41
44
|
|
42
|
-
# Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). This optional parameter should be used for `text`
|
45
|
+
# Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). This optional parameter should be used for tracks with `type` of `text` and `text_type` set to `subtitles`.
|
43
46
|
attr_accessor :closed_captions
|
44
47
|
|
45
|
-
# This optional parameter should be used
|
48
|
+
# This optional parameter should be used tracks with `type` of `text` and `text_type` set to `subtitles`.
|
46
49
|
attr_accessor :passthrough
|
47
50
|
|
48
51
|
class EnumAttributeValidator
|
@@ -72,6 +75,7 @@ module MuxRuby
|
|
72
75
|
{
|
73
76
|
:'url' => :'url',
|
74
77
|
:'overlay_settings' => :'overlay_settings',
|
78
|
+
:'generated_subtitles' => :'generated_subtitles',
|
75
79
|
:'start_time' => :'start_time',
|
76
80
|
:'end_time' => :'end_time',
|
77
81
|
:'type' => :'type',
|
@@ -93,6 +97,7 @@ module MuxRuby
|
|
93
97
|
{
|
94
98
|
:'url' => :'String',
|
95
99
|
:'overlay_settings' => :'InputSettingsOverlaySettings',
|
100
|
+
:'generated_subtitles' => :'Array<AssetGeneratedSubtitleSettings>',
|
96
101
|
:'start_time' => :'Float',
|
97
102
|
:'end_time' => :'Float',
|
98
103
|
:'type' => :'String',
|
@@ -133,6 +138,12 @@ module MuxRuby
|
|
133
138
|
self.overlay_settings = attributes[:'overlay_settings']
|
134
139
|
end
|
135
140
|
|
141
|
+
if attributes.key?(:'generated_subtitles')
|
142
|
+
if (value = attributes[:'generated_subtitles']).is_a?(Array)
|
143
|
+
self.generated_subtitles = value
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
136
147
|
if attributes.key?(:'start_time')
|
137
148
|
self.start_time = attributes[:'start_time']
|
138
149
|
end
|
@@ -210,6 +221,7 @@ module MuxRuby
|
|
210
221
|
self.class == o.class &&
|
211
222
|
url == o.url &&
|
212
223
|
overlay_settings == o.overlay_settings &&
|
224
|
+
generated_subtitles == o.generated_subtitles &&
|
213
225
|
start_time == o.start_time &&
|
214
226
|
end_time == o.end_time &&
|
215
227
|
type == o.type &&
|
@@ -229,7 +241,7 @@ module MuxRuby
|
|
229
241
|
# Calculates hash code according to all attributes.
|
230
242
|
# @return [Integer] Hash code
|
231
243
|
def hash
|
232
|
-
[url, overlay_settings, start_time, end_time, type, text_type, language_code, name, closed_captions, passthrough].hash
|
244
|
+
[url, overlay_settings, generated_subtitles, start_time, end_time, type, text_type, language_code, name, closed_captions, passthrough].hash
|
233
245
|
end
|
234
246
|
|
235
247
|
# Builds the object from hash
|
@@ -27,7 +27,7 @@ module MuxRuby
|
|
27
27
|
# The Asset that is currently being created if there is an active broadcast.
|
28
28
|
attr_accessor :active_asset_id
|
29
29
|
|
30
|
-
# An array of strings with the most recent
|
30
|
+
# An array of strings with the most recent Asset IDs that were created from this Live Stream. The most recently generated Asset ID is the last entry in the list.
|
31
31
|
attr_accessor :recent_asset_ids
|
32
32
|
|
33
33
|
attr_accessor :status
|
@@ -49,7 +49,7 @@ module MuxRuby
|
|
49
49
|
# Configure the incoming live stream to include subtitles created with automatic speech recognition. Each Asset created from a live stream with `generated_subtitles` configured will automatically receive two text tracks. The first of these will have a `text_source` value of `generated_live`, and will be available with `ready` status as soon as the stream is live. The second text track will have a `text_source` value of `generated_live_final` and will contain subtitles with improved accuracy, timing, and formatting. However, `generated_live_final` tracks will not be available in `ready` status until the live stream ends. If an Asset has both `generated_live` and `generated_live_final` tracks that are `ready`, then only the `generated_live_final` track will be included during playback.
|
50
50
|
attr_accessor :generated_subtitles
|
51
51
|
|
52
|
-
# When live streaming software disconnects from Mux, either intentionally or due to a drop in the network, the Reconnect Window is the time in seconds that Mux should wait for the streaming software to reconnect before considering the live stream finished and completing the recorded asset. **Max**: 1800s (30 minutes). Reduced and Low Latency streams with a Reconnect Window greater than zero will insert slate media into the recorded asset while waiting for the streaming software to reconnect or when there are brief interruptions in the live stream media. When using a Reconnect Window setting higher than 60 seconds with a Standard Latency stream, we highly recommend enabling slate with the `use_slate_for_standard_latency` option.
|
52
|
+
# When live streaming software disconnects from Mux, either intentionally or due to a drop in the network, the Reconnect Window is the time in seconds that Mux should wait for the streaming software to reconnect before considering the live stream finished and completing the recorded asset. **Max**: 1800s (30 minutes). If not specified directly, Standard Latency streams have a Reconnect Window of 60 seconds; Reduced and Low Latency streams have a default of 0 seconds, or no Reconnect Window. For that reason, we suggest specifying a value other than zero for Reduced and Low Latency streams. Reduced and Low Latency streams with a Reconnect Window greater than zero will insert slate media into the recorded asset while waiting for the streaming software to reconnect or when there are brief interruptions in the live stream media. When using a Reconnect Window setting higher than 60 seconds with a Standard Latency stream, we highly recommend enabling slate with the `use_slate_for_standard_latency` option.
|
53
53
|
attr_accessor :reconnect_window
|
54
54
|
|
55
55
|
# By default, Standard Latency live streams do not have slate media inserted while waiting for live streaming software to reconnect to Mux. Setting this to true enables slate insertion on a Standard Latency stream.
|
@@ -58,10 +58,10 @@ module MuxRuby
|
|
58
58
|
# The URL of the image file that Mux should download and use as slate media during interruptions of the live stream media. This file will be downloaded each time a new recorded asset is created from the live stream. If this is not set, the default slate media will be used.
|
59
59
|
attr_accessor :reconnect_slate_url
|
60
60
|
|
61
|
-
# This field is deprecated. Please use latency_mode instead. Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Set this if you want lower latency for your live stream. See the [Reduce live stream latency guide](https://docs.mux.com/guides/video/reduce-live-stream-latency) to understand the tradeoffs.
|
61
|
+
# This field is deprecated. Please use `latency_mode` instead. Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Set this if you want lower latency for your live stream. See the [Reduce live stream latency guide](https://docs.mux.com/guides/video/reduce-live-stream-latency) to understand the tradeoffs.
|
62
62
|
attr_accessor :reduced_latency
|
63
63
|
|
64
|
-
# This field is deprecated. Please use latency_mode instead. Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Setting this option will enable compatibility with the LL-HLS specification for low-latency streaming. This typically has lower latency than Reduced Latency streams, and cannot be combined with Reduced Latency.
|
64
|
+
# This field is deprecated. Please use `latency_mode` instead. Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Setting this option will enable compatibility with the LL-HLS specification for low-latency streaming. This typically has lower latency than Reduced Latency streams, and cannot be combined with Reduced Latency.
|
65
65
|
attr_accessor :low_latency
|
66
66
|
|
67
67
|
# Each Simulcast Target contains configuration details to broadcast (or \"restream\") a live stream to a third-party streaming service. [See the Stream live to 3rd party platforms guide](https://docs.mux.com/guides/video/stream-live-to-3rd-party-platforms).
|
@@ -126,7 +126,7 @@ module MuxRuby
|
|
126
126
|
# Check to see if the all the properties in the model are valid
|
127
127
|
# @return true if the model is valid
|
128
128
|
def valid?
|
129
|
-
language_channel_validator = EnumAttributeValidator.new('String', ["cc1"])
|
129
|
+
language_channel_validator = EnumAttributeValidator.new('String', ["cc1", "cc2", "cc3", "cc4"])
|
130
130
|
return false unless language_channel_validator.valid?(@language_channel)
|
131
131
|
true
|
132
132
|
end
|
@@ -134,7 +134,7 @@ module MuxRuby
|
|
134
134
|
# Custom attribute writer method checking allowed values (enum).
|
135
135
|
# @param [Object] language_channel Object to be assigned
|
136
136
|
def language_channel=(language_channel)
|
137
|
-
validator = EnumAttributeValidator.new('String', ["cc1"])
|
137
|
+
validator = EnumAttributeValidator.new('String', ["cc1", "cc2", "cc3", "cc4"])
|
138
138
|
unless validator.valid?(language_channel)
|
139
139
|
fail ArgumentError, "invalid value for \"language_channel\", must be one of #{validator.allowable_values}."
|
140
140
|
end
|
@@ -0,0 +1,236 @@
|
|
1
|
+
=begin
|
2
|
+
#Mux API
|
3
|
+
|
4
|
+
#Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v1
|
7
|
+
Contact: devex@mux.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.0.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module MuxRuby
|
17
|
+
class MonitoringBreakdownTimeseriesDatapoint
|
18
|
+
attr_accessor :value
|
19
|
+
|
20
|
+
attr_accessor :metric_value
|
21
|
+
|
22
|
+
attr_accessor :concurrent_viewers
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'value' => :'value',
|
28
|
+
:'metric_value' => :'metric_value',
|
29
|
+
:'concurrent_viewers' => :'concurrent_viewers'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Returns all the JSON keys this model knows about
|
34
|
+
def self.acceptable_attributes
|
35
|
+
attribute_map.values
|
36
|
+
end
|
37
|
+
|
38
|
+
# Attribute type mapping.
|
39
|
+
def self.openapi_types
|
40
|
+
{
|
41
|
+
:'value' => :'String',
|
42
|
+
:'metric_value' => :'Float',
|
43
|
+
:'concurrent_viewers' => :'Integer'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# List of attributes with nullable: true
|
48
|
+
def self.openapi_nullable
|
49
|
+
Set.new([
|
50
|
+
])
|
51
|
+
end
|
52
|
+
|
53
|
+
# Initializes the object
|
54
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
55
|
+
def initialize(attributes = {})
|
56
|
+
if (!attributes.is_a?(Hash))
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::MonitoringBreakdownTimeseriesDatapoint` initialize method"
|
58
|
+
end
|
59
|
+
|
60
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
62
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::MonitoringBreakdownTimeseriesDatapoint`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
64
|
+
end
|
65
|
+
h[k.to_sym] = v
|
66
|
+
}
|
67
|
+
|
68
|
+
if attributes.key?(:'value')
|
69
|
+
self.value = attributes[:'value']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.key?(:'metric_value')
|
73
|
+
self.metric_value = attributes[:'metric_value']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.key?(:'concurrent_viewers')
|
77
|
+
self.concurrent_viewers = attributes[:'concurrent_viewers']
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
82
|
+
# @return Array for valid properties with the reasons
|
83
|
+
def list_invalid_properties
|
84
|
+
invalid_properties = Array.new
|
85
|
+
invalid_properties
|
86
|
+
end
|
87
|
+
|
88
|
+
# Check to see if the all the properties in the model are valid
|
89
|
+
# @return true if the model is valid
|
90
|
+
def valid?
|
91
|
+
true
|
92
|
+
end
|
93
|
+
|
94
|
+
# Checks equality by comparing each attribute.
|
95
|
+
# @param [Object] Object to be compared
|
96
|
+
def ==(o)
|
97
|
+
return true if self.equal?(o)
|
98
|
+
self.class == o.class &&
|
99
|
+
value == o.value &&
|
100
|
+
metric_value == o.metric_value &&
|
101
|
+
concurrent_viewers == o.concurrent_viewers
|
102
|
+
end
|
103
|
+
|
104
|
+
# @see the `==` method
|
105
|
+
# @param [Object] Object to be compared
|
106
|
+
def eql?(o)
|
107
|
+
self == o
|
108
|
+
end
|
109
|
+
|
110
|
+
# Calculates hash code according to all attributes.
|
111
|
+
# @return [Integer] Hash code
|
112
|
+
def hash
|
113
|
+
[value, metric_value, concurrent_viewers].hash
|
114
|
+
end
|
115
|
+
|
116
|
+
# Builds the object from hash
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
118
|
+
# @return [Object] Returns the model itself
|
119
|
+
def self.build_from_hash(attributes)
|
120
|
+
new.build_from_hash(attributes)
|
121
|
+
end
|
122
|
+
|
123
|
+
# Builds the object from hash
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
125
|
+
# @return [Object] Returns the model itself
|
126
|
+
def build_from_hash(attributes)
|
127
|
+
return nil unless attributes.is_a?(Hash)
|
128
|
+
self.class.openapi_types.each_pair do |key, type|
|
129
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
130
|
+
self.send("#{key}=", nil)
|
131
|
+
elsif type =~ /\AArray<(.*)>/i
|
132
|
+
# check to ensure the input is an array given that the attribute
|
133
|
+
# is documented as an array but the input is not
|
134
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
135
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
136
|
+
end
|
137
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
138
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
self
|
143
|
+
end
|
144
|
+
|
145
|
+
# Deserializes the data based on type
|
146
|
+
# @param string type Data type
|
147
|
+
# @param string value Value to be deserialized
|
148
|
+
# @return [Object] Deserialized data
|
149
|
+
def _deserialize(type, value)
|
150
|
+
case type.to_sym
|
151
|
+
when :Time
|
152
|
+
Time.parse(value)
|
153
|
+
when :Date
|
154
|
+
Date.parse(value)
|
155
|
+
when :String
|
156
|
+
value.to_s
|
157
|
+
when :Integer
|
158
|
+
value.to_i
|
159
|
+
when :Float
|
160
|
+
value.to_f
|
161
|
+
when :Boolean
|
162
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
163
|
+
true
|
164
|
+
else
|
165
|
+
false
|
166
|
+
end
|
167
|
+
when :Object
|
168
|
+
# generic object (usually a Hash), return directly
|
169
|
+
value
|
170
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
171
|
+
inner_type = Regexp.last_match[:inner_type]
|
172
|
+
value.map { |v| _deserialize(inner_type, v) }
|
173
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
174
|
+
k_type = Regexp.last_match[:k_type]
|
175
|
+
v_type = Regexp.last_match[:v_type]
|
176
|
+
{}.tap do |hash|
|
177
|
+
value.each do |k, v|
|
178
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
else # model
|
182
|
+
# models (e.g. Pet) or oneOf
|
183
|
+
klass = MuxRuby.const_get(type)
|
184
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
# Returns the string representation of the object
|
189
|
+
# @return [String] String presentation of the object
|
190
|
+
def to_s
|
191
|
+
to_hash.to_s
|
192
|
+
end
|
193
|
+
|
194
|
+
# to_body is an alias to to_hash (backward compatibility)
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
196
|
+
def to_body
|
197
|
+
to_hash
|
198
|
+
end
|
199
|
+
|
200
|
+
# Returns the object in the form of hash
|
201
|
+
# @return [Hash] Returns the object in the form of hash
|
202
|
+
def to_hash
|
203
|
+
hash = {}
|
204
|
+
self.class.attribute_map.each_pair do |attr, param|
|
205
|
+
value = self.send(attr)
|
206
|
+
if value.nil?
|
207
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
208
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
209
|
+
end
|
210
|
+
|
211
|
+
hash[param] = _to_hash(value)
|
212
|
+
end
|
213
|
+
hash
|
214
|
+
end
|
215
|
+
|
216
|
+
# Outputs non-array value in the form of hash
|
217
|
+
# For object, use to_hash. Otherwise, just return the value
|
218
|
+
# @param [Object] value Any valid value
|
219
|
+
# @return [Hash] Returns the value in the form of hash
|
220
|
+
def _to_hash(value)
|
221
|
+
if value.is_a?(Array)
|
222
|
+
value.compact.map { |v| _to_hash(v) }
|
223
|
+
elsif value.is_a?(Hash)
|
224
|
+
{}.tap do |hash|
|
225
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
226
|
+
end
|
227
|
+
elsif value.respond_to? :to_hash
|
228
|
+
value.to_hash
|
229
|
+
else
|
230
|
+
value
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
234
|
+
end
|
235
|
+
|
236
|
+
end
|