Skip to content

🎥 Make videos programmatically with React

chore: ref doc links from @remotion/media-utils through @remotion/path: getLength()

kaf-lamed-beyt032a9313063d
diff --git a/packages/core/src/static-file.ts b/packages/core/src/static-file.ts
index 5eb98e6fbf..493661a5fd 100644
--- a/packages/core/src/static-file.ts
+++ b/packages/core/src/static-file.ts
@@ -15,8 +15,7 @@ const inner = (path: string): string => {
};
/**
- * Reference a file from the public/ folder.
- * If the file does not appear in the autocomplete, type the path manually.
+ * @description Reference a file from the public/ folder. If the file does not appear in the autocomplete, type the path manually.
* @see [Documentation](https://www.remotion.dev/docs/staticfile)
*/
export const staticFile = (path: string) => {
diff --git a/packages/lambda/src/api/delete-function.ts b/packages/lambda/src/api/delete-function.ts
index 46dccda3f8..b0e3ee9476 100644
--- a/packages/lambda/src/api/delete-function.ts
+++ b/packages/lambda/src/api/delete-function.ts
@@ -9,7 +9,7 @@ export type DeleteFunctionInput = {
/**
* @description Deletes a function from AWS Lambda.
- * @link https://remotion.dev/docs/lambda/deletefunction
+ * @see [Documentation](https://remotion.dev/docs/lambda/deletefunction)
* @param options.region The region the function was deployed to.
* @param options.functionName The name of the function.
* @returns {Promise<void>} Nothing. Throws if the function failed to delete.
diff --git a/packages/lambda/src/api/delete-render.ts b/packages/lambda/src/api/delete-render.ts
index 2902afe053..998ee7f391 100644
--- a/packages/lambda/src/api/delete-render.ts
+++ b/packages/lambda/src/api/delete-render.ts
@@ -16,7 +16,7 @@ export type DeleteRenderInput = {
/**
* @description Deletes a render artifact and it's metadata given it's renderId.
- * @link https://remotion.dev/docs/lambda/deleterender
+ * @see [Documentation](https://remotion.dev/docs/lambda/deleterender)
* @param params.region The AWS region in which the media resides.
* @param params.bucketName The `bucketName` that was specified during the render
* @param params.renderId The `renderId` that was obtained after triggering the render.
diff --git a/packages/lambda/src/api/delete-site.ts b/packages/lambda/src/api/delete-site.ts
index 80e9c6a5ce..845e54d233 100644
--- a/packages/lambda/src/api/delete-site.ts
+++ b/packages/lambda/src/api/delete-site.ts
@@ -18,7 +18,7 @@ export type DeleteSiteOutput = {
/**
*
* @description Deletes a deployed site from your S3 bucket. The opposite of deploySite().
- * @link https://remotion.dev/docs/lambda/deletesite
+ * @see [Documentation](https://remotion.dev/docs/lambda/deletesite)
* @param options.bucketName The S3 bucket name where the site resides in.
* @param options.siteName The ID of the site that you want to delete.
* @param {AwsRegion} options.region The region in where the S3 bucket resides in.
diff --git a/packages/lambda/src/api/deploy-function.ts b/packages/lambda/src/api/deploy-function.ts
index 7b11baca9c..eff0b32aa1 100644
--- a/packages/lambda/src/api/deploy-function.ts
+++ b/packages/lambda/src/api/deploy-function.ts
@@ -40,7 +40,7 @@ export type DeployFunctionOutput = {
/**
* @description Creates an AWS Lambda function in your account that will be able to render a video in the cloud.
- * @link https://remotion.dev/docs/lambda/deployfunction
+ * @see [Documentation](https://www.remotion.dev/docs/lambda/deployfunction)
* @param options.createCloudWatchLogGroup Whether you'd like to create a CloudWatch Log Group to store the logs for this function.
* @param options.cloudWatchLogRetentionPeriodInDays (optional) The number of days to retain the CloudWatch logs for this function. Default is 14 days.
* @param options.region The region you want to deploy your function to.
diff --git a/packages/lambda/src/api/deploy-site.ts b/packages/lambda/src/api/deploy-site.ts
index 40a0fdda33..8d752599e4 100644
--- a/packages/lambda/src/api/deploy-site.ts
+++ b/packages/lambda/src/api/deploy-site.ts
@@ -42,7 +42,7 @@ export type DeploySiteOutput = Promise<{
/**
* @description Deploys a Remotion project to an S3 bucket to prepare it for rendering on AWS Lambda.
- * @link https://remotion.dev/docs/lambda/deploysite
+ * @see [Documentation](https://remotion.dev/docs/lambda/deploysite)
* @param {AwsRegion} params.region The region in which the S3 bucket resides in.
* @param {string} params.entryPoint An absolute path to the entry file of your Remotion project.
* @param {string} params.bucketName The name of the bucket to deploy your project into.
diff --git a/packages/lambda/src/api/download-media.ts b/packages/lambda/src/api/download-media.ts
index 5c538b3454..8c27d27b8e 100644
--- a/packages/lambda/src/api/download-media.ts
+++ b/packages/lambda/src/api/download-media.ts
@@ -24,7 +24,7 @@ export type DownloadMediaOutput = {
/**
* @description Triggers a render on a lambda given a composition and a lambda function.
- * @link https://remotion.dev/docs/lambda/downloadmedia
+ * @see [Documentation](https://remotion.dev/docs/lambda/downloadmedia)
* @param params.region The AWS region in which the media resides.
* @param params.bucketName The `bucketName` that was specified during the render.
* @param params.renderId The `renderId` that was obtained after triggering the render.
diff --git a/packages/lambda/src/api/estimate-price.ts b/packages/lambda/src/api/estimate-price.ts
index 64b98172a1..45fe731d88 100644
--- a/packages/lambda/src/api/estimate-price.ts
+++ b/packages/lambda/src/api/estimate-price.ts
@@ -18,7 +18,7 @@ export type EstimatePriceInput = {
/**
*
* @description Calculates the AWS costs incurred for AWS Lambda given the region, execution duration and memory size.
- * @link https://remotion.dev/docs/lambda/estimateprice
+ * @see [Documentation](https://remotion.dev/docs/lambda/estimateprice)
* @returns {number} Price in USD
*/
export const estimatePrice = ({
diff --git a/packages/lambda/src/api/get-aws-client.ts b/packages/lambda/src/api/get-aws-client.ts
index 77e16a21ab..8b4c4141b8 100644
--- a/packages/lambda/src/api/get-aws-client.ts
+++ b/packages/lambda/src/api/get-aws-client.ts
@@ -30,7 +30,7 @@ export type GetAwsClientOutput<T extends keyof ServiceMapping> = {
/**
* @description Gets the full AWS SDK and an instantiated client for an AWS service
- * @link https://remotion.dev/docs/lambda/getawsclient
+ * @see [Documentation](https://remotion.dev/docs/lambda/getawsclient)
* @param {AwsRegion} params.region The region in which the S3 bucket resides in.
* @param {string} params.service One of `iam`, `s3`, `cloudwatch`, `iam` or `servicequotas`
* @param {CustomCredentials} params.customCredentials Pass endpoint and credentials if you want to connect to a different cloud for S3
diff --git a/packages/lambda/src/api/get-compositions-on-lambda.ts b/packages/lambda/src/api/get-compositions-on-lambda.ts
index beaaef91cd..a7cd2bc948 100644
--- a/packages/lambda/src/api/get-compositions-on-lambda.ts
+++ b/packages/lambda/src/api/get-compositions-on-lambda.ts
@@ -22,7 +22,7 @@ export type GetCompositionsOnLambdaOutput = TCompMetadata[];
/**
* @description Returns the compositions from a serveUrl
- * @link https://remotion.dev/docs/lambda/getcompositionsonlambda
+ * @see [Documentation](https://remotion.dev/docs/lambda/getcompositionsonlambda)
* @param params.functionName The name of the Lambda function that should be used
* @param params.serveUrl The URL of the deployed project
* @param params.inputProps The input props that should be passed while the compositions are evaluated.
diff --git a/packages/lambda/src/api/get-function-info.ts b/packages/lambda/src/api/get-function-info.ts
index 8f72780727..7e6cb4769e 100644
--- a/packages/lambda/src/api/get-function-info.ts
+++ b/packages/lambda/src/api/get-function-info.ts
@@ -20,7 +20,7 @@ export type GetFunctionInfoInput = {
/**
* @description Given a region and function name, returns information about the function such as version, memory size and timeout.
- * @link https://remotion.dev/docs/lambda/getfunctioninfo
+ * @see [Documentation](https://remotion.dev/docs/lambda/getfunctioninfo)
* @param {AwsRegion} options.region The region in which the function resides in.
* @param {string} options.functionName The name of the function
* @return {Promise<FunctionInfo>} Promise resolving to information about the function.
diff --git a/packages/lambda/src/api/get-functions.ts b/packages/lambda/src/api/get-functions.ts
index c4dec3e4d1..031c48f305 100644
--- a/packages/lambda/src/api/get-functions.ts
+++ b/packages/lambda/src/api/get-functions.ts
@@ -53,7 +53,7 @@ const getAllFunctions = async ({
*
*
* @description Lists Remotion Lambda render functions deployed to AWS Lambda.
- * @link https://remotion.dev/docs/lambda/getfunctions
+ * @see [Documentation](https://remotion.dev/docs/lambda/getfunctions)
* @param options.region The region of which the functions should be listed.
* @param options.compatibleOnly Whether only functions compatible with the installed version of Remotion Lambda should be returned.
* @returns {Promise<FunctionInfo[]>} An array with the objects containing information about the deployed functions.
diff --git a/packages/lambda/src/api/get-or-create-bucket.ts b/packages/lambda/src/api/get-or-create-bucket.ts
index 8fd5031bba..90d6254bc5 100644
--- a/packages/lambda/src/api/get-or-create-bucket.ts
+++ b/packages/lambda/src/api/get-or-create-bucket.ts
@@ -14,7 +14,7 @@ export type GetOrCreateBucketOutput = {
};
/**
* @description Creates a bucket for Remotion Lambda in your S3 account. If one already exists, it will get returned instead.
- * @link https://remotion.dev/docs/lambda/getorcreatebucket
+ * @see [Documentation](https://remotion.dev/docs/lambda/getorcreatebucket)
* @param options.region The region in which you want your S3 bucket to reside in.
* @returns {Promise<GetOrCreateBucketOutput>} An object containing the `bucketName`.
*/
diff --git a/packages/lambda/src/api/get-regions.ts b/packages/lambda/src/api/get-regions.ts
index ec40a2e654..e80b42c9c5 100644
--- a/packages/lambda/src/api/get-regions.ts
+++ b/packages/lambda/src/api/get-regions.ts
@@ -8,7 +8,7 @@ type Options = {
/**
* @description Gets an array of all supported AWS regions of this release of Remotion Lambda.
- * @link https://remotion.dev/docs/lambda/getregions
+ * @see [Documentation](https://remotion.dev/docs/lambda/getregions)
* @returns {AwsRegion[]} A list of AWS regions.
*/
export const getRegions = (options?: Options): readonly AwsRegion[] => {
diff --git a/packages/lambda/src/api/get-render-progress.ts b/packages/lambda/src/api/get-render-progress.ts
index 1f7b6df680..b1d7939ed7 100644
--- a/packages/lambda/src/api/get-render-progress.ts
+++ b/packages/lambda/src/api/get-render-progress.ts
@@ -15,7 +15,7 @@ export type GetRenderInput = {
/**
* @description Gets the current status of a render originally triggered via renderMediaOnLambda().
- * @link https://remotion.dev/docs/lambda/getrenderprogress
+ * @see [Documentation](https://remotion.dev/docs/lambda/getrenderprogress)
* @param {string} params.functionName The name of the function used to trigger the render.
* @param {string} params.bucketName The name of the bucket that was used in the render.
* @param {string} params.renderId The ID of the render that was returned by `renderMediaOnLambda()`.
diff --git a/packages/lambda/src/api/get-sites.ts b/packages/lambda/src/api/get-sites.ts
index 09b5c5a3a1..9779dfb747 100644
--- a/packages/lambda/src/api/get-sites.ts
+++ b/packages/lambda/src/api/get-sites.ts
@@ -27,7 +27,7 @@ export type GetSitesOutput = {
/**
*
* @description Gets all the deployed sites for a certain AWS region.
- * @link https://remotion.dev/docs/lambda/getsites
+ * @see [Documentation](https://remotion.dev/docs/lambda/getsites)
* @param {AwsRegion} params.region The AWS region that you want to query for.
* @returns {Promise<GetSitesOutput>} A Promise containing an object with `sites` and `bucket` keys. Consult documentation for details.
*/
diff --git a/packages/lambda/src/api/iam-validation/simulate.ts b/packages/lambda/src/api/iam-validation/simulate.ts
index a2c7179086..36b8d6f643 100644
--- a/packages/lambda/src/api/iam-validation/simulate.ts
+++ b/packages/lambda/src/api/iam-validation/simulate.ts
@@ -29,7 +29,7 @@ export type SimulatePermissionsOutput = {
/**
* @description Simulates calls using the AWS Simulator to validate the correct permissions.
- * @link http://remotion.dev/docs/lambda/simulatepermissions
+ * @see [Documentation](http://remotion.dev/docs/lambda/simulatepermissions)
* @param {AwsRegion} options.region The region which you would like to validate
* @param {(result: SimulationResult) => void} options.onSimulation The region which you would like to validate
* @returns {Promise<SimulatePermissionsOutput>} See documentation for detailed response structure.
diff --git a/packages/lambda/src/api/presign-url.ts b/packages/lambda/src/api/presign-url.ts
index b5f7eb03b6..adf5053443 100644
--- a/packages/lambda/src/api/presign-url.ts
+++ b/packages/lambda/src/api/presign-url.ts
@@ -15,7 +15,7 @@ export type PresignUrlInput<CheckIfObjectExists extends boolean = boolean> = {
/**
* @description Returns a public url of an object stored in Remotion's S3 bucket.
- * @link https://remotion.dev/docs/lambda/presignurl
+ * @see [Documentation](https://remotion.dev/docs/lambda/presignurl)
* @param {AwsRegion} params.region The region in which the S3 bucket resides in.
* @param {string} params.bucketName The name of the bucket to fetch the object from.
* @param {string} params.objectKey Key of the S3 object to get.
diff --git a/packages/lambda/src/api/render-media-on-lambda.ts b/packages/lambda/src/api/render-media-on-lambda.ts
index 7ccd6b83b6..5c6e2238b7 100644
--- a/packages/lambda/src/api/render-media-on-lambda.ts
+++ b/packages/lambda/src/api/render-media-on-lambda.ts
@@ -71,7 +71,7 @@ export type RenderMediaOnLambdaOutput = {
/**
* @description Triggers a render on a lambda given a composition and a lambda function.
- * @link https://remotion.dev/docs/lambda/rendermediaonlambda
+ * @see [Documentation](https://remotion.dev/docs/lambda/rendermediaonlambda)
* @param params.functionName The name of the Lambda function that should be used
* @param params.serveUrl The URL of the deployed project
* @param params.composition The ID of the composition which should be rendered.
diff --git a/packages/lambda/src/api/validate-webhook-signature.ts b/packages/lambda/src/api/validate-webhook-signature.ts
index f67c2cd9e3..405eca86d7 100644
--- a/packages/lambda/src/api/validate-webhook-signature.ts
+++ b/packages/lambda/src/api/validate-webhook-signature.ts
@@ -1,6 +1,6 @@
/**
* @description Throws if the signature of the finish webhook is missing or inauthentic
- * @link https://remotion.dev/docs/lambda/validate-webhook-signature
+ * @see [Documentation](https://remotion.dev/docs/lambda/validate-webhook-signature)
* @param params.secret The secret used for signing the webhook
* @param params.body The body that was received by the endpoint
* @param params.signatureHeader The `X-Remotion-Signature` header
diff --git a/packages/lottie/src/Lottie.tsx b/packages/lottie/src/Lottie.tsx
index 138df3f582..f9419a8093 100644
--- a/packages/lottie/src/Lottie.tsx
+++ b/packages/lottie/src/Lottie.tsx
@@ -7,6 +7,10 @@ import {getNextFrame} from './utils';
import {validateLoop} from './validate-loop';
import {validatePlaybackRate} from './validate-playbackrate';
+/**
+ * @description Part of the @remotion/lottie package.
+ * @see [Documentation](https://www.remotion.dev/docs/lottie/lottie)
+ */
export const Lottie = ({
animationData,
className,
diff --git a/packages/lottie/src/get-lottie-metadata.ts b/packages/lottie/src/get-lottie-metadata.ts
index b428e7be04..d4af6af6f4 100644
--- a/packages/lottie/src/get-lottie-metadata.ts
+++ b/packages/lottie/src/get-lottie-metadata.ts
@@ -8,6 +8,10 @@ type LottieMetadata = {
height: number;
};
+/**
+ * @description Get the basic metadata such as dimensions, duration and framerate of a Lottie animation.
+ * @see [Documentation](https://www.remotion.dev/docs/lottie/getlottiemetadata)
+ */
export const getLottieMetadata = (
animationData: LottieAnimationData
): LottieMetadata | null => {
diff --git a/packages/motion-blur/src/CameraMotionBlur.tsx b/packages/motion-blur/src/CameraMotionBlur.tsx
index da1a3a74cd..85536f4bab 100644
--- a/packages/motion-blur/src/CameraMotionBlur.tsx
+++ b/packages/motion-blur/src/CameraMotionBlur.tsx
@@ -7,6 +7,10 @@ export type CameraMotionBlurProps = {
samples?: number;
};
+/**
+ * @description Produces natural looking motion blur similar to what would be produced by a film camera.
+ * @see [Documentation](https://www.remotion.dev/docs/motion-blur/camera-motion-blur)
+ */
export const CameraMotionBlur: React.FC<CameraMotionBlurProps> = ({
children,
shutterAngle = 180,
diff --git a/packages/motion-blur/src/Trail.tsx b/packages/motion-blur/src/Trail.tsx
index 4665e226bd..4ddf2228ec 100644
--- a/packages/motion-blur/src/Trail.tsx
+++ b/packages/motion-blur/src/Trail.tsx
@@ -8,6 +8,10 @@ export type TrailProps = {
trailOpacity: number;
};
+/**
+ * @description The <Trail> component duplicates it's children and adds a time offset to each layer in order to create a trail effect.
+ * @see [Documentation](https://www.remotion.dev/docs/motion-blur/trail)
+ */
export const Trail: React.FC<TrailProps> = ({
children,
layers,
diff --git a/packages/paths/src/get-length.ts b/packages/paths/src/get-length.ts
index f7d15aaab4..c89d9efd3f 100644
--- a/packages/paths/src/get-length.ts
+++ b/packages/paths/src/get-length.ts
@@ -3,9 +3,9 @@
import {construct} from './helpers/construct';
/**
- * Gets the length of an SVG path.
+ * Gets the length of an SVG path.
* @param {string} path A valid SVG path
- * @link https://remotion.dev/docs/paths/get-length
+ * @see [Documentation](https://remotion.dev/docs/paths/get-length)
*/
export const getLength = (path: string) => {
const constructucted = construct(path);
diff --git a/packages/preload/src/preload-audio.ts b/packages/preload/src/preload-audio.ts
index d15804ce6c..2ad090c7b5 100644
--- a/packages/preload/src/preload-audio.ts
+++ b/packages/preload/src/preload-audio.ts
@@ -1,5 +1,9 @@
import {preloadAsset} from './preload-asset';
+/**
+ * @description Preloads audio in the DOM so that when a audio tag is mounted, it can play immediately.
+ * @see [Documentation](https://www.remotion.dev/docs/preload/preload-audio)
+ */
export const preloadAudio = (src: string): (() => void) => {
return preloadAsset(src, 'audio');
};
diff --git a/packages/preload/src/preload-font.ts b/packages/preload/src/preload-font.ts
index e83bdd6b48..03bd97be34 100644
--- a/packages/preload/src/preload-font.ts
+++ b/packages/preload/src/preload-font.ts
@@ -1,5 +1,9 @@
import {preloadAsset} from './preload-asset';
+/**
+ * @description Preloads a font so that when an <Img> tag is mounted, it can display immediately.
+ * @see [Documentation](https://www.remotion.dev/docs/preload/preload-font)
+ */
export const preloadFont = (src: string): (() => void) => {
return preloadAsset(src, 'font');
};
diff --git a/packages/preload/src/preload-image.ts b/packages/preload/src/preload-image.ts
index 31d16c2198..79b2c74d0f 100644
--- a/packages/preload/src/preload-image.ts
+++ b/packages/preload/src/preload-image.ts
@@ -1,5 +1,9 @@
import {preloadAsset} from './preload-asset';
+/**
+ * @description Preloads an image so that when an <Img> tag is mounted, it can display immediately.
+ * @see [Documentation](https://www.remotion.dev/docs/preload/preload-image)
+ */
export const preloadImage = (src: string): (() => void) => {
return preloadAsset(src, 'image');
};
diff --git a/packages/preload/src/preload-video.ts b/packages/preload/src/preload-video.ts
index 80d619ca51..afc584edae 100644
--- a/packages/preload/src/preload-video.ts
+++ b/packages/preload/src/preload-video.ts
@@ -1,5 +1,9 @@
import {preloadAsset} from './preload-asset';
+/**
+ * @description Preloads a video in the DOM so that when a video tag is mounted, it can play immediately.
+ * @see [Documentation](https://www.remotion.dev/docs/preload/preload-video)
+*/
export const preloadVideo = (src: string): (() => void) => {
return preloadAsset(src, 'video');
};
diff --git a/packages/preload/src/resolve-redirect.ts b/packages/preload/src/resolve-redirect.ts
index 0843d80b7f..68f1a3a5a4 100644
--- a/packages/preload/src/resolve-redirect.ts
+++ b/packages/preload/src/resolve-redirect.ts
@@ -1,3 +1,8 @@
+/**
+ * @description Follows the redirects of a URL (most commonly a remote video or audio) until the final URL is resolved and returns that.
+ * @see [Documentation](https://www.remotion.dev/docs/preload/resolve-redirect)
+ */
+
export const resolveRedirect = async (videoOrAudio: string) => {
const res = await fetch(videoOrAudio);
return res.url;
diff --git a/packages/skia/src/SkiaCanvas.tsx b/packages/skia/src/SkiaCanvas.tsx
index 7e26fcaf07..58809a2e14 100644
--- a/packages/skia/src/SkiaCanvas.tsx
+++ b/packages/skia/src/SkiaCanvas.tsx
@@ -10,6 +10,10 @@ type RemotionCanvasProps = CanvasProps & {
height: number;
};
+/**
+ * @description A React Native Skia <Canvas /> component that wraps Remotion contexts.
+ * @see [Documentation](https://www.remotion.dev/docs/skia/skia-canvas)
+ */
export const SkiaCanvas = ({
children,
height,
diff --git a/packages/skia/src/enable-skia.ts b/packages/skia/src/enable-skia.ts
index 37cc21ec90..d573f3e8e5 100644
--- a/packages/skia/src/enable-skia.ts
+++ b/packages/skia/src/enable-skia.ts
@@ -1,6 +1,10 @@
import type {WebpackOverrideFn} from '@remotion/bundler';
import CopyPlugin from 'copy-webpack-plugin';
+/**
+ * @description A function that modifies the default Webpack configuration to make the necessary changes to support Skia.
+ * @see [Documentation](https://www.remotion.dev/docs/skia/enable-skia)
+ */
export const enableSkia: WebpackOverrideFn = (currentConfiguration) => {
return {
...currentConfiguration,
diff --git a/packages/three/src/ThreeCanvas.tsx b/packages/three/src/ThreeCanvas.tsx
index d5d10b6da1..8b4b279aff 100644
--- a/packages/three/src/ThreeCanvas.tsx
+++ b/packages/three/src/ThreeCanvas.tsx
@@ -21,6 +21,10 @@ const Scale = ({width, height}: {width: number; height: number}) => {
return null;
};
+/**
+ * @description A wrapper for React Three Fiber's <Canvas /> which synchronizes with Remotions useCurrentFrame().
+ * @see [Documentation](https://www.remotion.dev/docs/three-canvas)
+ */
export const ThreeCanvas = (props: ThreeCanvasProps) => {
const {children, width, height, style, onCreated, ...rest} = props;
const [waitForCreated] = useState(() =>
diff --git a/packages/three/src/use-video-texture.ts b/packages/three/src/use-video-texture.ts
index e2a0181c88..1238bd336f 100644
--- a/packages/three/src/use-video-texture.ts
+++ b/packages/three/src/use-video-texture.ts
@@ -18,6 +18,10 @@ const warnAboutRequestVideoFrameCallback = () => {
);
};
+/**
+ * @description Allows you to use a video in React Three Fiber that is synchronized with Remotion's useCurrentFrame().
+ * @see [Documentation](https://www.remotion.dev/docs/use-video-texture)
+ */
export const useVideoTexture = (
videoRef: React.RefObject<HTMLVideoElement>
): VideoTexture | null => {