diff --git a/apps/ai-hero/src/app/(content)/posts/_components/edit-post-form-metadata.tsx b/apps/ai-hero/src/app/(content)/posts/_components/edit-post-form-metadata.tsx
index 89a3f07c..563a5e07 100644
--- a/apps/ai-hero/src/app/(content)/posts/_components/edit-post-form-metadata.tsx
+++ b/apps/ai-hero/src/app/(content)/posts/_components/edit-post-form-metadata.tsx
@@ -2,7 +2,7 @@ import * as React from 'react'
import { Suspense, use } from 'react'
import Link from 'next/link'
import { useRouter } from 'next/navigation'
-import { PostPlayer } from '@/app/(content)/posts/_components/post-player'
+import { SimplePostPlayer } from '@/app/(content)/posts/_components/post-player'
import Spinner from '@/components/spinner'
import { env } from '@/env.mjs'
import { useTranscript } from '@/hooks/use-transcript'
@@ -155,7 +155,7 @@ export const PostMetadataFormFields: React.FC<{
<>
{videoResource && videoResource.state === 'ready' ? (
-
+
- {/* {currentResourceIndexFromList}
- {nextUpList && (
-
- {nextUpList.resources.map((r) => {
- return
{r.resource.fields.title}
- })}
-
- )} */}
)}
)
}
-// function getNextUpResourceFromList(list: List, currentResourceId: string) {
-// if (list?.fields?.type !== 'nextUp') return null
+export function SimplePostPlayer({
+ muxPlaybackId,
+ className,
+ videoResource,
+}: {
+ muxPlaybackId?: string
+ videoResource: VideoResource
+ className?: string
+}) {
+ const playerProps = {
+ id: 'mux-player',
+ defaultHiddenCaptions: true,
+ streamType: 'on-demand',
+ thumbnailTime: 0,
+ accentColor: '#DD9637',
+ playbackRates: [0.75, 1, 1.25, 1.5, 1.75, 2],
+ maxResolution: '2160p',
+ minResolution: '540p',
+ } as MuxPlayerProps
-// const currentResourceIndexFromList = list?.resources.findIndex(
-// (r) => r.resource.id === currentResourceId,
-// )
-// const nextUpIndex = currentResourceIndexFromList + 1
+ const playbackId =
+ videoResource?.state === 'ready'
+ ? muxPlaybackId || videoResource?.muxPlaybackId
+ : null
-// return list?.resources[nextUpIndex]
-// }
+ return (
+ <>
+ {playbackId ? (
+
+ ) : (
+
+
+
+ )}
+ >
+ )
+}