diff --git a/apps/web/app/s/[videoId]/_components/ShareVideo.tsx b/apps/web/app/s/[videoId]/_components/ShareVideo.tsx index 2e683a41..603569f4 100644 --- a/apps/web/app/s/[videoId]/_components/ShareVideo.tsx +++ b/apps/web/app/s/[videoId]/_components/ShareVideo.tsx @@ -263,7 +263,7 @@ export const ShareVideo = ({ {isLoading && (
- {data.jobStatus !== "COMPLETE" && ( + {data.jobStatus !== "COMPLETE" && data.skipProcessing === false && (

Video is processing...

)}
@@ -295,7 +295,11 @@ export const ShareVideo = ({ >
diff --git a/apps/web/app/s/[videoId]/page.tsx b/apps/web/app/s/[videoId]/page.tsx index 82e1ccf4..f2f5eb20 100644 --- a/apps/web/app/s/[videoId]/page.tsx +++ b/apps/web/app/s/[videoId]/page.tsx @@ -60,7 +60,7 @@ export default async function ShareVideoPage(props: Props) { const video = query[0]; - if (video.jobId === null) { + if (video.jobId === null && video.skipProcessing === false) { const res = await fetch( `${process.env.NEXT_PUBLIC_URL}/api/upload/mux/create?videoId=${videoId}&userId=${video.ownerId}`, { @@ -73,7 +73,7 @@ export default async function ShareVideoPage(props: Props) { await res.json(); } - if (video.jobStatus !== "COMPLETE") { + if (video.jobStatus !== "COMPLETE" && video.skipProcessing === false) { const status = await fetch( `${process.env.NEXT_PUBLIC_URL}/api/upload/mux/status?videoId=${videoId}&userId=${video.ownerId}`, { diff --git a/apps/web/utils/video/ffmpeg/helpers.ts b/apps/web/utils/video/ffmpeg/helpers.ts index 50a043b7..b1678a09 100644 --- a/apps/web/utils/video/ffmpeg/helpers.ts +++ b/apps/web/utils/video/ffmpeg/helpers.ts @@ -91,7 +91,10 @@ export async function generateM3U8Playlist( let m3u8Content = baseM3U8Content; urls.forEach((segment) => { const { url, duration } = segment; - m3u8Content += `#EXTINF:${duration},\n${url}\n`; + m3u8Content += `#EXTINF:${duration},\n${url.replace( + "https://capso.s3.us-east-1.amazonaws.com", + "https://v.cap.so" + )}\n`; }); m3u8Content += "#EXT-X-ENDLIST"; @@ -113,7 +116,10 @@ export async function generateMasterPlaylist( #EXT-X-INDEPENDENT-SEGMENTS #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",NAME="Audio",DEFAULT=YES,AUTOSELECT=YES,LANGUAGE="en",URI="${audioPlaylistUrl}" #EXT-X-STREAM-INF:${streamInfo} -${videoPlaylistUrl} +${videoPlaylistUrl.replace( + "https://capso.s3.us-east-1.amazonaws.com", + "https://v.cap.so" +)} `; return masterPlaylist;