shotstack 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +387 -23
- data/lib/shotstack/models/asset.rb +1 -1
- data/lib/shotstack/models/asset_render_response.rb +5 -0
- data/lib/shotstack/models/asset_response.rb +5 -0
- data/lib/shotstack/models/asset_response_attributes.rb +15 -0
- data/lib/shotstack/models/asset_response_data.rb +10 -0
- data/lib/shotstack/models/audio_asset.rb +0 -2
- data/lib/shotstack/models/clip.rb +5 -11
- data/lib/shotstack/models/destinations.rb +6 -7
- data/lib/shotstack/models/edit.rb +1 -3
- data/lib/shotstack/models/flip_transformation.rb +0 -4
- data/lib/shotstack/models/html_asset.rb +0 -4
- data/lib/shotstack/models/mux_destination.rb +1 -1
- data/lib/shotstack/models/offset.rb +22 -26
- data/lib/shotstack/models/output.rb +15 -8
- data/lib/shotstack/models/render_response_data.rb +2 -15
- data/lib/shotstack/models/rotate_transformation.rb +0 -2
- data/lib/shotstack/models/s3_destination.rb +236 -0
- data/lib/shotstack/models/s3_destination_options.rb +270 -0
- data/lib/shotstack/models/shotstack_destination.rb +2 -4
- data/lib/shotstack/models/size.rb +3 -3
- data/lib/shotstack/models/skew_transformation.rb +0 -4
- data/lib/shotstack/models/soundtrack.rb +0 -2
- data/lib/shotstack/models/template_data_response.rb +1 -1
- data/lib/shotstack/models/template_data_response_data.rb +1 -2
- data/lib/shotstack/models/template_list_response_item.rb +0 -10
- data/lib/shotstack/models/template_render.rb +1 -1
- data/lib/shotstack/models/template_response.rb +1 -1
- data/lib/shotstack/models/timeline.rb +0 -4
- data/lib/shotstack/models/title_asset.rb +1 -7
- data/lib/shotstack/models/video_asset.rb +46 -2
- data/lib/shotstack/version.rb +1 -1
- data/lib/shotstack.rb +2 -0
- metadata +15 -12
@@ -171,12 +171,27 @@ module Shotstack
|
|
171
171
|
# @return Array for valid properties with the reasons
|
172
172
|
def list_invalid_properties
|
173
173
|
invalid_properties = Array.new
|
174
|
+
if @id.nil?
|
175
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
176
|
+
end
|
177
|
+
|
178
|
+
if @owner.nil?
|
179
|
+
invalid_properties.push('invalid value for "owner", owner cannot be nil.')
|
180
|
+
end
|
181
|
+
|
182
|
+
if @status.nil?
|
183
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
184
|
+
end
|
185
|
+
|
174
186
|
invalid_properties
|
175
187
|
end
|
176
188
|
|
177
189
|
# Check to see if the all the properties in the model are valid
|
178
190
|
# @return true if the model is valid
|
179
191
|
def valid?
|
192
|
+
return false if @id.nil?
|
193
|
+
return false if @owner.nil?
|
194
|
+
return false if @status.nil?
|
180
195
|
status_validator = EnumAttributeValidator.new('String', ["importing", "ready", "failed", "deleted"])
|
181
196
|
return false unless status_validator.valid?(@status)
|
182
197
|
true
|
@@ -76,12 +76,22 @@ module Shotstack
|
|
76
76
|
# @return Array for valid properties with the reasons
|
77
77
|
def list_invalid_properties
|
78
78
|
invalid_properties = Array.new
|
79
|
+
if @type.nil?
|
80
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
81
|
+
end
|
82
|
+
|
83
|
+
if @attributes.nil?
|
84
|
+
invalid_properties.push('invalid value for "attributes", attributes cannot be nil.')
|
85
|
+
end
|
86
|
+
|
79
87
|
invalid_properties
|
80
88
|
end
|
81
89
|
|
82
90
|
# Check to see if the all the properties in the model are valid
|
83
91
|
# @return true if the model is valid
|
84
92
|
def valid?
|
93
|
+
return false if @type.nil?
|
94
|
+
return false if @attributes.nil?
|
85
95
|
true
|
86
96
|
end
|
87
97
|
|
@@ -24,7 +24,7 @@ module Shotstack
|
|
24
24
|
# The length, in seconds, the Clip should play for.
|
25
25
|
attr_accessor :length
|
26
26
|
|
27
|
-
# Set how the asset should be scaled to fit the viewport using one of the following options: <ul> <li>`
|
27
|
+
# Set how the asset should be scaled to fit the viewport using one of the following options: <ul> <li>`crop` <b>(default)</b> - scale the asset to fill the viewport while maintaining the aspect ratio. The asset will be cropped if it exceeds the bounds of the viewport.</li> <li>`cover` - stretch the asset to fill the viewport without maintaining the aspect ratio.</li> <li>`contain` - fit the entire asset within the viewport while maintaining the original aspect ratio.</li> <li>`none` - preserves the original asset dimensions and does not apply any scaling.</li> </ul>
|
28
28
|
attr_accessor :fit
|
29
29
|
|
30
30
|
# Scale the asset to a fraction of the viewport size - i.e. setting the scale to 0.5 will scale asset to half the size of the viewport. This is useful for picture-in-picture video and scaling images such as logos and watermarks.
|
@@ -37,10 +37,10 @@ module Shotstack
|
|
37
37
|
|
38
38
|
attr_accessor :transition
|
39
39
|
|
40
|
-
# A motion effect to apply to the Clip. <ul> <li>`zoomIn` - slow zoom in</li> <li>`zoomOut` - slow zoom out</li> <li>`slideLeft` - slow slide (pan) left</li> <li>`slideRight` - slow slide (pan) right</li> <li>`slideUp` - slow slide (pan) up</li> <li>`slideDown` - slow slide (pan) down</li> </ul>
|
40
|
+
# A motion effect to apply to the Clip. <ul> <li>`zoomIn` - slow zoom in</li> <li>`zoomOut` - slow zoom out</li> <li>`slideLeft` - slow slide (pan) left</li> <li>`slideRight` - slow slide (pan) right</li> <li>`slideUp` - slow slide (pan) up</li> <li>`slideDown` - slow slide (pan) down</li> </ul> The motion effect speed can also be controlled by appending `Fast` or `Slow` to the effect, e.g. `zoomInFast` or `slideRightSlow`.
|
41
41
|
attr_accessor :effect
|
42
42
|
|
43
|
-
# A filter effect to apply to the Clip. <ul> <li>`boost` - boost contrast and saturation</li> <li>`contrast` - increase contrast</li> <li>`darken` - darken the scene</li> <li>`greyscale` - remove colour</li> <li>`lighten` - lighten the scene</li> <li>`muted` - reduce saturation and contrast</li> <li>`
|
43
|
+
# A filter effect to apply to the Clip. <ul> <li>`boost` - boost contrast and saturation</li> <li>`contrast` - increase contrast</li> <li>`darken` - darken the scene</li> <li>`greyscale` - remove colour</li> <li>`lighten` - lighten the scene</li> <li>`muted` - reduce saturation and contrast</li> <li>`negative` - negative colors</li> </ul>
|
44
44
|
attr_accessor :filter
|
45
45
|
|
46
46
|
# Sets the opacity of the Clip where 1 is opaque and 0 is transparent.
|
@@ -146,8 +146,6 @@ module Shotstack
|
|
146
146
|
|
147
147
|
if attributes.key?(:'fit')
|
148
148
|
self.fit = attributes[:'fit']
|
149
|
-
else
|
150
|
-
self.fit = 'crop'
|
151
149
|
end
|
152
150
|
|
153
151
|
if attributes.key?(:'scale')
|
@@ -156,8 +154,6 @@ module Shotstack
|
|
156
154
|
|
157
155
|
if attributes.key?(:'position')
|
158
156
|
self.position = attributes[:'position']
|
159
|
-
else
|
160
|
-
self.position = 'center'
|
161
157
|
end
|
162
158
|
|
163
159
|
if attributes.key?(:'offset')
|
@@ -178,8 +174,6 @@ module Shotstack
|
|
178
174
|
|
179
175
|
if attributes.key?(:'opacity')
|
180
176
|
self.opacity = attributes[:'opacity']
|
181
|
-
else
|
182
|
-
self.opacity = 1
|
183
177
|
end
|
184
178
|
|
185
179
|
if attributes.key?(:'transform')
|
@@ -216,7 +210,7 @@ module Shotstack
|
|
216
210
|
return false unless fit_validator.valid?(@fit)
|
217
211
|
position_validator = EnumAttributeValidator.new('String', ["top", "topRight", "right", "bottomRight", "bottom", "bottomLeft", "left", "topLeft", "center"])
|
218
212
|
return false unless position_validator.valid?(@position)
|
219
|
-
effect_validator = EnumAttributeValidator.new('String', ["zoomIn", "zoomOut", "slideLeft", "slideRight", "slideUp", "slideDown"])
|
213
|
+
effect_validator = EnumAttributeValidator.new('String', ["zoomIn", "zoomInSlow", "zoomInFast", "zoomOut", "zoomOutSlow", "zoomOutFast", "slideLeft", "slideLeftSLow", "slideLeftFast", "slideRight", "slideRightSlow", "slideRightFast", "slideUp", "slideUpSlow", "slideUpFast", "slideDown", "slideDownSlow", "slideDownFast"])
|
220
214
|
return false unless effect_validator.valid?(@effect)
|
221
215
|
filter_validator = EnumAttributeValidator.new('String', ["boost", "contrast", "darken", "greyscale", "lighten", "muted", "negative"])
|
222
216
|
return false unless filter_validator.valid?(@filter)
|
@@ -246,7 +240,7 @@ module Shotstack
|
|
246
240
|
# Custom attribute writer method checking allowed values (enum).
|
247
241
|
# @param [Object] effect Object to be assigned
|
248
242
|
def effect=(effect)
|
249
|
-
validator = EnumAttributeValidator.new('String', ["zoomIn", "zoomOut", "slideLeft", "slideRight", "slideUp", "slideDown"])
|
243
|
+
validator = EnumAttributeValidator.new('String', ["zoomIn", "zoomInSlow", "zoomInFast", "zoomOut", "zoomOutSlow", "zoomOutFast", "slideLeft", "slideLeftSLow", "slideLeftFast", "slideRight", "slideRightSlow", "slideRightFast", "slideUp", "slideUpSlow", "slideUpFast", "slideDown", "slideDownSlow", "slideDownFast"])
|
250
244
|
unless validator.valid?(effect)
|
251
245
|
fail ArgumentError, "invalid value for \"effect\", must be one of #{validator.allowable_values}."
|
252
246
|
end
|
@@ -14,12 +14,12 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Shotstack
|
17
|
-
# A destination is a location where output files can be sent to for serving or hosting. By default all rendered assets are automatically sent to the [Shotstack hosting destination](https://shotstack.io/docs/guide/serving-assets/hosting). You can add other destinations to send assets to. The following destinations are available:
|
17
|
+
# A destination is a location where output files can be sent to for serving or hosting. By default all rendered assets are automatically sent to the [Shotstack hosting destination](https://shotstack.io/docs/guide/serving-assets/hosting). You can add other destinations to send assets to. The following destinations are available: <ul> <li><a href=\"#tocs_shotstackdestination\">ShotstackDestination</a></li> <li><a href=\"#tocs_muxdestination\">MuxDestination</a></li> <li><a href=\"#tocs_s3destination\">S3Destination</a></li> </ul>
|
18
18
|
class Destinations
|
19
|
-
# The destination to send rendered assets to - set to `
|
19
|
+
# The destination to send rendered assets to - set to `s3` for S3.
|
20
20
|
attr_accessor :provider
|
21
21
|
|
22
|
-
# Set to `true` to opt-out from the Shotstack hosting and CDN service. All files must be downloaded within 24 hours of rendering.
|
22
|
+
# Set to `true` to [opt-out](https://shotstack.io/docs/guide/serving-assets/self-host) from the Shotstack hosting and CDN service. All files must be downloaded within 24 hours of rendering.
|
23
23
|
attr_accessor :exclude
|
24
24
|
|
25
25
|
attr_accessor :options
|
@@ -43,7 +43,7 @@ module Shotstack
|
|
43
43
|
{
|
44
44
|
:'provider' => :'String',
|
45
45
|
:'exclude' => :'Boolean',
|
46
|
-
:'options' => :'
|
46
|
+
:'options' => :'S3DestinationOptions'
|
47
47
|
}
|
48
48
|
end
|
49
49
|
|
@@ -57,6 +57,7 @@ module Shotstack
|
|
57
57
|
def self.openapi_any_of
|
58
58
|
[
|
59
59
|
:'MuxDestination',
|
60
|
+
:'S3Destination',
|
60
61
|
:'ShotstackDestination'
|
61
62
|
]
|
62
63
|
end
|
@@ -84,13 +85,11 @@ module Shotstack
|
|
84
85
|
if attributes.key?(:'provider')
|
85
86
|
self.provider = attributes[:'provider']
|
86
87
|
else
|
87
|
-
self.provider = '
|
88
|
+
self.provider = 's3'
|
88
89
|
end
|
89
90
|
|
90
91
|
if attributes.key?(:'exclude')
|
91
92
|
self.exclude = attributes[:'exclude']
|
92
|
-
else
|
93
|
-
self.exclude = false
|
94
93
|
end
|
95
94
|
|
96
95
|
if attributes.key?(:'options')
|
@@ -26,7 +26,7 @@ module Shotstack
|
|
26
26
|
# An optional webhook callback URL used to receive status notifications when a render completes or fails. See [webhooks](https://shotstack.io/docs/guide/architecting-an-application/webhooks) for more details.
|
27
27
|
attr_accessor :callback
|
28
28
|
|
29
|
-
# The disk type to use for storing footage and assets for each render. See [disk types](https://shotstack.io/docs/guide/architecting-an-application/disk-types) for more details. <ul> <li>`local` - optimized for high speed rendering with up to 512MB storage</li> <li>`mount` - optimized for larger file sizes and longer videos with 5GB for source footage and 512MB for output render</li> </ul>
|
29
|
+
# **Notice: This option is now deprecated and will be removed. Disk types are handled automatically. Setting a disk type has no effect.** The disk type to use for storing footage and assets for each render. See [disk types](https://shotstack.io/docs/guide/architecting-an-application/disk-types) for more details. <ul> <li>`local` - optimized for high speed rendering with up to 512MB storage</li> <li>`mount` - optimized for larger file sizes and longer videos with 5GB for source footage and 512MB for output render</li> </ul>
|
30
30
|
attr_accessor :disk
|
31
31
|
|
32
32
|
class EnumAttributeValidator
|
@@ -119,8 +119,6 @@ module Shotstack
|
|
119
119
|
|
120
120
|
if attributes.key?(:'disk')
|
121
121
|
self.disk = attributes[:'disk']
|
122
|
-
else
|
123
|
-
self.disk = 'local'
|
124
122
|
end
|
125
123
|
end
|
126
124
|
|
@@ -66,14 +66,10 @@ module Shotstack
|
|
66
66
|
|
67
67
|
if attributes.key?(:'horizontal')
|
68
68
|
self.horizontal = attributes[:'horizontal']
|
69
|
-
else
|
70
|
-
self.horizontal = false
|
71
69
|
end
|
72
70
|
|
73
71
|
if attributes.key?(:'vertical')
|
74
72
|
self.vertical = attributes[:'vertical']
|
75
|
-
else
|
76
|
-
self.vertical = false
|
77
73
|
end
|
78
74
|
end
|
79
75
|
|
@@ -135,14 +135,10 @@ module Shotstack
|
|
135
135
|
|
136
136
|
if attributes.key?(:'background')
|
137
137
|
self.background = attributes[:'background']
|
138
|
-
else
|
139
|
-
self.background = 'transparent'
|
140
138
|
end
|
141
139
|
|
142
140
|
if attributes.key?(:'position')
|
143
141
|
self.position = attributes[:'position']
|
144
|
-
else
|
145
|
-
self.position = 'center'
|
146
142
|
end
|
147
143
|
end
|
148
144
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Shotstack
|
17
|
-
# Send rendered videos to the [Mux](https://
|
17
|
+
# Send rendered videos to the [Mux](https://shotstack.io/docs/guide/serving-assets/destinations/mux) video hosting and streaming service. Mux credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/mux), not in the request.
|
18
18
|
class MuxDestination
|
19
19
|
# The destination to send rendered assets to - set to `mux` for Mux.
|
20
20
|
attr_accessor :provider
|
@@ -16,10 +16,10 @@ require 'time'
|
|
16
16
|
module Shotstack
|
17
17
|
# Offsets the position of an asset horizontally or vertically by a relative distance.
|
18
18
|
class Offset
|
19
|
-
# Offset an asset on the horizontal axis (left or right), range varies from -
|
19
|
+
# Offset an asset on the horizontal axis (left or right), range varies from -10 to 10. Positive numbers move the asset right, negative left. For all assets except titles the distance moved is relative to the width of the viewport - i.e. an X offset of 0.5 will move the asset half the screen width to the right.
|
20
20
|
attr_accessor :x
|
21
21
|
|
22
|
-
# Offset an asset on the vertical axis (up or down), range varies from -
|
22
|
+
# Offset an asset on the vertical axis (up or down), range varies from -10 to 10. Positive numbers move the asset up, negative down. For all assets except titles the distance moved is relative to the height of the viewport - i.e. an Y offset of 0.5 will move the asset up half the screen height.
|
23
23
|
attr_accessor :y
|
24
24
|
|
25
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -66,14 +66,10 @@ module Shotstack
|
|
66
66
|
|
67
67
|
if attributes.key?(:'x')
|
68
68
|
self.x = attributes[:'x']
|
69
|
-
else
|
70
|
-
self.x = 0
|
71
69
|
end
|
72
70
|
|
73
71
|
if attributes.key?(:'y')
|
74
72
|
self.y = attributes[:'y']
|
75
|
-
else
|
76
|
-
self.y = 0
|
77
73
|
end
|
78
74
|
end
|
79
75
|
|
@@ -81,20 +77,20 @@ module Shotstack
|
|
81
77
|
# @return Array for valid properties with the reasons
|
82
78
|
def list_invalid_properties
|
83
79
|
invalid_properties = Array.new
|
84
|
-
if !@x.nil? && @x >
|
85
|
-
invalid_properties.push('invalid value for "x", must be smaller than or equal to
|
80
|
+
if !@x.nil? && @x > 10
|
81
|
+
invalid_properties.push('invalid value for "x", must be smaller than or equal to 10.')
|
86
82
|
end
|
87
83
|
|
88
|
-
if !@x.nil? && @x < -
|
89
|
-
invalid_properties.push('invalid value for "x", must be greater than or equal to -
|
84
|
+
if !@x.nil? && @x < -10
|
85
|
+
invalid_properties.push('invalid value for "x", must be greater than or equal to -10.')
|
90
86
|
end
|
91
87
|
|
92
|
-
if !@y.nil? && @y >
|
93
|
-
invalid_properties.push('invalid value for "y", must be smaller than or equal to
|
88
|
+
if !@y.nil? && @y > 10
|
89
|
+
invalid_properties.push('invalid value for "y", must be smaller than or equal to 10.')
|
94
90
|
end
|
95
91
|
|
96
|
-
if !@y.nil? && @y < -
|
97
|
-
invalid_properties.push('invalid value for "y", must be greater than or equal to -
|
92
|
+
if !@y.nil? && @y < -10
|
93
|
+
invalid_properties.push('invalid value for "y", must be greater than or equal to -10.')
|
98
94
|
end
|
99
95
|
|
100
96
|
invalid_properties
|
@@ -103,22 +99,22 @@ module Shotstack
|
|
103
99
|
# Check to see if the all the properties in the model are valid
|
104
100
|
# @return true if the model is valid
|
105
101
|
def valid?
|
106
|
-
return false if !@x.nil? && @x >
|
107
|
-
return false if !@x.nil? && @x < -
|
108
|
-
return false if !@y.nil? && @y >
|
109
|
-
return false if !@y.nil? && @y < -
|
102
|
+
return false if !@x.nil? && @x > 10
|
103
|
+
return false if !@x.nil? && @x < -10
|
104
|
+
return false if !@y.nil? && @y > 10
|
105
|
+
return false if !@y.nil? && @y < -10
|
110
106
|
true
|
111
107
|
end
|
112
108
|
|
113
109
|
# Custom attribute writer method with validation
|
114
110
|
# @param [Object] x Value to be assigned
|
115
111
|
def x=(x)
|
116
|
-
if !x.nil? && x >
|
117
|
-
fail ArgumentError, 'invalid value for "x", must be smaller than or equal to
|
112
|
+
if !x.nil? && x > 10
|
113
|
+
fail ArgumentError, 'invalid value for "x", must be smaller than or equal to 10.'
|
118
114
|
end
|
119
115
|
|
120
|
-
if !x.nil? && x < -
|
121
|
-
fail ArgumentError, 'invalid value for "x", must be greater than or equal to -
|
116
|
+
if !x.nil? && x < -10
|
117
|
+
fail ArgumentError, 'invalid value for "x", must be greater than or equal to -10.'
|
122
118
|
end
|
123
119
|
|
124
120
|
@x = x
|
@@ -127,12 +123,12 @@ module Shotstack
|
|
127
123
|
# Custom attribute writer method with validation
|
128
124
|
# @param [Object] y Value to be assigned
|
129
125
|
def y=(y)
|
130
|
-
if !y.nil? && y >
|
131
|
-
fail ArgumentError, 'invalid value for "y", must be smaller than or equal to
|
126
|
+
if !y.nil? && y > 10
|
127
|
+
fail ArgumentError, 'invalid value for "y", must be smaller than or equal to 10.'
|
132
128
|
end
|
133
129
|
|
134
|
-
if !y.nil? && y < -
|
135
|
-
fail ArgumentError, 'invalid value for "y", must be greater than or equal to -
|
130
|
+
if !y.nil? && y < -10
|
131
|
+
fail ArgumentError, 'invalid value for "y", must be greater than or equal to -10.'
|
136
132
|
end
|
137
133
|
|
138
134
|
@y = y
|
@@ -22,29 +22,33 @@ module Shotstack
|
|
22
22
|
# The output resolution of the video or image. <ul> <li>`preview` - 512px x 288px @ 15fps</li> <li>`mobile` - 640px x 360px @ 25fps</li> <li>`sd` - 1024px x 576px @ 25fps</li> <li>`hd` - 1280px x 720px @ 25fps</li> <li>`1080` - 1920px x 1080px @ 25fps</li> </ul>
|
23
23
|
attr_accessor :resolution
|
24
24
|
|
25
|
-
# The aspect ratio (shape) of the video or image. Useful for social media output formats. Options are: <ul> <li>`16:9` - regular landscape/horizontal aspect ratio
|
25
|
+
# The aspect ratio (shape) of the video or image. Useful for social media output formats. Options are: <ul> <li>`16:9` (default) - regular landscape/horizontal aspect ratio</li> <li>`9:16` - vertical/portrait aspect ratio</li> <li>`1:1` - square aspect ratio</li> <li>`4:5` - short vertical/portrait aspect ratio</li> <li>`4:3` - legacy TV aspect ratio</li> </ul>
|
26
26
|
attr_accessor :aspect_ratio
|
27
27
|
|
28
28
|
attr_accessor :size
|
29
29
|
|
30
|
-
# Override the default frames per second. Useful for when the source footage is recorded at 30fps, i.e. on mobile devices. Lower frame rates can be used to add cinematic quality (24fps) or to create smaller file size/faster render times or animated gifs (12 or 15fps). Default is 25fps. <ul> <li>`12` - 12fps</li> <li>`15` - 15fps</li> <li>`24` - 24fps</li> <li>`23.976` - 23.976fps</li> <li>`25` - 25fps</li> <li>`29.97` - 29.97fps</li> <li>`30` - 30fps</li> </ul>
|
30
|
+
# Override the default frames per second. Useful for when the source footage is recorded at 30fps, i.e. on mobile devices. Lower frame rates can be used to add cinematic quality (24fps) or to create smaller file size/faster render times or animated gifs (12 or 15fps). Default is 25fps. <ul> <li>`12` - 12fps</li> <li>`15` - 15fps</li> <li>`24` - 24fps</li> <li>`23.976` - 23.976fps</li> <li>`25` (default) - 25fps</li> <li>`29.97` - 29.97fps</li> <li>`30` - 30fps</li> </ul>
|
31
31
|
attr_accessor :fps
|
32
32
|
|
33
33
|
# Override the resolution and scale the video or image to render at a different size. When using scaleTo the asset should be edited at the resolution dimensions, i.e. use font sizes that look best at HD, then use scaleTo to output the file at SD and the text will be scaled to the correct size. This is useful if you want to create multiple asset sizes. <ul> <li>`preview` - 512px x 288px @ 15fps</li> <li>`mobile` - 640px x 360px @ 25fps</li> <li>`sd` - 1024px x 576px @25fps</li> <li>`hd` - 1280px x 720px @25fps</li> <li>`1080` - 1920px x 1080px @25fps</li> </ul>
|
34
34
|
attr_accessor :scale_to
|
35
35
|
|
36
|
-
# Adjust the output quality of the video, image or audio. Adjusting quality affects render speed, download speeds and storage requirements due to file size. The default `medium` provides the most optimized choice for all three factors. <ul> <li>`low` - slightly reduced quality, smaller file size</li> <li>`medium` - optimized quality, render speeds and file size</li> <li>`high` - slightly increased quality, larger file size</li> </ul>
|
36
|
+
# Adjust the output quality of the video, image or audio. Adjusting quality affects render speed, download speeds and storage requirements due to file size. The default `medium` provides the most optimized choice for all three factors. <ul> <li>`low` - slightly reduced quality, smaller file size</li> <li>`medium` (default) - optimized quality, render speeds and file size</li> <li>`high` - slightly increased quality, larger file size</li> </ul>
|
37
37
|
attr_accessor :quality
|
38
38
|
|
39
39
|
# Loop settings for gif files. Set to `true` to loop, `false` to play only once.
|
40
40
|
attr_accessor :repeat
|
41
41
|
|
42
|
+
# Mute the audio track of the output video. Set to `true` to mute, `false` to un-mute.
|
43
|
+
attr_accessor :mute
|
44
|
+
|
42
45
|
attr_accessor :range
|
43
46
|
|
44
47
|
attr_accessor :poster
|
45
48
|
|
46
49
|
attr_accessor :thumbnail
|
47
50
|
|
51
|
+
# Specify the storage locations and hosting services to send rendered videos to.
|
48
52
|
attr_accessor :destinations
|
49
53
|
|
50
54
|
class EnumAttributeValidator
|
@@ -80,6 +84,7 @@ module Shotstack
|
|
80
84
|
:'scale_to' => :'scaleTo',
|
81
85
|
:'quality' => :'quality',
|
82
86
|
:'repeat' => :'repeat',
|
87
|
+
:'mute' => :'mute',
|
83
88
|
:'range' => :'range',
|
84
89
|
:'poster' => :'poster',
|
85
90
|
:'thumbnail' => :'thumbnail',
|
@@ -103,6 +108,7 @@ module Shotstack
|
|
103
108
|
:'scale_to' => :'String',
|
104
109
|
:'quality' => :'String',
|
105
110
|
:'repeat' => :'Boolean',
|
111
|
+
:'mute' => :'Boolean',
|
106
112
|
:'range' => :'Range',
|
107
113
|
:'poster' => :'Poster',
|
108
114
|
:'thumbnail' => :'Thumbnail',
|
@@ -157,14 +163,14 @@ module Shotstack
|
|
157
163
|
|
158
164
|
if attributes.key?(:'quality')
|
159
165
|
self.quality = attributes[:'quality']
|
160
|
-
else
|
161
|
-
self.quality = 'medium'
|
162
166
|
end
|
163
167
|
|
164
168
|
if attributes.key?(:'repeat')
|
165
169
|
self.repeat = attributes[:'repeat']
|
166
|
-
|
167
|
-
|
170
|
+
end
|
171
|
+
|
172
|
+
if attributes.key?(:'mute')
|
173
|
+
self.mute = attributes[:'mute']
|
168
174
|
end
|
169
175
|
|
170
176
|
if attributes.key?(:'range')
|
@@ -289,6 +295,7 @@ module Shotstack
|
|
289
295
|
scale_to == o.scale_to &&
|
290
296
|
quality == o.quality &&
|
291
297
|
repeat == o.repeat &&
|
298
|
+
mute == o.mute &&
|
292
299
|
range == o.range &&
|
293
300
|
poster == o.poster &&
|
294
301
|
thumbnail == o.thumbnail &&
|
@@ -304,7 +311,7 @@ module Shotstack
|
|
304
311
|
# Calculates hash code according to all attributes.
|
305
312
|
# @return [Integer] Hash code
|
306
313
|
def hash
|
307
|
-
[format, resolution, aspect_ratio, size, fps, scale_to, quality, repeat, range, poster, thumbnail, destinations].hash
|
314
|
+
[format, resolution, aspect_ratio, size, fps, scale_to, quality, repeat, mute, range, poster, thumbnail, destinations].hash
|
308
315
|
end
|
309
316
|
|
310
317
|
# Builds the object from hash
|
@@ -122,6 +122,8 @@ module Shotstack
|
|
122
122
|
# List of attributes with nullable: true
|
123
123
|
def self.openapi_nullable
|
124
124
|
Set.new([
|
125
|
+
:'poster',
|
126
|
+
:'thumbnail',
|
125
127
|
])
|
126
128
|
end
|
127
129
|
|
@@ -209,18 +211,6 @@ module Shotstack
|
|
209
211
|
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
210
212
|
end
|
211
213
|
|
212
|
-
if @data.nil?
|
213
|
-
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
214
|
-
end
|
215
|
-
|
216
|
-
if @created.nil?
|
217
|
-
invalid_properties.push('invalid value for "created", created cannot be nil.')
|
218
|
-
end
|
219
|
-
|
220
|
-
if @updated.nil?
|
221
|
-
invalid_properties.push('invalid value for "updated", updated cannot be nil.')
|
222
|
-
end
|
223
|
-
|
224
214
|
invalid_properties
|
225
215
|
end
|
226
216
|
|
@@ -232,9 +222,6 @@ module Shotstack
|
|
232
222
|
return false if @status.nil?
|
233
223
|
status_validator = EnumAttributeValidator.new('String', ["queued", "fetching", "rendering", "saving", "done", "failed"])
|
234
224
|
return false unless status_validator.valid?(@status)
|
235
|
-
return false if @data.nil?
|
236
|
-
return false if @created.nil?
|
237
|
-
return false if @updated.nil?
|
238
225
|
true
|
239
226
|
end
|
240
227
|
|