- Video is processing...
+ {session.processingStatus === ProcessingStatus.rendering
+ ? 'Video is rendering...'
+ : 'Video is processing...'}
{asset?.status?.phase === 'processing' && (
diff --git a/packages/app/app/studio/[organization]/(no-side-bar)/clips/[stageId]/topBar/CreateClipButton.tsx b/packages/app/app/studio/[organization]/(no-side-bar)/clips/[stageId]/topBar/CreateClipButton.tsx
index 0efbbfcd9..54e20c5de 100644
--- a/packages/app/app/studio/[organization]/(no-side-bar)/clips/[stageId]/topBar/CreateClipButton.tsx
+++ b/packages/app/app/studio/[organization]/(no-side-bar)/clips/[stageId]/topBar/CreateClipButton.tsx
@@ -51,11 +51,13 @@ const CreateClipButton = ({
const session = await fetchSession({ session: sessionId });
if (!session) {
toast.error('Failed to fetch session');
+ console.error('๐จ Session fetch failed');
return;
}
setSessionRecording(session);
+ console.log('๐ Session fetched successfully');
} catch (error) {
- console.error('Error fetching session:', error);
+ console.error('๐จ Error fetching session:', error);
toast.error('Failed to fetch session data');
}
};
@@ -66,11 +68,13 @@ const CreateClipButton = ({
const stageData = await fetchStage({ stage: stageId });
if (!stageData) {
toast.error('Failed to fetch stage');
+ console.error('๐จ Stage fetch failed');
return;
}
setStage(stageData);
+ console.log('๐ Stage fetched successfully');
} catch (error) {
- console.error('Error fetching stage:', error);
+ console.error('๐จ Error fetching stage:', error);
toast.error('Failed to fetch stage data');
}
};
@@ -85,6 +89,7 @@ const CreateClipButton = ({
if (videoRef.current) {
videoRef.current.currentTime = startTime.displayTime;
videoRef.current.play();
+ console.log('๐ Preview started');
}
};
@@ -133,6 +138,7 @@ const CreateClipButton = ({
stageId: stageId,
speakers: [],
});
+ console.log('๐ Marker cleared');
};
useEffect(() => {
@@ -154,6 +160,7 @@ const CreateClipButton = ({
})) ?? [],
pretalxSessionCode: selectedMarker.pretalxSessionCode,
});
+ console.log('๐ Marker data reset');
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [selectedMarker]);
@@ -165,11 +172,13 @@ const CreateClipButton = ({
(!sessionRecording?.assetId && !liveRecordingId)
) {
setIsCreateClip(false);
+ console.error('๐จ Missing required data for clip creation');
return toast.error('Missing required data for clip creation');
}
if (endTime.unix < startTime.unix) {
setIsCreateClip(false);
+ console.error('๐จ End time must be greater than start time');
return toast.error('End time must be greater than start time');
}
@@ -208,24 +217,26 @@ const CreateClipButton = ({
};
if (hasEditorOptions) {
+ const events = [
+ ...(values.outroAnimation ? [{
+ videoUrl: values.outroAnimation,
+ label: 'outro',
+ }] : []),
+ ...(values.introAnimation ? [{
+ videoUrl: values.introAnimation,
+ label: 'intro',
+ }] : []),
+ {
+ sessionId: session._id as string,
+ label: 'main',
+ },
+ ];
+
const clipCreationOptions = {
...mainClipData,
isEditorEnabled: true,
editorOptions: {
- events: [
- {
- sessionId: values.outroAnimation as string,
- label: 'outro',
- },
- {
- sessionId: values.introAnimation as string,
- label: 'intro',
- },
- {
- sessionId: session._id as string,
- label: 'main',
- },
- ],
+ events,
captionEnabled: values.captionEnabled,
selectedAspectRatio: values.selectedAspectRatio as string,
frameRate: 30,
@@ -235,16 +246,20 @@ const CreateClipButton = ({
captionFont: 'Arial',
},
};
+ console.log('Creating clip with options:', JSON.stringify(clipCreationOptions, null, 2));
// Call createClipAction with the prepared editor options
await createClipAction(clipCreationOptions);
+ console.log('๐ Clip created with editor options');
} else {
+ console.log('Creating clip without editor options:', JSON.stringify(mainClipData, null, 2));
await createClipAction({ ...mainClipData, isEditorEnabled: false });
+ console.log('๐ Clip created without editor options');
}
toast.success('Clip created');
setIsCreatingClip(false);
} catch (error) {
- console.error('Error creating clip:', error);
+ console.error('๐จ Error creating clip:', error);
toast.error(
error instanceof Error ? error.message : 'Error creating clip'
);
@@ -268,4 +283,4 @@ const CreateClipButton = ({
);
};
-export default CreateClipButton;
+export default CreateClipButton;
\ No newline at end of file
diff --git a/packages/app/app/studio/[organization]/(no-side-bar)/clips/[stageId]/topBar/SelectAnimation.tsx b/packages/app/app/studio/[organization]/(no-side-bar)/clips/[stageId]/topBar/SelectAnimation.tsx
index 8f5cf80ef..12219142e 100644
--- a/packages/app/app/studio/[organization]/(no-side-bar)/clips/[stageId]/topBar/SelectAnimation.tsx
+++ b/packages/app/app/studio/[organization]/(no-side-bar)/clips/[stageId]/topBar/SelectAnimation.tsx
@@ -3,8 +3,6 @@
import React, { useState } from 'react';
import { IExtendedSession } from '@/lib/types';
import { SessionType } from 'streameth-new-server/src/interfaces/session.interface';
-import Dropzone from '@/app/studio/[organization]/(root)/library/components/upload/Dropzone';
-import { Uploads } from '@/app/studio/[organization]/(root)/library/components/UploadVideoDialog';
import {
Form,
FormControl,
@@ -19,6 +17,8 @@ import { z } from 'zod';
import { clipSchema } from '@/lib/schema';
import { Button } from '@/components/ui/button';
import Combobox from '@/components/ui/combo-box';
+import VideoUpload from '@/components/misc/form/videoUpload';
+import { Uploads } from '@/app/studio/[organization]/(root)/library/components/UploadVideoDialog';
const SelectAnimation = ({
animations,
@@ -59,15 +59,14 @@ const SelectAnimation = ({
items={[
...animations.map((animation) => ({
label: animation.name,
- value: animation._id,
- })),
+ value: animation.videoUrl || '',
+ })).filter(item => item.value),
]}
variant="outline"
- value={field.value as string}
+ value={field.value || ''}
setValue={(value) => {
if (value) {
field.onChange(value);
- // Clear uploads when an animation is selected
setUpload({});
}
}}
@@ -78,7 +77,7 @@ const SelectAnimation = ({
{field.value ? ( // Check if an animation is selected
- {animations.find((a) => a._id === field.value)?.name}
+ Selected video
) : (
-
{
+ // Store the S3 URL directly
+ field.onChange(e.target.value);
+ }}
/>
)}
diff --git a/packages/app/components/misc/UserProfile.tsx b/packages/app/components/misc/UserProfile.tsx
index b128f7014..083b79c17 100644
--- a/packages/app/components/misc/UserProfile.tsx
+++ b/packages/app/components/misc/UserProfile.tsx
@@ -10,6 +10,7 @@ import Image from 'next/image';
import { IExtendedOrganization } from '@/lib/types';
import { fetchOrganization } from '@/lib/services/organizationService';
import Link from 'next/link';
+import { LayoutDashboard, Home, Users, LogOut } from 'lucide-react';
const UserProfile = async ({
organization,
@@ -42,23 +43,49 @@ const UserProfile = async ({