🎥 Make videos programmatically with React
update php sdk
Jonny Burger35bef96a7750
diff --git a/packages/docs/docs/lambda/php.md b/packages/docs/docs/lambda/php.mdindex 36972fc331..0447878eb1 100644--- a/packages/docs/docs/lambda/php.md+++ b/packages/docs/docs/lambda/php.md@@ -57,48 +57,31 @@ print_r($renderResponse);/****stdClass Object-(-[statusCode] => 200-[headers] => stdClass Object-(-[content-type] => application/json-)--[body] => {"bucketName":"remotionlambda-apsoutheast2-qv16gcf02l","renderId":"zjllgavb07"}-)- **/-// check the status of the render-if ($renderResponse->statusCode === 200) {- $responseObject = json_decode($renderResponse->body);+{"bucketName":"remotionlambda-apsoutheast2-qv16gcf02l","renderId":"zjllgavb07"}+ **/- // Get render progress- $renderId = $responseObject->renderId;- $bucketName = $responseObject->bucketName;+// Get render progress+$renderId = $renderResponse->renderId;+$bucketName = $renderResponse->bucketName;- $renderProgressResponse = $client->getRenderProgress($renderId, $bucketName);+$renderProgressResponse = $client->getRenderProgress($renderId, $bucketName);- // Output render progress response- print_r($renderProgressResponse);-}+// Output render progress response+print_r($renderProgressResponse);/*** Response*- *- * (-[statusCode] => 200-[headers] => stdClass Object-(-[content-type] => application/json-)--[body] => {"framesRendered":0,"chunks":0,"done":false,"encodingStatus":null,"costs":{"accruedSoFar":0,"displayCost":"<$0.001","currency":"USD","disclaimer":"Estimated cost only. Does not include charges for other AWS services."},"renderId":"61j7un13i1","renderMetadata":null,"bucket":"remotionlambda-apsoutheast2-xxxx","outputFile":null,"timeToFinish":null,"errors":[],"fatalErrorEncountered":false,"currentTime":1685605900279,"renderSize":22,"lambdasInvoked":0,"cleanup":null,"timeToFinishChunks":null,"overallProgress":0,"retriesInfo":[],"outKey":null,"outBucket":null,"mostExpensiveFrameRanges":null,"timeToEncode":null,"outputSizeInBytes":null}-)+{"framesRendered":0,"chunks":0,"done":false,"encodingStatus":null,"costs":{"accruedSoFar":0,"displayCost":"<$0.001","currency":"USD","disclaimer":"Estimated cost only. Does not include charges for other AWS services."},"renderId":"61j7un13i1","renderMetadata":null,"bucket":"remotionlambda-apsoutheast2-xxxx","outputFile":null,"timeToFinish":null,"errors":[],"fatalErrorEncountered":false,"currentTime":1685605900279,"renderSize":22,"lambdasInvoked":0,"cleanup":null,"timeToFinishChunks":null,"overallProgress":0,"retriesInfo":[],"outKey":null,"outBucket":null,"mostExpensiveFrameRanges":null,"timeToEncode":null,"outputSizeInBytes":null}*/```+## Changelog++`v4.0.6`: The response payload structure has changed. See the history of this page to see the previous structure.+## See also- [Using Lambda without IAM user](/docs/lambda/without-iam)diff --git a/packages/lambda-php-example/src/render.php b/packages/lambda-php-example/src/render.phpindex 8207898738..3241c00ac3 100644--- a/packages/lambda-php-example/src/render.php+++ b/packages/lambda-php-example/src/render.php@@ -31,45 +31,25 @@ $params->setComposition('react-svg');$renderResponse = $client->renderMediaOnLambda($params);// Output render response-print_r($renderResponse->body);+print_r($renderResponse);/****stdClass Object-(-[statusCode] => 200-[headers] => stdClass Object-(-[content-type] => application/json-)--[body] => {"bucketName":"remotionlambda-apsoutheast2-qv16gcf02l","renderId":"zjllgavb07"}-)++{"bucketName":"remotionlambda-apsoutheast2-qv16gcf02l","renderId":"zjllgavb07"}**/-// check the status of the render-if ($renderResponse->statusCode === 200) {- $responseObject = json_decode($renderResponse->body);- // Get render progress- $renderId = $responseObject->renderId;- $bucketName = $responseObject->bucketName;+// Get render progress+$renderId = $renderResponse->renderId;+$bucketName = $renderResponse->bucketName;- $renderProgressResponse = $client->getRenderProgress($renderId, $bucketName);+$renderProgressResponse = $client->getRenderProgress($renderId, $bucketName);- // Output render progress response- print_r($renderProgressResponse);-}+// Output render progress response+print_r($renderProgressResponse);/*** Response- *- *- * (-[statusCode] => 200-[headers] => stdClass Object-(-[content-type] => application/json-)--[body] => {"framesRendered":0,"chunks":0,"done":false,"encodingStatus":null,"costs":{"accruedSoFar":0,"displayCost":"<$0.001","currency":"USD","disclaimer":"Estimated cost only. Does not include charges for other AWS services."},"renderId":"61j7un13i1","renderMetadata":null,"bucket":"remotionlambda-apsoutheast2-xxxx","outputFile":null,"timeToFinish":null,"errors":[],"fatalErrorEncountered":false,"currentTime":1685605900279,"renderSize":22,"lambdasInvoked":0,"cleanup":null,"timeToFinishChunks":null,"overallProgress":0,"retriesInfo":[],"outKey":null,"outBucket":null,"mostExpensiveFrameRanges":null,"timeToEncode":null,"outputSizeInBytes":null}-)+ *+{"framesRendered":0,"chunks":0,"done":false,"encodingStatus":null,"costs":{"accruedSoFar":0,"displayCost":"<$0.001","currency":"USD","disclaimer":"Estimated cost only. Does not include charges for other AWS services."},"renderId":"61j7un13i1","renderMetadata":null,"bucket":"remotionlambda-apsoutheast2-xxxx","outputFile":null,"timeToFinish":null,"errors":[],"fatalErrorEncountered":false,"currentTime":1685605900279,"renderSize":22,"lambdasInvoked":0,"cleanup":null,"timeToFinishChunks":null,"overallProgress":0,"retriesInfo":[],"outKey":null,"outBucket":null,"mostExpensiveFrameRanges":null,"timeToEncode":null,"outputSizeInBytes":null}*/