Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
UmungoBungo committed Sep 5, 2023
1 parent 3f93a72 commit c81b3f6
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions packages/cloudrun/src/api/render-media-on-cloudrun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import type {
AudioCodec,
ChromiumOptions,
ColorSpace,
Crf,
FrameRange,
LogLevel,
PixelFormat,
ProResProfile,
ToOptions,
VideoImageFormat,
X264Preset,
Crf
} from '@remotion/renderer';
import {RenderInternals} from '@remotion/renderer';
import type {BrowserSafeApis} from '@remotion/renderer/client';
Expand Down Expand Up @@ -40,7 +40,9 @@ type InternalRenderMediaOnCloudrun = {
privacy: 'public' | 'private' | undefined;
forceBucketName: string | undefined;
outName: string | undefined;
updateRenderProgress: ((progress: number, error?: boolean) => void) | undefined;
updateRenderProgress:
| ((progress: number, error?: boolean) => void)
| undefined;
codec: CloudrunCodec;
audioCodec: AudioCodec | undefined;
jpegQuality: number | undefined;
Expand Down Expand Up @@ -209,6 +211,12 @@ const internalRenderMediaOnCloudrunRaw = async ({
responseType: 'stream',
});

console.log('2~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~2');
console.log({jpegQuality});
console.log({crf});
console.log({x264Preset});
console.log('2~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~2');

const renderResponse = await new Promise<
RenderMediaOnCloudrunOutput | CloudRunCrashResponse
>((resolve, reject) => {
Expand Down Expand Up @@ -284,7 +292,6 @@ export const internalRenderMediaOnCloudrun = PureJSAPIs.wrapWithErrorHandling(
internalRenderMediaOnCloudrunRaw,
) as typeof internalRenderMediaOnCloudrunRaw;


/**
* @description Triggers a render on a GCP Cloud Run service given a composition and a Cloud Run URL.
* @see [Documentation](https://remotion.dev/docs/cloudrun/renderMediaOnGcp)
Expand Down Expand Up @@ -324,7 +331,7 @@ export const internalRenderMediaOnCloudrun = PureJSAPIs.wrapWithErrorHandling(
* @param params.preferLossless Uses a lossless audio codec, if one is available for the codec. If you set audioCodec, it takes priority over preferLossless.
* @returns {Promise<RenderMediaOnCloudrunOutput>} See documentation for detailed structure
*/
export const renderMediaOnCloudrun = ({
export const renderMediaOnCloudrun = ({
cloudRunUrl,
serviceName,
region,
Expand Down Expand Up @@ -362,7 +369,7 @@ export const renderMediaOnCloudrun = ({
offthreadVideoCacheSizeInBytes,
colorSpace,
}: RenderMediaOnCloudrunInput): Promise<
RenderMediaOnCloudrunOutput | CloudRunCrashResponse
RenderMediaOnCloudrunOutput | CloudRunCrashResponse
> => {
return internalRenderMediaOnCloudrun({
cloudRunUrl: cloudRunUrl ?? undefined,
Expand Down Expand Up @@ -395,11 +402,12 @@ RenderMediaOnCloudrunOutput | CloudRunCrashResponse
forceWidth: forceWidth ?? null,
forceHeight: forceHeight ?? null,
logLevel: logLevel ?? undefined,
delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined,
delayRenderTimeoutInMilliseconds:
delayRenderTimeoutInMilliseconds ?? undefined,
concurrency: concurrency ?? null,
enforceAudioTrack: enforceAudioTrack ?? undefined,
preferLossless: preferLossless ?? undefined,
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes ?? undefined,
colorSpace: colorSpace ?? undefined,
})
}
});
};

0 comments on commit c81b3f6

Please sign in to comment.