Skip to content

🎥 Make videos programmatically with React

Add isProduction to client libs

Pramod5e3c122ef97e
diff --git a/packages/lambda-go/models.go b/packages/lambda-go/models.go
index 9369960373..ea8b13dcee 100644
--- a/packages/lambda-go/models.go
+++ b/packages/lambda-go/models.go
@@ -50,6 +50,7 @@ type RemotionOptions struct {
Gl string `json:"gl"`
X264Preset interface{} `json:"x264Preset"`
DeleteAfter *string `json:"deleteAfter"`
+ IsProduction *bool `json:"isProduction"`
}
type renderInternalOptions struct {
@@ -105,6 +106,7 @@ type renderInternalOptions struct {
Gl *string `json:"gl,omitempty"`
X264Preset interface{} `json:"x264Preset"`
DeleteAfter *string `json:"deleteAfter"`
+ IsProduction *bool `json:"isProduction"`
}
type RawInvokeResponse struct {
diff --git a/packages/lambda-php/src/RenderParams.php b/packages/lambda-php/src/RenderParams.php
index a82f883ddc..8f66e6bad8 100644
--- a/packages/lambda-php/src/RenderParams.php
+++ b/packages/lambda-php/src/RenderParams.php
@@ -58,6 +58,7 @@ class RenderParams
protected $deleteAfter = null;
protected $forcePathStyle = false;
protected $storageClass = null;
+ protected $isProduction = null;
public function __construct(
?array $data = null,
@@ -105,7 +106,8 @@ class RenderParams
?string $maxRate = null,
?bool $preferLossless = false,
?bool $forcePathStyle = false,
- ?array $metadata = null
+ ?array $metadata = null,
+ ?bool $isProduction = null
)
{
if ($chromiumOptions === null) {
@@ -158,6 +160,7 @@ class RenderParams
$this->deleteAfter = $deleteAfter;
$this->preferLossless = $preferLossless;
$this->forcePathStyle = $forcePathStyle;
+ $this->isProduction = $isProduction;
}
private array $inputProps = array();
@@ -209,6 +212,7 @@ class RenderParams
'x264Preset' => $this->getX264Preset(),
'deleteAfter' => $this->getDeleteAfter(),
'forcePathStyle' => $this->getForcePathStyle(),
+ 'isProduction' => $this->getIsProduction(),
'type' => 'start'
];
@@ -986,4 +990,15 @@ class RenderParams
$this->deleteAfter = $deleteAfter;
return $this;
}
+
+ public function getIsProduction()
+ {
+ return $this->isProduction;
+ }
+
+ public function setIsProduction($isProduction)
+ {
+ $this->isProduction = $isProduction;
+ return $this;
+ }
}
diff --git a/packages/lambda-python/remotion_lambda/models.py b/packages/lambda-python/remotion_lambda/models.py
index 0f5624f050..5c400f7a37 100644
--- a/packages/lambda-python/remotion_lambda/models.py
+++ b/packages/lambda-python/remotion_lambda/models.py
@@ -331,6 +331,7 @@ class RenderMediaParams:
delete_after: Optional[str] = None
encoding_buffer_size: Optional[str] = None
encoding_max_rate: Optional[str] = None
+ is_production: Optional[bool] = None
def serialize_params(self) -> Dict:
"""
@@ -384,6 +385,7 @@ class RenderMediaParams:
'deleteAfter': self.delete_after,
'encodingBufferSize': self.encoding_buffer_size,
'encodingMaxRate': self.encoding_max_rate,
+ 'isProduction': self.is_production,
'type': 'start',
}
@@ -457,6 +459,7 @@ class RenderStillParams:
media_cache_size_in_bytes: Optional[int] = None
offthreadvideo_threads: Optional[int] = None
streamed: bool = False
+ is_production: Optional[bool] = None
def serialize_params(self) -> Dict:
"""
@@ -511,6 +514,7 @@ class RenderStillParams:
'mediaCacheSizeInBytes': self.media_cache_size_in_bytes,
'offthreadVideoThreads': self.offthreadvideo_threads,
'streamed': self.streamed,
+ 'isProduction': self.is_production,
}
if self.force_path_style is not None:
diff --git a/packages/lambda-ruby/lib/remotion_lambda/render_media_on_lambda_payload.rb b/packages/lambda-ruby/lib/remotion_lambda/render_media_on_lambda_payload.rb
index 69fabf39d7..dad2ae6117 100644
--- a/packages/lambda-ruby/lib/remotion_lambda/render_media_on_lambda_payload.rb
+++ b/packages/lambda-ruby/lib/remotion_lambda/render_media_on_lambda_payload.rb
@@ -48,7 +48,8 @@ def get_render_media_on_lambda_payload(
video_bitrate: nil,
webhook: nil,
x264_preset: nil,
- chromium_options: {}
+ chromium_options: {},
+ is_production: nil
)
if api_key != nil
@@ -108,7 +109,8 @@ payload = {
videoBitrate: video_bitrate,
webhook: webhook,
x264Preset: x264_preset,
- bucketName: bucket_name
+ bucketName: bucket_name,
+ isProduction: is_production
}
payload
end
diff --git a/packages/lambda-ruby/lib/remotion_lambda/render_still_on_lambda_payload.rb b/packages/lambda-ruby/lib/remotion_lambda/render_still_on_lambda_payload.rb
index 5280060527..9de004a5bd 100644
--- a/packages/lambda-ruby/lib/remotion_lambda/render_still_on_lambda_payload.rb
+++ b/packages/lambda-ruby/lib/remotion_lambda/render_still_on_lambda_payload.rb
@@ -28,7 +28,8 @@ def get_render_still_on_lambda_payload(
serve_url: "testbed-v6",
timeout_in_milliseconds: 30000,
chromium_options: {},
- frame: 0
+ frame: 0,
+ is_production: nil
)
if api_key != nil
@@ -69,6 +70,7 @@ payload = {
attempt: 1,
streamed: false,
frame: frame,
+ isProduction: is_production
}
payload
end