Skip to content

🎥 Make videos programmatically with React

optional changing the remotion, version if version is not set by the request

Alex Fernandez879cd399d73f
diff --git a/packages/goclient-example/main.go b/packages/goclient-example/main.go
index 6ffd5d5d4b..10deba77bd 100755
--- a/packages/goclient-example/main.go
+++ b/packages/goclient-example/main.go
@@ -49,8 +49,8 @@ func main() {
InputProps: map[string]interface{}{
"data": "Let's play",
},
- Composition: "main", // The composition to use
- Version: "3.3.78", // Specify the Remotion version to use
+ Composition: "main", // The composition to use
+
}
// Execute the render process
diff --git a/packages/goclient/internalops.go b/packages/goclient/internalops.go
index fffe2ecfd3..1d3bcece13 100644
--- a/packages/goclient/internalops.go
+++ b/packages/goclient/internalops.go
@@ -20,11 +20,17 @@ func constructRenderInternals(options *RemotionOptions) (*renderInternalOptions,
return nil, validationErrors
}
+ // set default version
+ versionToUse := VERSION
+ if options.Version == "" {
+ versionToUse = options.Version
+ }
+
internalParams := renderInternalOptions{
ServeUrl: options.ServeUrl,
InputProps: inputProps,
Composition: options.Composition,
- Version: VERSION,
+ Version: versionToUse,
FrameRange: options.FrameRange,
OutName: options.OutName,
AudioBitrate: options.AudioBitrate,