Skip to content

Commit 6924f47

Browse files
authored
Merge pull request #27 from shotstack/s3-volume-effects
SDK uopdates and readme sync
2 parents 320fdc6 + 0259f46 commit 6924f47

17 files changed

+1416
-49
lines changed

README.md

Lines changed: 385 additions & 7 deletions
Large diffs are not rendered by default.

src/Model/Asset.php

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* Asset Class Doc Comment
3636
*
3737
* @category Class
38-
* @description The type of asset to display for the duration of this Clip. Value must be one of: <ul> <li><a href=\"#tocs_videoasset\">VideoAsset</a></li> <li><a href=\"#tocs_imageasset\">ImageAsset</a></li> <li><a href=\"#tocs_titleasset\">TitleAsset</a></li> <li><a href=\"#tocs_htmlasset\">HtmlAsset</a></li> <li><a href=\"#tocs_audioasset\">AudioAsset</a></li> <li><a href=\"#tocs_lumaasset\">LumaAsset</a></li> </ul>
38+
* @description The type of asset to display for the duration of the Clip. Value must be one of: <ul> <li><a href=\"#tocs_videoasset\">VideoAsset</a></li> <li><a href=\"#tocs_imageasset\">ImageAsset</a></li> <li><a href=\"#tocs_titleasset\">TitleAsset</a></li> <li><a href=\"#tocs_htmlasset\">HtmlAsset</a></li> <li><a href=\"#tocs_audioasset\">AudioAsset</a></li> <li><a href=\"#tocs_lumaasset\">LumaAsset</a></li> </ul>
3939
* @package Shotstack\Client
4040
* @author OpenAPI Generator team
4141
* @link https://openapi-generator.tech
@@ -64,6 +64,7 @@ class Asset implements ModelInterface, ArrayAccess, \JsonSerializable
6464
'src' => 'string',
6565
'trim' => 'float',
6666
'volume' => 'float',
67+
'volume_effect' => 'string',
6768
'crop' => '\Shotstack\Client\Model\Crop',
6869
'text' => 'string',
6970
'style' => 'string',
@@ -91,6 +92,7 @@ class Asset implements ModelInterface, ArrayAccess, \JsonSerializable
9192
'src' => null,
9293
'trim' => null,
9394
'volume' => null,
95+
'volume_effect' => null,
9496
'crop' => null,
9597
'text' => null,
9698
'style' => null,
@@ -137,6 +139,7 @@ public static function openAPIFormats()
137139
'src' => 'src',
138140
'trim' => 'trim',
139141
'volume' => 'volume',
142+
'volume_effect' => 'volumeEffect',
140143
'crop' => 'crop',
141144
'text' => 'text',
142145
'style' => 'style',
@@ -162,6 +165,7 @@ public static function openAPIFormats()
162165
'src' => 'setSrc',
163166
'trim' => 'setTrim',
164167
'volume' => 'setVolume',
168+
'volume_effect' => 'setVolumeEffect',
165169
'crop' => 'setCrop',
166170
'text' => 'setText',
167171
'style' => 'setStyle',
@@ -187,6 +191,7 @@ public static function openAPIFormats()
187191
'src' => 'getSrc',
188192
'trim' => 'getTrim',
189193
'volume' => 'getVolume',
194+
'volume_effect' => 'getVolumeEffect',
190195
'crop' => 'getCrop',
191196
'text' => 'getText',
192197
'style' => 'getStyle',
@@ -243,6 +248,9 @@ public function getModelName()
243248
return self::$openAPIModelName;
244249
}
245250

251+
const VOLUME_EFFECT_FADE_IN = 'fadeIn';
252+
const VOLUME_EFFECT_FADE_OUT = 'fadeOut';
253+
const VOLUME_EFFECT_FADE_IN_FADE_OUT = 'fadeInFadeOut';
246254
const STYLE_MINIMAL = 'minimal';
247255
const STYLE_BLOCKBUSTER = 'blockbuster';
248256
const STYLE_VOGUE = 'vogue';
@@ -273,6 +281,20 @@ public function getModelName()
273281
const EFFECT_FADE_OUT = 'fadeOut';
274282
const EFFECT_FADE_IN_FADE_OUT = 'fadeInFadeOut';
275283

284+
/**
285+
* Gets allowable values of the enum
286+
*
287+
* @return string[]
288+
*/
289+
public function getVolumeEffectAllowableValues()
290+
{
291+
return [
292+
self::VOLUME_EFFECT_FADE_IN,
293+
self::VOLUME_EFFECT_FADE_OUT,
294+
self::VOLUME_EFFECT_FADE_IN_FADE_OUT,
295+
];
296+
}
297+
276298
/**
277299
* Gets allowable values of the enum
278300
*
@@ -365,6 +387,7 @@ public function __construct(array $data = null)
365387
$this->container['src'] = $data['src'] ?? null;
366388
$this->container['trim'] = $data['trim'] ?? null;
367389
$this->container['volume'] = $data['volume'] ?? null;
390+
$this->container['volume_effect'] = $data['volume_effect'] ?? null;
368391
$this->container['crop'] = $data['crop'] ?? null;
369392
$this->container['text'] = $data['text'] ?? null;
370393
$this->container['style'] = $data['style'] ?? null;
@@ -398,6 +421,15 @@ public function listInvalidProperties()
398421
if ($this->container['src'] === null) {
399422
$invalidProperties[] = "'src' can't be null";
400423
}
424+
$allowedValues = $this->getVolumeEffectAllowableValues();
425+
if (!is_null($this->container['volume_effect']) && !in_array($this->container['volume_effect'], $allowedValues, true)) {
426+
$invalidProperties[] = sprintf(
427+
"invalid value '%s' for 'volume_effect', must be one of '%s'",
428+
$this->container['volume_effect'],
429+
implode("', '", $allowedValues)
430+
);
431+
}
432+
401433
if ($this->container['text'] === null) {
402434
$invalidProperties[] = "'text' can't be null";
403435
}
@@ -551,6 +583,40 @@ public function setVolume($volume)
551583
return $this;
552584
}
553585

586+
/**
587+
* Gets volume_effect
588+
*
589+
* @return string|null
590+
*/
591+
public function getVolumeEffect()
592+
{
593+
return $this->container['volume_effect'];
594+
}
595+
596+
/**
597+
* Sets volume_effect
598+
*
599+
* @param string|null $volume_effect The volume effect to apply to the video asset <ul> <li>`fadeIn` - fade volume in only</li> <li>`fadeOut` - fade volume out only</li> <li>`fadeInFadeOut` - fade volume in and out</li> </ul>
600+
*
601+
* @return self
602+
*/
603+
public function setVolumeEffect($volume_effect)
604+
{
605+
$allowedValues = $this->getVolumeEffectAllowableValues();
606+
if (!is_null($volume_effect) && !in_array($volume_effect, $allowedValues, true)) {
607+
throw new \InvalidArgumentException(
608+
sprintf(
609+
"Invalid value '%s' for 'volume_effect', must be one of '%s'",
610+
$volume_effect,
611+
implode("', '", $allowedValues)
612+
)
613+
);
614+
}
615+
$this->container['volume_effect'] = $volume_effect;
616+
617+
return $this;
618+
}
619+
554620
/**
555621
* Gets crop
556622
*

src/Model/Clip.php

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,23 @@ public function getModelName()
232232
const POSITION_TOP_LEFT = 'topLeft';
233233
const POSITION_CENTER = 'center';
234234
const EFFECT_ZOOM_IN = 'zoomIn';
235+
const EFFECT_ZOOM_IN_SLOW = 'zoomInSlow';
236+
const EFFECT_ZOOM_IN_FAST = 'zoomInFast';
235237
const EFFECT_ZOOM_OUT = 'zoomOut';
238+
const EFFECT_ZOOM_OUT_SLOW = 'zoomOutSlow';
239+
const EFFECT_ZOOM_OUT_FAST = 'zoomOutFast';
236240
const EFFECT_SLIDE_LEFT = 'slideLeft';
241+
const EFFECT_SLIDE_LEFT_S_LOW = 'slideLeftSLow';
242+
const EFFECT_SLIDE_LEFT_FAST = 'slideLeftFast';
237243
const EFFECT_SLIDE_RIGHT = 'slideRight';
244+
const EFFECT_SLIDE_RIGHT_SLOW = 'slideRightSlow';
245+
const EFFECT_SLIDE_RIGHT_FAST = 'slideRightFast';
238246
const EFFECT_SLIDE_UP = 'slideUp';
247+
const EFFECT_SLIDE_UP_SLOW = 'slideUpSlow';
248+
const EFFECT_SLIDE_UP_FAST = 'slideUpFast';
239249
const EFFECT_SLIDE_DOWN = 'slideDown';
250+
const EFFECT_SLIDE_DOWN_SLOW = 'slideDownSlow';
251+
const EFFECT_SLIDE_DOWN_FAST = 'slideDownFast';
240252
const FILTER_BOOST = 'boost';
241253
const FILTER_CONTRAST = 'contrast';
242254
const FILTER_DARKEN = 'darken';
@@ -289,11 +301,23 @@ public function getEffectAllowableValues()
289301
{
290302
return [
291303
self::EFFECT_ZOOM_IN,
304+
self::EFFECT_ZOOM_IN_SLOW,
305+
self::EFFECT_ZOOM_IN_FAST,
292306
self::EFFECT_ZOOM_OUT,
307+
self::EFFECT_ZOOM_OUT_SLOW,
308+
self::EFFECT_ZOOM_OUT_FAST,
293309
self::EFFECT_SLIDE_LEFT,
310+
self::EFFECT_SLIDE_LEFT_S_LOW,
311+
self::EFFECT_SLIDE_LEFT_FAST,
294312
self::EFFECT_SLIDE_RIGHT,
313+
self::EFFECT_SLIDE_RIGHT_SLOW,
314+
self::EFFECT_SLIDE_RIGHT_FAST,
295315
self::EFFECT_SLIDE_UP,
316+
self::EFFECT_SLIDE_UP_SLOW,
317+
self::EFFECT_SLIDE_UP_FAST,
296318
self::EFFECT_SLIDE_DOWN,
319+
self::EFFECT_SLIDE_DOWN_SLOW,
320+
self::EFFECT_SLIDE_DOWN_FAST,
297321
];
298322
}
299323

@@ -498,7 +522,7 @@ public function getFit()
498522
/**
499523
* Sets fit
500524
*
501-
* @param string|null $fit Set how the asset should be scaled to fit the viewport using one of the following options: <ul> <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>`crop` (default) - 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>`none` - preserves the original asset dimensions and does not apply any scaling.</li> </ul>
525+
* @param string|null $fit 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>
502526
*
503527
* @return self
504528
*/
@@ -638,7 +662,7 @@ public function getEffect()
638662
/**
639663
* Sets effect
640664
*
641-
* @param string|null $effect 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>
665+
* @param string|null $effect 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`.
642666
*
643667
* @return self
644668
*/
@@ -672,7 +696,7 @@ public function getFilter()
672696
/**
673697
* Sets filter
674698
*
675-
* @param string|null $filter 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>`invert` - invert colors</li> </ul>
699+
* @param string|null $filter 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>
676700
*
677701
* @return self
678702
*/

src/Model/Destinations.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* Destinations Class Doc Comment
3636
*
3737
* @category Class
38-
* @description 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: &lt;ul&gt; &lt;li&gt;&lt;a href&#x3D;\&quot;#tocs_shotstackdestination\&quot;&gt;DestinationShotstack&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href&#x3D;\&quot;#tocs_muxdestination\&quot;&gt;DestinationMux&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;
38+
* @description 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: &lt;ul&gt; &lt;li&gt;&lt;a href&#x3D;\&quot;#tocs_shotstackdestination\&quot;&gt;ShotstackDestination&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href&#x3D;\&quot;#tocs_muxdestination\&quot;&gt;MuxDestination&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href&#x3D;\&quot;#tocs_s3destination\&quot;&gt;S3Destination&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;
3939
* @package Shotstack\Client
4040
* @author OpenAPI Generator team
4141
* @link https://openapi-generator.tech
@@ -62,7 +62,7 @@ class Destinations implements ModelInterface, ArrayAccess, \JsonSerializable
6262
protected static $openAPITypes = [
6363
'provider' => 'string',
6464
'exclude' => 'bool',
65-
'options' => '\Shotstack\Client\Model\MuxDestinationOptions'
65+
'options' => '\Shotstack\Client\Model\S3DestinationOptions'
6666
];
6767

6868
/**
@@ -189,7 +189,7 @@ public function getModelName()
189189
*/
190190
public function __construct(array $data = null)
191191
{
192-
$this->container['provider'] = $data['provider'] ?? 'mux';
192+
$this->container['provider'] = $data['provider'] ?? 's3';
193193
$this->container['exclude'] = $data['exclude'] ?? null;
194194
$this->container['options'] = $data['options'] ?? null;
195195

@@ -237,7 +237,7 @@ public function getProvider()
237237
/**
238238
* Sets provider
239239
*
240-
* @param string $provider The destination to send rendered assets to - set to `mux` for Mux.
240+
* @param string $provider The destination to send rendered assets to - set to `s3` for S3.
241241
*
242242
* @return self
243243
*/
@@ -261,7 +261,7 @@ public function getExclude()
261261
/**
262262
* Sets exclude
263263
*
264-
* @param bool|null $exclude Set to `true` to opt-out from the Shotstack hosting and CDN service. All files must be downloaded within 24 hours of rendering.
264+
* @param bool|null $exclude 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.
265265
*
266266
* @return self
267267
*/
@@ -275,7 +275,7 @@ public function setExclude($exclude)
275275
/**
276276
* Gets options
277277
*
278-
* @return \Shotstack\Client\Model\MuxDestinationOptions|null
278+
* @return \Shotstack\Client\Model\S3DestinationOptions|null
279279
*/
280280
public function getOptions()
281281
{
@@ -285,7 +285,7 @@ public function getOptions()
285285
/**
286286
* Sets options
287287
*
288-
* @param \Shotstack\Client\Model\MuxDestinationOptions|null $options options
288+
* @param \Shotstack\Client\Model\S3DestinationOptions|null $options options
289289
*
290290
* @return self
291291
*/

src/Model/Edit.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ public function setCallback($callback)
360360
* Gets disk
361361
*
362362
* @return string|null
363+
* @deprecated
363364
*/
364365
public function getDisk()
365366
{
@@ -369,9 +370,10 @@ public function getDisk()
369370
/**
370371
* Sets disk
371372
*
372-
* @param string|null $disk 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>
373+
* @param string|null $disk **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>
373374
*
374375
* @return self
376+
* @deprecated
375377
*/
376378
public function setDisk($disk)
377379
{

src/Model/MuxDestination.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* MuxDestination Class Doc Comment
3636
*
3737
* @category Class
38-
* @description Send rendered videos to the [Mux](https://www.mux.com/) video hosting and streaming service. Add the &#x60;mux&#x60; destination provider to send the output video to Mux. Mux credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/mux), not in the request.
38+
* @description 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.
3939
* @package Shotstack\Client
4040
* @author OpenAPI Generator team
4141
* @link https://openapi-generator.tech

0 commit comments

Comments
 (0)