Capítulo 497 de 988

Chapter 497: Triggering renders from Ruby

Core Idea

_available from v4. 0.

Key Concepts

  • Notes
  • Rendering a video and getting the progress
  • Cancelling a render<AvailableFrom v="4.0.515" />
  • Rendering a still
  • See also

Code Examples

require 'remotion_lambda'

client = RemotionLambda::Client.new(
  region: 'eu-central-1',
)

function_name = ENV.fetch('REMOTION_APP_FUNCTION_NAME')

payload = get_render_media_on_lambda_payload(
  composition: "still-helloworld",
  download_behavior: {
    type: "play-in-browser",
  },
  codec: "h264",
  input_props: {
    message: "Hello from props!",
  }
)

res = client.render_media_on_lambda(function_name, payload)
puts res
while true
  render_progress_payload = get_render_progress_payload(
    render_id: res["renderId"],
    bucket_name: res["bucketName"],
  )
  progress = client.get_render_progress(function_name, render_progress_payload)
  puts progress["overallProgress"]
  break if progress["done"]
  break if progress["fatalErrorEncountered"]
  sleep 1
end
  • What it demonstrates: Usage pattern for Triggering renders from Ruby from the official docs.

Key Takeaways

  1. Understand notes when working with Triggering renders from Ruby.
  2. Understand rendering a video and getting the progress when working with Triggering renders from Ruby.
  3. Understand cancelling a render<availablefrom v="4.0.515" /> when working with Triggering renders from Ruby.
  4. Understand rendering a still when working with Triggering renders from Ruby.
  5. Understand see also when working with Triggering renders from Ruby.

Connects To

  • api: related page in the Lambda (@remotion/lambda) section.
  • Approuterwebhook: related page in the Lambda (@remotion/lambda) section.
  • Authentication: related page in the Lambda (@remotion/lambda) section.