Skip to content

🎥 Make videos programmatically with React

add in SDK for other languages

Jonny Burger27b816a67d27
diff --git a/packages/lambda-go/internalops.go b/packages/lambda-go/internalops.go
index 9bc6bff3ff..3fa1c97d5a 100644
--- a/packages/lambda-go/internalops.go
+++ b/packages/lambda-go/internalops.go
@@ -39,6 +39,7 @@ func constructRenderInternals(options *RemotionOptions) (*renderInternalOptions,
OffthreadVideoCacheSizeInBytes: options.OffthreadVideoCacheSizeInBytes,
X264Preset: options.X264Preset,
ForceWidth: options.ForceWidth,
+ ApiKey: options.ApiKey,
BucketName: options.BucketName,
AudioCodec: options.AudioCodec,
ForceBucketName: options.ForceBucketName,
diff --git a/packages/lambda-go/models.go b/packages/lambda-go/models.go
index 4ea06c3f4a..a481e627c9 100644
--- a/packages/lambda-go/models.go
+++ b/packages/lambda-go/models.go
@@ -38,6 +38,7 @@ type RemotionOptions struct {
ForceHeight interface{} `json:"forceHeight"`
OffthreadVideoCacheSizeInBytes interface{} `json:"offthreadVideoCacheSizeInBytes"`
ForceWidth interface{} `json:"forceWidth"`
+ ApiKey interface{} `json:"apiKey"`
BucketName interface{} `json:"bucketName"`
AudioCodec interface{} `json:"audioCodec"`
ForceBucketName string `json:"forceBucketName"`
@@ -87,6 +88,7 @@ type renderInternalOptions struct {
OffthreadVideoCacheSizeInBytes interface{} `json:"offthreadVideoCacheSizeInBytes"`
ForceHeight interface{} `json:"forceHeight"`
ForceWidth interface{} `json:"forceWidth"`
+ ApiKey interface{} `json:"apiKey"`
BucketName interface{} `json:"bucketName"`
AudioCodec interface{} `json:"audioCodec"`
diff --git a/packages/lambda-php/src/RenderParams.php b/packages/lambda-php/src/RenderParams.php
index 478172ebd3..ff7d6f617b 100644
--- a/packages/lambda-php/src/RenderParams.php
+++ b/packages/lambda-php/src/RenderParams.php
@@ -45,6 +45,7 @@ class RenderParams
protected $webhook = null;
protected $forceHeight = null;
protected $forceWidth = null;
+ protected $apiKey = null;
protected $offthreadVideoCacheSizeInBytes = null;
protected $audioCodec = null;
protected $rendererFunctionName = null;
@@ -83,6 +84,7 @@ class RenderParams
?string $webhook = null,
?int $forceHeight = null,
?int $forceWidth = null,
+ ?int $apiKey = null,
?int $offthreadVideoCacheSizeInBytes = null,
?string $audioCodec = null,
?int $framesPerLambda = null,
@@ -133,6 +135,7 @@ class RenderParams
$this->webhook = $webhook;
$this->forceHeight = $forceHeight;
$this->forceWidth = $forceWidth;
+ $this->apiKey = $apiKey;
$this->offthreadVideoCacheSizeInBytes = $offthreadVideoCacheSizeInBytes;
$this->audioCodec = $audioCodec;
$this->framesPerLambda = $framesPerLambda;
@@ -182,6 +185,7 @@ class RenderParams
'webhook' => $this->getWebhook(),
'forceHeight' => $this->getForceHeight(),
'forceWidth' => $this->getForceWidth(),
+ 'apiKey' => $this->getApiKey(),
'offthreadVideoCacheSizeInBytes' => $this->getOffthreadVideoCacheSizeInBytes(),
'bucketName' => $this->getBucketName(),
'audioCodec' => $this->getAudioCodec(),
@@ -702,6 +706,11 @@ class RenderParams
$this->forceWidth = $forceWidth;
}
+ public function setApiKey($apiKey)
+ {
+ $this->apiKey = $apiKey;
+ }
+
public function setOffthreadVideoCacheSizeInBytes($offthreadVideoCacheSizeInBytes)
{
$this->offthreadVideoCacheSizeInBytes = $offthreadVideoCacheSizeInBytes;
@@ -758,6 +767,11 @@ class RenderParams
return $this->forceWidth;
}
+ public function getApiKey()
+ {
+ return $this->apiKey;
+ }
+
public function getOffthreadVideoCacheSizeInBytes()
{
return $this->offthreadVideoCacheSizeInBytes;
diff --git a/packages/lambda-python/remotion_lambda/models.py b/packages/lambda-python/remotion_lambda/models.py
index 8379c37282..a7df6377b7 100644
--- a/packages/lambda-python/remotion_lambda/models.py
+++ b/packages/lambda-python/remotion_lambda/models.py
@@ -311,6 +311,7 @@ class RenderMediaParams:
force_height: Optional[int] = None
offthreadvideo_cache_size_in_bytes: Optional[int] = None
force_width: Optional[int] = None
+ api_key: Optional[str] = None
audio_codec: Optional[str] = None
renderer_function_name: Optional[str] = None
pro_res_profile: Optional[str] = None
@@ -358,6 +359,7 @@ class RenderMediaParams:
'forceHeight': self.force_height,
'offthreadVideoCacheSizeInBytes': self.offthreadvideo_cache_size_in_bytes,
'forceWidth': self.force_width,
+ 'apiKey': self.api_key,
'bucketName': self.bucket_name,
'audioCodec': self.audio_codec,
'x264Preset': self.x264_preset,
@@ -422,6 +424,7 @@ class RenderStillParams:
download_behavior: Dict = field(default_factory=lambda: {
'type': 'play-in-browser'})
force_width: Optional[int] = None
+ api_key: Optional[int] = None
force_height: Optional[int] = None
force_bucket_name: Optional[str] = None
dump_browser_logs: Optional[bool] = None
@@ -467,6 +470,7 @@ class RenderStillParams:
'scale': self.scale,
'downloadBehavior': self.download_behavior or {'type': 'play-in-browser'},
'forceWidth': self.force_width,
+ 'apiKey': self.api_key,
'forceHeight': self.force_height,
'forceBucketName': self.force_bucket_name,
'deleteAfter': self.delete_after,
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 31cb271d6d..f65419ac1f 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
@@ -18,6 +18,7 @@ def get_render_media_on_lambda_payload(
force_height: nil,
force_path_style: false,
force_width: nil,
+ api_key: nil,
frame_range: nil,
frames_per_lambda: nil,
image_format: "jpeg",
@@ -63,6 +64,7 @@ payload = {
forceHeight: force_height,
forcePathStyle: force_path_style,
forceWidth: force_width,
+ apiKey: api_key,
frameRange: frame_range,
framesPerLambda: frames_per_lambda,
imageFormat: image_format,
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 7f31795571..45a3b54bff 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
@@ -9,6 +9,7 @@ def get_render_still_on_lambda_payload(
force_height: nil,
force_path_style: false,
force_width: nil,
+ api_key: nil,
image_format: "jpeg",
input_props: {},
jpeg_quality: 80,
@@ -35,6 +36,7 @@ payload = {
forceHeight: force_height,
forcePathStyle: force_path_style,
forceWidth: force_width,
+ apiKey: api_key,
imageFormat: image_format,
inputProps: {
type: "payload",